User guide

4–Running MPI on QLogic Adapters
Open MPI
4-18 IB0054606-02 A
Environment Variables
Table 4-6 contains a summary of the environment variables that are relevant to
any PSM including Open MPI. Ta ble 4 -7 is more relevant for the MPI programmer
or script writer, because these variables are only active after the mpirun command
has been issued and while the MPI processes are active. Open MPI provides the
environmental variables shown in Tabl e 4-7 that will be defined on every MPI
process. Open MPI guarantees that these variables will remain stable throughout
future releases.
Table 4-6. Environment Variables Relevant for any PSM
Name Description
OMP_NUM_THREADS This variable is used by a compilers’ OpenMP
run-time library.Use this variable to adjust the split
between MPI processes and OpenMP threads.
Usually, the number of MPI processes (per node)
times the number of OpenMP threads will be set
to match the number of CPUs per node. An exam-
ple would be a node with eight CPUs, running two
MPI processes and four
OpenMP threads. In this case,
OMP_NUM_THREADS is set to 4.
OMP_NUM_THREADS is on a per-node basis, so
needs to be propagated to each node used in the
job, in a way that your MPI supports.
PSM_SHAREDCONTEXTS This variable overrides automatic context sharing
behavior. YES is equivalent to 1.
Default: 1
PSM_SHAREDCONTEXTS_MAX This variable restricts the number of IB contexts
that are made available on each node of an MPI
job.
Up to 16 set automatically based on number of
CPUs on node
PSM_DEVICES Set this variable to enable running in shared mem-
ory mode on a single node..
Default: self,ipath