OMP_PROC_BIND – Whether threads may be moved between CPUs ¶Specifies whether threads may be moved between processors. If set to
TRUE, OpenMP threads should not be moved; if set to FALSE
they may be moved. Alternatively, a comma separated list with the
values PRIMARY, MASTER (deprecated since OpenMP 5.1),
CLOSE and SPREAD can be used to specify the thread affinity
policy for the corresponding nesting level. With PRIMARY and
MASTER the worker threads are in the same place partition as the
primary thread. With CLOSE those are kept close to the primary
thread in contiguous place partitions. And with SPREAD a sparse
distribution across the place partitions is used. Specifying more than
one item in the list automatically enables nesting by default.
When a list is specified, it also affects the max-active-levels-var ICV
as described in OMP_MAX_ACTIVE_LEVELS – Set the maximum number of nested parallel regions.
When undefined, OMP_PROC_BIND defaults to TRUE when
OMP_PLACES or GOMP_CPU_AFFINITY is set and FALSE otherwise.
omp_get_proc_bind – Whether threads may be moved between CPUs, GOMP_CPU_AFFINITY – Bind threads to specific CPUs, OMP_PLACES – Specifies on which CPUs the threads should be placed,
OMP_MAX_ACTIVE_LEVELS – Set the maximum number of nested parallel regions
OpenMP specification v4.5, Section 4.4