Personal tools
You are here: Home / Installing Biskit / Troubleshooting / PVM installation from source

PVM installation from source

Instructions for compiling and installing PVM from source.

There are good reasons to look for pre-compiled packages of pvm and pvm-devel! If not already included, you most likely will find the right package for your Linux distro on http://www.rpmseek.com. Mac OSX users find pre-compiled pvm and pvm-devel packages on http://darwinports.opendarwin.org/. However, make sure you are installing the same pvm version (currently 3.4.5) on all nodes!

When building from source, the 3 year old 3.4.5 standard release has issues with gcc 4.x compilers and 64 bit architectures. For this reason, please download the latest pre-release from here: http://www.csm.ornl.gov/~kohl/. The second issue is that the standard Makefiles don't create the shared libpvm3.so libraries which we need to compile pypvm python bindings. Here are step-by-step instructions that work around this problem (Thanks to Jim Kohl for helping out!):

Compile PVM

  1. download and unpack:

    wget http://www.csm.ornl.gov/~kohl/PVM/pvm3.4.5+7.tar.Z
    
    tar xvf pvm3.4.5+7.tar.Z
    cd pvm3
    

    For convenience, pvm-3.4.5+7.tar.Z can also be downloaded from our package mirror.

  2. set $PVM_ROOT

    • for zsh and bash:

      export PVM_ROOT=`pwd`
      
    • for csh and related:

      setenv PVM_ROOT `pwd`
      
  3. Modify for building shared libraries

    • download our sharedlib patch

    • apply the patch (in folder pvm3/):

      patch -p1 < pvm_sharedlib.patch
      

    This should adapt your conf/LINUX.def, conf/LINUX64.def and src/Makefile.aimk files. The detailed modifications are described in Note 1 !

  4. Cross fingers and try compilation:

    cd $PVM_ROOT
    make
    

    Note:

    An error like this (from a 32 bit Fedore Core system):

    grep: /usr/local/src/pvm3/conf/LINUXI386.def: No such file or directory
    

    can be fixed with some symbolic links:

    cd conf
    ln -s LINUX.def LINUXI386.def
    ln -s LINUX.m4 LINUXI386.m4
    

Install PVM

  1. Copy pvm3 folder, binaries, and library to a system-wide location, for example:

    cd ..
    sudo mv pvm3 /usr/local/lib64/
    
    cd /usr/local/bin
    sudo ln -s ../lib64/pvm3/lib/pvm .
    sudo ln -s ../lib64/pvm3/lib/pvmgetarch .
    
    cd /usr/lib64
    sudo ln -s /usr/local/lib64/pvm3/lib/$PVM_ARCH/libpvm3.so .
    
  2. Set up environment:

    export PVM_ROOT=/usr/local/lib64/pvm3
    export PVM_RSH=/usr/bin/ssh
    export PVM_ARCH=`$PVM_ROOT/lib/pvmgetarch`   ## note the back-quotes!
    

Put these into your shell configuration file (e.g. .zshenv, .bashrc). For csh and related use setenv rather than export.

See detailed instructions in PVM Howto !


Note 1

Manual modification of PVM makefiles
  1. Adapt compiler flags for shared libraries

    • fetch Architecture ID, (zsh example):

      export PVM_ARCH=`lib/pvmgetarch`
      
    • edit conf/$PVM_ARCH.def and add "-fpic" parameter to $ARCHCFLAGS, for example in conf/LINUX.def:

      ARCHCFLAGS        =       -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" \
                                -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS \
                                -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM \
                                -DUSESTRERROR -fpic
      
  2. Add shared library targets to src/Makefile.aimk

    • add a build and installation target for the shared library to src/Makefile.aimk (e.g. after the $(LIBPVM).a: target):

      ## modified: shared libraries
      
      $(LIBPVM).so:    $(REGEXCONF) $(LOBJ) $(LPVMSOCK) $(SOCKLOBJ)
        rm -f $(LIBPVM).so
        $(CC) -shared -o $(LIBPVM).so $(LOBJ) $(LPVMSOCK) $(SOCKLOBJ)
      
      $(LIBDIR)/$(LIBPVM).so:  $(LIBPVM).so
        cp $(LIBPVM).so $(LIBDIR)/$(LIBPVM).so
      
    • still in Makefile.aimk, add the two new targets to the all and install sections:

      all:      pvmd3$(EXESFX) $(LIBPVM).a $(LIBPVM).so
      ...
      
      install:  $(LIBDIR) $(LIBDIR)/pvmd3$(EXESFX) $(LIBDIR)/$(LIBPVM).a \
                $(LIBDIR)/$(LIBPVM).so