27.12.2014 Views

QLogic OFED+ Host Software User Guide, Rev. B

QLogic OFED+ Host Software User Guide, Rev. B

QLogic OFED+ Host Software User Guide, Rev. B

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4–Running <strong>QLogic</strong> MPI on <strong>QLogic</strong> Adapters<br />

<strong>QLogic</strong> MPI Details<br />

Table 4-5. PathScale Compiler Suite<br />

Compiler<br />

Command<br />

C mpicc -cc=pathcc .....<br />

C++ mpicc -CC=pathCC .....<br />

Fortran 77 mpif77 -fc=pathf95 .....<br />

Fortran 90/95 mpif90 -f90=pathf95 .....<br />

mpif90 -f95=pathf95 .....<br />

NOTE: pathf95 invokes the Fortran 77,<br />

Fortran 90, and Fortran 95 compilers.<br />

Also, use mpif77, mpif90, or mpif95 for linking; otherwise, .true. may have<br />

the wrong value.<br />

If you are not using the provided scripts for linking, link a sample program using<br />

the -show option as a test (without the actual build) to see what libraries to add to<br />

your link line. Some examples of the using the PGI compilers follow.<br />

For Fortran 90 programs:<br />

$ mpif90 -f90=pgf90 -show pi3f90.f90 -o pi3f90<br />

pgf90 -I/usr/include/mpich/pgi5/x86_64 -c -I/usr/include<br />

pi3f90.f90 -c<br />

pgf90 pi3f90.o -o pi3f90 -lmpichf90 -lmpich -lmpichabiglue_pgi5<br />

Fortran 95 programs will be similar to the above.<br />

For C programs:<br />

$ mpicc -cc=pgcc -show cpi.c<br />

pgcc -c cpi.c<br />

pgcc cpi.o -lmpich -lpgftnrtl -lmpichabiglue_pgi5<br />

Compiler and Linker Variables<br />

When you use environment variables (e.g., $MPICH_CC) to select the compiler<br />

mpicc (and others) will use, the scripts will also set the matching linker variable<br />

(for example, $MPICH_CLINKER), if it is not already set. When both the<br />

environment variable and command line options are used (-cc=gcc), the<br />

command line variable is used.<br />

When both the compiler and linker variables are set, and they do not match for the<br />

compiler you are using, the MPI program may fail to link; or, if it links, it may not<br />

execute correctly. For a sample error message, see “Compiler/Linker Mismatch”<br />

on page F-14.<br />

4-10 D000046-005 B

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!