Difference between revisions of "OpenMPI"
Albensoeder (talk | contribs) (Created page with "The OpenMPI library is an open source implementation for the MPI protocol. == Compiling with OpenMPI == Before compiling [[User environment - The usage of module|load the actual...") |
Albensoeder (talk | contribs) |
||
Line 53: | Line 53: | ||
== Run parallel programs == | == Run parallel programs == | ||
For performance reasons it is important to use the InfiniyBand connectors on FLOW. The InfinyBand will be used by setting the environment variable ''OMPI_MCA_btl'' by | |||
export OMPI_MCA_btl="ib,sm,self" | |||
or by using the ''mpirun'' or ''mpiexec'' command line option | |||
mpirun -mca btl "ib,sm,self" ... | |||
To check if InfinyBand was used one can set the environment variable | |||
export OMPI_MCA_mca_verbose=1 | |||
Revision as of 17:46, 29 November 2012
The OpenMPI library is an open source implementation for the MPI protocol.
Compiling with OpenMPI
Before compiling load the actual module of OpenMPI, e.g.
module load openmpi/1.6.2/gcc/64/4.7.1
The compilation can be done by following wrappers of OpenMPI:
Name | Description |
---|---|
mpicc | C compiler |
mpic++, mpiCC or mpicxx | C++ compiler |
mpif77 | Fortran 77 compiler |
mpif90 | Fortran 90 compiler |
These programs are only wrappers which means that the scripts sets additional flags for OpenMPI (e.g. include path, flags for linking OpenMPI libraries, ...) use other compilers (e.g. GNU compiler, Intel Compiler). The compilers can be choosen by setting environment variables, e.g.
export OMPI_CC=icc
for using the Intel C compiler. Below there is a list of all environment variables for setting the compiler.
Environment variable | Description |
---|---|
OMPI_CC | Set the C compiler |
OMPI_CXX | Sets the C++ compiler |
OMPI_F77 | Sets the Fortran 77 compiler |
OMPI_FC | Sets the Fortran 90 compiler |
Run parallel programs
For performance reasons it is important to use the InfiniyBand connectors on FLOW. The InfinyBand will be used by setting the environment variable OMPI_MCA_btl by
export OMPI_MCA_btl="ib,sm,self"
or by using the mpirun or mpiexec command line option
mpirun -mca btl "ib,sm,self" ...
To check if InfinyBand was used one can set the environment variable
export OMPI_MCA_mca_verbose=1