Q-Logic IB6054601-00 D Switch User Manual


 
3 – Using InfiniPath MPI
InfiniPath MPI Details
IB6054601-00 D 3-9
Q
To use the Intel compiler for Fortran90/Fortran95 programs, use:
$ mpif90 -f90=ifort .....
$ mpif95 -f95=ifort .....
Usage for other compilers will be similar to the examples above, substituting the
options following
-cc, -CC, -f77, -f90, or -f95. Consult the documentation for
specific compilers for more details.
Also, use
mpif77, mpif90, or mpif95 for linking, otherwise you may have problems
with
.true. having the wrong value. If you are not using the provided scripts for
linking, you should link a sample program using the
-show option as a test, to see
what libraries to add to your link line. Some examples follow.
For Fortran90 programs:
$ mpif90 -f90=pgf90 -show pi3f90.f90 -o pi3f90
pgf90 -I/usr/include/mpich/pgi5/x86_64 -c -I/usr/include
pi3f90.f90 -c
pgf90 pi3f90.o -o pi3f90 -lmpichf90 -lmpich -lmpichabiglue_pgi5
Fortran95 programs will be similar to the above.
For C programs:
$ mpicc -cc=pgcc -show cpi.c
pgcc -c cpi.c
pgcc cpi.o -lmpich -lpgftnrtl -lmpichabiglue_pgi5
3.5.3.1
Compiler and Linker Variables
If you use environment variables (e.g., $MPICH_CC) to select which compiler
mpicc, et al. should use, the scripts will also set the matching linker variable (e.g.
$MPICH_CLINKER), if not already set. If both the environment variable and
command line options are used (e.g,
-cc=gcc), the command line variable is used.
If both the compiler and linker variables are set, and they do not match for the
compiler you are using, it is likely that the MPI program will fail to link, or if it links,
it may not execute correctly. For a sample error message, please see section C.8.3
in the Troubleshooting chapter.
3.5.4
Cross-compilation Issues
The 2.x PathScale compilers aren’t currently supported on systems that use the
GNU 4.x compilers and compiler environment (header files and libraries). This
includes Fedora Core 4, Fedora Core 5 and SLES 10. The GNU 4.x environment
will be supported in the PathScale Complier Suite 3.0 release.