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

Understanding HP-MPI
Compilation wrapper script utilities
Chapter 3 45
Compilation wrapper script utilities
HP-MPI provides compilation utilities for the languages shown in
Table 3-1. In general, if a particular compiler is desired, it is best to set
the appropriate environment variable such as MPI_CC. Without such a
setting, the utility script will search the PATH and a few default
locations for a variety of possible compilers. Although in many
environments this search produces the desired results, explicitly setting
the environment variable is safer. Command line options take
precedence over environment variables.
Compiling applications
The compiler you use to build HP-MPI applications depends upon which
programming language you use. The HP-MPI compiler utilities are shell
scripts that invoke the appropriate native compiler. You can pass the
pathname of the MPI header files using the -I option and link an MPI
library (for example, the diagnostic or thread-compliant library) using
the -Wl, -L or -l option.
By default, HP-MPI compiler utilities include a small amount of debug
information in order to allow the TotalView debugger to function.
However, certain compiler options are incompatible with this debug
information. Use the -notv option to exclude debug information. The
-notv option will also disable TotalView usage on the resulting
executable. The -notv option applies to archive libraries only.
Table 3-1 Compiler selection
Language
Wrapper
Script
Environment
Variable
Command Line
C mpicc MPI_CC -mpicc <compiler>
C++ mpiCC MPI_CXX -mpicxx <compiler>
Fortran 77 mpif77 MPI_F77 -mpif77 <compiler>
Fortran 90 mpif90 MPI_F90 -mpif90 <compiler>
mpisyntax MPI_WRAPPER_
SYNTAX
-mpisyntax \
<windows/unix>