HP-MPI User's Guide (11th Edition)
Understanding HP-MPI
Compilation wrapper script utilities
Chapter 3 49
In order to construct the desired compilation command, the mpif90
utility needs to know what command line compiler is to be used, the
bitness of the executable that compiler will produce, and the syntax
accepted by the compiler. These can be controlled by environment
variables or from the command line.
For example, to compile compute_pi.f with a 64-bit 'ifort' contained in
your PATH use the following command since 'ifort' and the 'Windows'
syntax are defaults:
"%MPI_ROOT%\bin\mpif90" /mpi64 compute_pi.f /link ^
/out:compute_pi_ifort.exe
Or, use the following example to compile using the PGI compiler which
uses a more UNIX-like syntax:
"%MPI_ROOT%\bin\mpif90" -mpif90 pgf90 -mpisyntax unix ^
-mpi32 compute_pi.f -o compute_pi_pgi32.exe
To compile compute_pi.f using Intel Fortran without utilizing the
mpif90 tool (from a command prompt that has the appropriate
environment settings loaded for your Fortran compiler):
ifort compute_pi.f /I"%MPI_ROOT%\include\64" ^
/link /out:compute_pi.exe ^
/libpath:"%MPI_ROOT%\lib" ^
/subsystem:console libhpmpi64.lib
Table 3-3 mpif90 Utility
Environment Variable Value Command Line
MPI_F90 desired compiler
(default ifort)
-mpif90 <value>
MPI_BITNESS 32 or 64 (no
default)
-mpi32 or -mpi64
MPI_WRAPPER_SYNTAX windows or unix
(default
windows)
-mpisyntax <value>