PVM++: A C++-Library for PVM

This library provides an easy way to program the widely used parallel programming library PVM, which works in homogenous and heterogenous network environments.

Table of Contents

Features

  • Easy sending and receiving of messages in heterogenous networks.
  • Full STL-integration.
  • Easy installation with configure-script on all UN*X platforms.
  • Easy access to all task and host information.
  • Message handlers are supported.
  • Messages can be automatically unpacked on arrival.
  • Released under the LGPL (GNU Lesser General Public License).

Download

Download the latest version pvm++-0.6.0.tar.gz (201 KiB). See below for older versions and the differences between them.

News

2002-01-24:

  • New webpage design. Looks really ugly in netscape 4.x with its broken CSS support. Looks also ugly in other browsers, but at least there it looks like I wanted it to look;-)
  • Now only hosted at SourceForge. I shut down the german mirror, because I'm going to leave the hosting university this year.

2001-11-19:

2001-09-13:

  • SourceForge discontinues FTP support. From now on only HTTP downloads are possible. If that is a problem for you, please e-mail me.

2001-06-27:  pvm++-0.6.0.tar.gz (201 KiB)

  • This release is the first to work with gcc-3.0. It still works with gcc-2.95, but might not work with very old versions of gcc anymore. Take version 0.5.1 for those compilers or better yet upgrade to gcc-3.0.
  • Instead of prepending every symbol of this library with Pvm this release uses the namespace Pvm. So PvmHost now becomes Pvm::Host. This of course is binary and source code incompatible with old versions of PVM++. There is, however, a script named "convert_to_namespace", which does a very good job at converting a program to work with the new version of PVM++. This script can be found in the top directory of the distribution tarball.
  • Upgraded to libtool 1.4

2001-02-01:  pvm++-0.5.1.tar.gz (165 KiB)

  • Now STL types, PvmStruct and PvmCustom are properly packed/unpacked again.
  • Code cleanups.
  • Updated to LGPL 2.1
  • New regression test suite added with 1 test so far. You can run the test by typing make check

2001-01-25:  pvm++-0.5.0.tar.gz (156 KiB)

  • Now the packing and unpacking of structures is done differently. Instead of first registering the contents of the class and later using this information to pack and unpack now the PvmRegistration function itself packs and unpacks the data. This made the library faster and smaller: 1.6MB (156KB) instead of 2.2MB (182KB) for the normal (stripped) shared libraries.
  • If you now delete an instance of a PvmStruct, that was the destination of AutomaticUnPack, this is now reset to NormalReceive, thus preventing a bogus data to be written.
  • Completely reworked the file structure. Now every class has 3 files. The *.cc file for the implementation of all non-inline functions. The *.hh file for the declaration and the *.ii file has the inline functions, if any. Only the header files needed by other programs get installed.
  • Now the pack.ii header file (used to be pack.hh) is generated by a script rather then working with macros. This makes it more clean.
  • Now all types, that can be registered via PvmRegister can also be registered as arrays with a second size argument.
  • Upgraded to libtool 1.3.5
  • Now compiles on FreeBSD

2000-02-11:  pvm++-0.4.6.tar.gz (149 KiB)

  • "./configure" bailed out on some GNU/Linux systems. This is fixed.
  • The Documentation uses PNG instead of GIF now.
  • Downloading via ftp from the University of Karlsruhe doesn't work anymore with passive ftp (what e.g. Netscape is using) because of our new firewall. So I removed those links.

2000-01-05:

  • Anonymous CVS access and online browsing of the CVS tree is enabled.

1999-12-03:

  • This homepage is now mirrored in the US (thanks to SourceForge).

1999-11-03:  pvm++-0.4.5.tar.gz (163 KiB)

  • Fixed a bug, that showed up with gcc-2.95.2.
  • Updated to libtool-1.3.3.
  • Now more possible PVM paths are detected.
  • Documentation is now generated with DOC++ and disributed in the tarball.

1998-06-03:  pvm++-0.4.4.tar.gz (111 KiB)

  • Made it work on systems, where select expects int* instead of fd_set*, like HP-UX.
  • Added pvm++.m4 for easy configuring of dependent packages.
  • Updated to libtool-1.2.

1998-03-02:  pvm++-0.4.3.tar.gz (106 KiB)

  • Added examples/mult to distribution.
  • Added examples/talk to distribution.
  • Added a select(3c)-like functionality to PvmStructSet.
  • Fixed configure-bug, which prevented the --with options from working.
  • Defined MICROSEC, which is not part of every UNIX, it seems.
  • added default parameter for From to the PvmStructSet::Receive*-functions.

1998-02-09:  pvm++-0.4.2.tar.gz (94 KiB)

  • added examples/forkjoin to distribution.

1998-02-06:  pvm++-0.4.1.tar.gz (94 KiB)

  • added bool to the transmittable types.
  • make sure the PVM is started before using it.
  • now really (?) working with gcc 2.7.2. (removed multimap and multiset from transmittable types, if compiling with gcc 2.7.2)

1998-01-30:  pvm++-0.4.tar.gz (89 KiB)

  • first release

License

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Installation

You must have PVM3.3 or PVM3.4 installed on your machine. Then the installation should be fairly easy on all UN*X platforms. You just have to do:

      gunzip pvm++-0.6.0.tar.gz
      tar xvf pvm++-0.6.0.tar
      cd pvm++-0.6.0
      ./configure
      make
      make install

It should compile with egcs-1.0 or later and ggc-2.95 or later. Older versions of gcc might work, but I can not test that.

If you do not want to have debug-info included in the library, you should set the environment variable CXXFLAGS to something without -g, i.e. you could do:

      ...
      env CXXFLAGS=-O2 ./configure
      ... 

On i386-pc-linux-gnu the (shared) library with debug-info has 1.6MB, whereas the version without it only has 182KB! The stripped version eventually only has 156KB (whether compiled with or without debug-info).

NOTE: (HP-UX)

If you're working on an HP-UX system, you have to make sure, that you have a proper sed(1) (e.g. GNU sed) installed! The program libtool, which handles the compilation of shared libraries for PVM++ needs this, as "the vendor-distributed HP-UX sed(1) programs are horribly broken".

NOTE: (Win32)

As I haven't got a PC with Win95 or WinNT at hand I don't know, whether it compiles there. If you get it to compile, I would very much appreciate any results and the corresponding Makefiles, patches etc. You simply have to compile all the .cc-files in the directory pvm++ and link the resulting files together to form the library. The necessary include-files (*.hh, *.ii) have to be available in the include-path.

Usage

If you want to compile a program (e.g. forkjoin.cc), you at first have to include the right header (#include <pvm++/pvm++.hh>; <pvm3.h> needn't be included), and then all you have to do is (assuming that your C++ compiler is c++):

      c++ -I<pvm++ include path> \
	-I<pvm include path> -c forkjoin.cc
      c++ -o forkjoin forkjoin.o -L<pvm++ library path> \
	-L<pvm library path> \\
          -lpvm++ -lpvm3 -l<other libraries needed for pvm>

Packages using PVM++

If you want to use PVM++ in your own program, you might want to consider using automake and autoconf, which PVM++ uses as well. You'll find a file pvm++.m4 included in this distribution, that will be installed into ${prefix}/share/aclocal. This file will (together with aclocal, which is part of automake) make life very easy for you.

A sample configure.in looks like this:

      AC_INIT(main.cc)
      AM_INIT_AUTOMAKE(myprogram, 0.1.2)
      AC_PROG_CXX
      AC_PROG_INSTALL
      AC_PROG_MAKE_SET
      AM_PROG_LIBTOOL
      AC_FIND_PVM_P_P

After this the configure-variable PVM_P_P_CFLAGS containes all necessary include-pathes and the variable PVM_P_P_LDFLAGS containes all necessary library-pathes and libraries. So the corresponding Makefile.am looks like this:

      bin_PROGRAMS = myprogram
      myprogram_SOURCES = main.cc
      INCLUDES = @PVM_P_P_CFLAGS@
      LDADD = @PVM_P_P_LDFLAGS@

TODO

  • Add Group functions.
  • Add Spawn to Pvm::Class for just spawning a process on some host of the PVM.
  • Maybe include a task scheduler.
  • Reimplement the Pvm::Struct.Receive() family.
  • Add ability to dynamically add hosts.
  • Add more examples.
  • Extend documentation.

Documentation

  • An Example with comparision to its PVM-equivalent.
  • A Tutorial.
  • The Reference, made with DOC++. It can also be downloaded as a pdf document for more convenient off-line reading.
  • The FAQ (if you have a question, ask it and it may become a FAQ).

Anonymous CVS access

This project's CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set. When prompted for a password for anonymous, simply press the Enter key.

      cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/pvm-plus-plus login 
      cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/pvm-plus-plus co pvm++

Updates from within the pvm++ directory do not need the -d parameter.

The CVS tree can also be browsed online.

Examples

There are examples included in the distribution in the directory examples. They will not be installed, but can be changed and compiled in place. Just edit and re-make them. You don't need to install them in the default PVM-Path either, as they spawn their children with absolute path.

History

The library PVM++ has been developed for practicum on fault tolerance at the Institute of Computer Design and Fault Tolerance of the University of Karlsruhe.

There has previously been a library called pvm++. It was written by Daniel Cohen-Laroque of the Swiss Federal Institute of Technology. But the last release (as far as I could see) was 0.3 of 1994-09-30, and there doesn't seem to be ongoing development. So I adopted the name and numbered my first release 0.4 to avoid confusion. My library however doesn't include any code form that library (I in fact haven't seen it, before I finished the basic design of my library).

Credits

I would like to thank:

Final comments

I'd very much appreciate your feedback! Any comments and ideas on improvements are welcome.