HP-MPI User's Guide (11th Edition)

Understanding HP-MPI
MPICH object compatibility for HP-UX and Linux
Chapter 362
MPICH object compatibility for HP-UX and
Linux
The MPI standard specifies the function prototypes for the MPI
functions, but does not specify the types of the MPI opaque objects like
communicators or the values of the MPI constants. Hence an object file
compiled using one vendor's MPI will generally not function correctly if
linked against another vendor's MPI library.
There are some cases where such compatibility would be desirable. For
instance a third party tool such as Intel trace/collector might only be
available using the MPICH interface.
To allow such compatibility, HP-MPI includes a layer of MPICH
wrappers which provides an interface identical to MPICH 1.2.5, and
translates these calls into the corresponding HP-MPI interface. This
MPICH compatibility interface is only provided for functions defined in
MPICH 1.2.5 and cannot be used by an application which calls functions
outside the scope of MPICH 1.2.5.
HP-MPI can be used in MPICH mode by compiling using "mpicc.mpich"
and running using "mpirun.mpich". The compiler script mpicc.mpich
uses an include file which defines the interfaces the same as MPICH
1.2.5, and at link time it links against libmpich.so which is the set of
wrappers defining MPICH 1.2.5 compatible entrypoints for the MPI
functions. The mpirun.mpich takes the same arguments as the
traditional HP-MPI mpirun, but sets LD_LIBRARY_PATH so that
libmpich.so is found.
An example of using a program with Intel Trace Collector:
% export MPI_ROOT=/opt/hpmpi
% $MPI_ROOT/bin/mpicc.mpich -o prog.x \
$MPI_ROOT/help/communicator.c -L/path/to/itc/lib \
-lVT -lvtunwind -ldwarf -lnsl -lm -lelf -lpthread
% $MPI_ROOT/bin/mpirun.mpich -np 2 ./prog.x
Here, the program communicator.c is being compiled with MPICH
compatible interfaces and is being linked against Intel's Trace Collector
libVT.a first from the command line option, followed by HP-MPI's