Difference between revisions of "Installation/HowTo Pstream"

From OpenFOAMWiki
 
(Pstream for hpmpi)
Line 22: Line 22:
  
 
If you are investigating higher performance replacements for e.g. LAM,OpenMPI have a look at GAMMA (http://www.disi.unige.it/project/gamma/index.html). This is fully supported since {{Version1.4}}.
 
If you are investigating higher performance replacements for e.g. LAM,OpenMPI have a look at GAMMA (http://www.disi.unige.it/project/gamma/index.html). This is fully supported since {{Version1.4}}.
 +
 +
 +
'''Pstream for HPMPI'''
 +
 +
 +
Linking the proprietary HP-MPI is slightly more tricky than the standard method described above.
 +
In addition to the steps outlined,  a symbol needs to be pre-defined to prevent the inclusion of C++ bindings.
 +
 +
After modifying the OpenFOAM login files, copy mplibOPENMPI to mplibHPMPI in $WM_DIR/rules/$WM_ARCH$WM_COMPILER and edit it as follows:
 +
 +
  PFLAGS = -D_MPICC_H
 +
  PINC = -I$(HPMPI_PATH)/include
 +
  PLIBS = -L$(HPMPI_PATH)/lib/linux_amd64 -lmpi
 +
 +
Pre-defining the "_MPICC_H" symbol causes the linker to skip out the section of mpiCC.h that normally causes problems. Why HP have not deigned to include an explicit switch to disable C++ bindings is unclear.
 +
 +
Follow the rest of the steps normally.

Revision as of 13:53, 30 October 2007

All OpenFOAM applications do parallel communication through the Pstream library only so using any underlying message passing library (MPI, GAMMA) is just a matter of replacing Pstream. One can have multiple versions and just change the LD_LIBRARY_PATH to pick up the wanted one.

- in your ~/.OpenFOAM-1.XXX/bashrc define (or uncomment) WM_MPLIB to be the name of your message passing library. E.g.

  export WM_MPLIB=MPIGAMMA

- in the central OpenFOAM/OpenFOAM-1.XXX/.bashrc set all the additional settings for your WM_MPLIB. The only non-optional setting is

FOAM_MPI_LIBBIN

which is the place where the Pstream library will be put.

- in your rules directory ($WM_DIR/rules/$WM_ARCH) make a mplib${WM_MPLIB} file. In my example: mplibMPIGAMMA. Usually easiest to start from e.g. the LAM one.

- go to $FOAM_SRC/Pstream

 ./Allwmake

- this will have made a $FOAM_MPI_LIBBIN/libPstream.so

That is all. Now all of OpenFOAM will use your communication library.

If you are investigating higher performance replacements for e.g. LAM,OpenMPI have a look at GAMMA (http://www.disi.unige.it/project/gamma/index.html). This is fully supported since OF version 14.png.


Pstream for HPMPI


Linking the proprietary HP-MPI is slightly more tricky than the standard method described above. In addition to the steps outlined, a symbol needs to be pre-defined to prevent the inclusion of C++ bindings.

After modifying the OpenFOAM login files, copy mplibOPENMPI to mplibHPMPI in $WM_DIR/rules/$WM_ARCH$WM_COMPILER and edit it as follows:

 PFLAGS = -D_MPICC_H
 PINC = -I$(HPMPI_PATH)/include
 PLIBS = -L$(HPMPI_PATH)/lib/linux_amd64 -lmpi

Pre-defining the "_MPICC_H" symbol causes the linker to skip out the section of mpiCC.h that normally causes problems. Why HP have not deigned to include an explicit switch to disable C++ bindings is unclear.

Follow the rest of the steps normally.