I have a mixed application which uses both MPI and OpenMP* calls. Does the Intel® MPI Library support this type of hybrid functionality?
Yes, Intel MPI does support mixed MPI/OpenMP applications. To make sure your hybrid code runs correctly, follow these steps:
- Use the thread safe version of the Intel MPI Library by using the
-mt_mpicompiler driver option
- Set the
I_MPI_PIN_DOMAINenvironment variable to select the desired process pinning scheme. The recommended setting is
$ export I_MPI_PIN_DOMAIN=omp
This will set the process pinning domain size to be equal to
OMP_NUM_THREADS. Therefore, each MPI process can create
$OMP_NUM_THREADSnumber of children threads for running within the corresponding domain. If
OMP_NUM_THREADSis not set, each node is treated as a separate domain (which will allow as many threads per MPI processes as there are cores).
NOTE: In order to pin OpenMP threads inside the domain, use the corresponding OpenMP feature by setting the
- See the “Interoperability with OpenMP*” section in the Intel® MPI Library for Linux* Reference Manual for more details