HOME
| OPENMP API Specification: Version 5.0 November 2018

6.4  OMP_PROC_BIND

The OMP_PROC_BIND environment variable sets the initial value of the bind-var ICV. The value of this environment variable is either true, false, or a comma separated list of master, close, or spread. The values of the list set the thread affinity policy to be used for parallel regions at the corresponding nested level.

If the environment variable is set to false, the execution environment may move OpenMP threads between OpenMP places, thread affinity is disabled, and proc_bind clauses on parallel constructs are ignored.

Otherwise, the execution environment should not move OpenMP threads between OpenMP places, thread affinity is enabled, and the initial thread is bound to the first place in the OpenMP place list prior to the first active parallel region.

The behavior of the program is implementation defined if the value in the OMP_PROC_BIND environment variable is not true, false, or a comma separated list of master, close, or spread. The behavior is also implementation defined if an initial thread cannot be bound to the first place in the OpenMP place list.

Examples:  

 
setenv OMP_PROC_BIND false 
setenv OMP_PROC_BIND "spread, spread, close"  

Cross References