HOME
| OPENMP API Specification: Version 5.0 November 2018

6  Environment Variables

This chapter describes the OpenMP environment variables that specify the settings of the ICVs that affect the execution of OpenMP programs (see Section 2.5 on page 171). The names of the environment variables must be upper case. The values assigned to the environment variables are case insensitive and may have leading and trailing white space. Modifications to the environment variables after the program has started, even if modified by the program itself, are ignored by the OpenMP implementation. However, the settings of some of the ICVs can be modified during the execution of the OpenMP program by the use of the appropriate directive clauses or OpenMP API routines.

The following examples demonstrate how the OpenMP environment variables can be set in different environments:

 
setenv OMP_SCHEDULE "dynamic"  
 
export OMP_SCHEDULE="dynamic"  
 
set OMP_SCHEDULE=dynamic  
 6.1  OMP_SCHEDULE
 6.2  OMP_NUM_THREADS
 6.3  OMP_DYNAMIC
 6.4  OMP_PROC_BIND
 6.5  OMP_PLACES
 6.6  OMP_STACKSIZE
 6.7  OMP_WAIT_POLICY
 6.8  OMP_MAX_ACTIVE_LEVELS
 6.9  OMP_NESTED
 6.10  OMP_THREAD_LIMIT
 6.11  OMP_CANCELLATION
 6.12  OMP_DISPLAY_ENV
 6.13  OMP_DISPLAY_AFFINITY
 6.14  OMP_AFFINITY_FORMAT
 6.15  OMP_DEFAULT_DEVICE
 6.16  OMP_MAX_TASK_PRIORITY
 6.17  OMP_TARGET_OFFLOAD
 6.18  OMP_TOOL
 6.19  OMP_TOOL_LIBRARIES
 6.20  OMP_DEBUG
 6.21  OMP_ALLOCATOR