Q-Logic IB6054601-00 D Benutzerhandbuch
C – Troubleshooting
InfiniPath MPI Troubleshooting
InfiniPath MPI Troubleshooting
C-16
IB6054601-00 D
Q
For these examples in
below, we assume that these new locations
are:
/path/to/devel (for mpi-devel-*)
/path/to/libs (for mpi-libs-*)
C.8.5
Compiling on Development Nodes
If the
mpi-devel-*
rpm is installed with the
--prefix /path/to/devel
option
then
mpicc
, etc. will need to be passed
-I/path/to/devel/include
in order 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 Fortran90 or Fortran95, a similar option is needed for the compiler
to find the module files:
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 will need to be given 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 64bit)
To find both the include files and the libraries with these non-standard locations, we
would now see an example like this:
would now see an example like this:
$ mpicc myprogram.c -I/path/to/devel/include -L/path/to/libs/lib
C.8.6
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:
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 below.
1. 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:
this:
$ mpicc myprogram.c -I/path/to/devel/include
-L/path/to/libs/lib -Wl,-rpath,/path/to/libs/lib