OMP_PROC_BIND – Whether theads may be moved between CPUs#
- Description:
Specifies whether threads may be moved between processors. If set to
TRUE
, OpenMP theads should not be moved; if set toFALSE
they may be moved. Alternatively, a comma separated list with the valuesPRIMARY
,MASTER
,CLOSE
andSPREAD
can be used to specify the thread affinity policy for the corresponding nesting level. WithPRIMARY
andMASTER
the worker threads are in the same place partition as the primary thread. WithCLOSE
those are kept close to the primary thread in contiguous place partitions. And withSPREAD
a sparse distribution across the place partitions is used. Specifying more than one item in the list will automatically enable nesting by default.When undefined,
OMP_PROC_BIND
defaults toTRUE
whenOMP_PLACES
orGOMP_CPU_AFFINITY
is set andFALSE
otherwise.- See also:
omp_get_proc_bind – Whether theads may be moved between CPUs, GOMP_CPU_AFFINITY – Bind threads to specific CPUs, OMP_NESTED – Nested parallel regions, OMP_PLACES – Specifies on which CPUs the theads should be placed
- Reference:
OpenMP specification v4.5, Section 4.4