Visible to Intel only — GUID: GUID-14BCF392-CD9F-412B-8EC2-59DC6947C2AD
Environment Variables for Main Thread Pinning
I_MPI_PIN
Turn on/off main thread pinning.
Syntax
I_MPI_PIN=<arg>
Arguments
<arg> | Binary indicator |
enable | yes | on | 1 | Enable main thread pinning. This is the default value. |
disable | no | off | 0 | Disable main thread pinning. |
Description
Set this environment variable to control the main thread pinning feature of the Intel® MPI Library.
I_MPI_PIN_PROCESSOR_LIST
Define a processor subset and the mapping rules for MPI main threads within this subset.
This environment variable is available for both Intel and non-Intel microprocessors, but it may perform additional optimizations for Intel microprocessors than it performs for non-Intel microprocessors.
Syntax Forms
I_MPI_PIN_PROCESSOR_LIST=<value>
The environment variable value has two syntax forms:
- <proclist>
- allcores
Syntax 1: <proclist>
I_MPI_PIN_PROCESSOR_LIST=<proclist>
Arguments
<proclist> | A comma-separated list of logical processor numbers and/or ranges of processors. The main thread with the i-th rank is pinned to the i-th processor in the list. The number should not exceed the number of processors on a node. |
<l> | Processor with logical number <l>. |
<l>-<m> | Range of processors with logical numbers from <l> to <m>. |
<k>,<l>-<m> | Processors <k>, as well as <l> through <m>. |
Syntax 2: allcores
I_MPI_PIN_PROCESSOR_LIST=allcores
Arguments
allcores | All cores (physical CPUs). Specify this subset to define the number of cores on a node. This is the default value. If Intel® Hyper-Threading Technology is disabled, allcores equals to all. |
Examples
To pin the processes to CPU0 and CPU3 on each node globally, use the following command:
$ mpirun -genv I_MPI_PIN_PROCESSOR_LIST=0,3 -n <number-of-processes> <executable>
To pin the processes to different CPUs on each node individually (CPU0 and CPU3 on host1 and CPU0, CPU1 and CPU3 on host2), use the following command:
$ mpirun -host host1 -env I_MPI_PIN_PROCESSOR_LIST=0,3 -n <number-of-processes> <executable> : \ -host host2 -env I_MPI_PIN_PROCESSOR_LIST=1,2,3 -n <number-of-processes> <executable>
To print extra debugging information about process pinning, use the following command:
$ mpirun -genv I_MPI_DEBUG=4 -m -host host1 \ -env I_MPI_PIN_PROCESSOR_LIST=0,3 -n <number-of-processes> <executable> :\ -host host2 -env I_MPI_PIN_PROCESSOR_LIST=1,2,3 -n <number-of-processes> <executable>
Examples
To pin the main thread to CPU0 and CPU3 on each node globally, use the following command:
> mpiexec -genv I_MPI_PIN_PROCESSOR_LIST=0,3 -n <number-of-main-threads> <executable>
To pin the main thread to different CPUs on each node individually (CPU0 and CPU3 on host1 and CPU0, CPU1 and CPU3 on host2), use the following command:
> mpiexec -host host1 -env I_MPI_PIN_PROCESSOR_LIST=0,3 -n <number-of-main-threads> <executable> :^ -host host2 -env I_MPI_PIN_PROCESSOR_LIST=1,2,3 -n <number-of-main-threads> <executable>
To print extra debug information about the main thread pinning, use the following command:
> mpiexec -genv I_MPI_DEBUG=4 -m -host host1 -env I_MPI_PIN_PROCESSOR_LIST=0,3 -n <number-of-main-threads> <executable> :^ -host host2 -env I_MPI_PIN_PROCESSOR_LIST=1,2,3 -n <number-of-main-threads> <executable>