Product specifications

Table Of Contents
D–Troubleshooting
QLogic MPI Troubleshooting
D-16 IB6054601-00 H
S
Compiling on Development Nodes
If the mpi-devel-* RPM is installed with the --prefix /path/to/devel
option, then mpicc, etc. must be passed in -I/path/to/devel/include for
the compiler to find the MPI include files, as in this example:
$ mpicc myprogram.c -I/path/to/devel/include
If you are using Fortran 90 or Fortran 95, a similar option is needed for the
compiler to find the module files:
$ mpif90 myprogramf90.f90 -I/path/to/devel/include
If the mpi-lib-* RPM is installed on these development nodes with the
--prefix /path/to/libs option, then the compiler needs the
-L/path/to/libs option so it can find the libraries. Here is the example for
mpicc:
$ mpicc myprogram.c -L/path/to/libs/lib (for 32 bit)
$ mpicc myprogram.c -L/path/to/libs/lib64 (for 64 bit)
To find both the include files and the libraries with these non-standard locations,
type:
$ mpicc myprogram.c -I/path/to/devel/include -L/path/to/libs/lib
Specifying the Run-time Library Path
There are several ways to specify the run-time library path so that when the
programs are run, the appropriate libraries are found in the new location. There
are three different ways to do this:
Use the -Wl,-rpath, option when compiling on the development node.
Update the
/etc/ld.so.conf
file on the compute nodes to include the path.
Export the path in the .mpirunrc file.
These methods are explained in more detail in the following paragraphs.
An additional linker option, -Wl,-rpath, supplies the run-time library path when
compiling on the development node. The compiler options now look like this:
$ mpicc myprogram.c -I/path/to/devel/include -L/path/to/libs/lib
-Wl,-rpath,/path/to/libs/lib
The above compiler command ensures that the program will run using this path on
any machine.