HOME
| OPENMP API Specification: Version 5.0 November 2018

6.7  OMP_WAIT_POLICY

The OMP_WAIT_POLICY environment variable provides a hint to an OpenMP implementation about the desired behavior of waiting threads by setting the wait-policy-var ICV. A compliant OpenMP implementation may or may not abide by the setting of the environment variable.

The value of this environment variable must be one of the following:

ACTIVE | PASSIVE

The ACTIVE value specifies that waiting threads should mostly be active, consuming processor cycles, while waiting. An OpenMP implementation may, for example, make waiting threads spin.

The PASSIVE value specifies that waiting threads should mostly be passive, not consuming processor cycles, while waiting. For example, an OpenMP implementation may make waiting threads yield the processor to other threads or go to sleep.

The details of the ACTIVE and PASSIVE behaviors are implementation defined.

The behavior of the program is implementation defined if the value of OMP_WAIT_POLICY is neither ACTIVE nor PASSIVE.

Examples:  

 
setenv OMP_WAIT_POLICY ACTIVE 
setenv OMP_WAIT_POLICY active 
setenv OMP_WAIT_POLICY PASSIVE 
setenv OMP_WAIT_POLICY passive  

Cross References