HP-MPI User's Guide (11th Edition)
Frequently asked questions
Building applications
Appendix D300
Building applications
QUESTION: Which compilers does HP-MPI work with?
ANSWER: HP-MPI works well with all compilers. We explicitly test with
gcc, Intel, PathScale, and Portland, as well as HP-UX compilers. HP-MPI
strives not to introduce compiler dependencies.
For Windows, see the Windows FAQ section.
QUESTION: What MPI libraries do I need to link with when I build?
ANSWER: We recommend using the mpicc, mpif90, and mpi77 scripts in
$MPI_ROOT/bin to build. If you absolutely do not want to build with
these scripts, we recommend using them with the -show option to see
what they are doing and use that as a starting point for doing your build.
The -show option will just print out the command it would use to build
with. Because these scripts are readable, you can examine them to
understand what gets linked in and when.
For Windows, see the Windows FAQ section.
QUESTION: How do I specifically build a 32-bit application on a 64-bit
architecture?
ANSWER
: On Linux, HP-MPI contains additional libraries in a 32-bit
directory for 32-bit builds.
$MPI_ROOT/lib/linux_ia32
Use the -mpi32 flag to mpicc to ensure that the 32-bit libraries are used.
In addition, your specific compiler may require a flag to indicate a 32-bit
compilation.
For example:
On an Opteron system using gcc, you need to tell gcc to generate 32-bit
via the flag -m32. In addition, the -mpi32 is used to ensure 32-bit
libraries are selected.
% setenv MPI_ROOT /opt/hpmpi
% setenv MPI_CC gcc
% $MPI_ROOT/bin/mpicc hello_world.c -mpi32 -m32
% file a.out