Download ParaStation User's Guide
Transcript
Selecting Compiler Alternatives for MPI Programs
has to be executed. The argument(s) args are passed to each instance of the executable prog. A detailed
description of the mpiexec(1) command and its options can be found within the corresponding manual page.
All details discussed in Chapter 3, Starting up programs about spawning and input/output redirection also
applies to MPI applications linked against ParaStation. I.e. all the environment variables discussed in
ps_environment(7) can be used to control the distribution of processes within the cluster.
4.3. Selecting Compiler Alternatives for MPI Programs
The choice of compiler will effect application performance, as will the optimization flags used during
compilation. The ParaStation environment has simplified the selection of compilers by dispensing with the
normal MPI environment variables used in MPICH distributions.
It is important to link applications codes with MPI libraries and other ancillary libraries (such as MKL math
libraries) compiled with the same compiler as that used for the main application. This ensures compatibility
of shared objects and exposes the user to runtime libraries with the best set of optimization parameters
for that particular compiler. ParaStation achieves this requirement using wrapper scripts designed for use
with each compiler.
4.3.1. Compiler & Linker Wrapper scripts
The following wrapper scripts are available in ParaStation releases:
Wrapper path
Compiler Type
${MPI_HOME}/bin/mpicc
C compiler
${MPI_HOME}/bin/mpicxx
C++ compiler
${MPI_HOME}/bin/mpif77
FORTRAN 77 compiler
${MPI_HOME}/bin/mpif90
FORTRAN 90 compiler
Table 4.1. Compiler wrappers for building MPI codes
With ${MPI_HOME}:
${MPI_HOME}
Compiler suite
commands
/opt/parastation/mpi2
GNU Compiler
gcc, g++, gfortran
/opt/parastation/mpi2-intel
Intel® Compiler Suite
icc, icpc, ifort
/opt/parastation/mpi2-pgi
PGI: Portland Group
pgcc, pgCC, pgf77,
pgf90
/opt/parastation/mpi2-psc
PathScale Compiler
Suite
pathcc, pathCC,
pathf90
Table 4.2. MPI home directories for different compilers
Users will generally compile their application code using make and select the appropriate wrapper script
in a Makefile as follows:
#
# Makefile
#
MPI_HOME="/opt/parastation/mpi2"
16
ParaStation User's Guide