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

Understanding HP-MPI
MPICH object compatibility for HP-UX and Linux
Chapter 3 63
libmpich.so then libmpi.so which are added by the mpicc.mpich
compiler wrapper script. Thus libVT.a sees only the MPICH compatible
interface to HP-MPI.
In general, object files built with HP-MPI's MPICH mode can be used in
an MPICH application, and conversely object files built under MPICH
can be linked into an HP-MPI app using MPICH mode. However using
MPICH compatibility mode to produce a single executable to run under
both MPICH and HP-MPI will be problematic and is not advised.
communicator.c could be compiled under HP-MPI MPICH compatibility
mode as:
% export MPI_ROOT=/opt/hpmpi
% $MPI_ROOT/bin/mpicc.mpich -o prog.x \
$MPI_ROOT/help/communicator.c
and run the resulting prog.x under MPICH. However, various problems
will be encountered. First, the MPICH installation will need to be built
to include shared libraries and a soft link would need to be created for
libmpich.so, since their libraries might be named differently.
Next an appropriate LD_LIBRARY_PATH setting must be added manually
since MPICH expects the library path to be hard coded into the
executable at link time via -rpath.
Finally, while the resulting executable would run over any supported
interconnect under HP-MPI, it would not under MPICH due to not being
linked against libgm/libelan etc.
Similar problems would be encountered if linking under MPICH and
running under HP-MPI's MPICH compatibility. MPICH's use of -rpath
to hard code the library path at link time would keep the executable from
being able to find the HP-MPI MPICH compatibility library via
HP-MPI’s LD_LIBRARY_PATH setting.
C++ bindings are not supported with MPICH compatibility mode.
MPICH compatibility mode is not supported on HP-MPI V1.0 for
Windows.