HOME
| OPENMP API Specification: Version 5.1 November 2020

2.4.2  ICV Initialization

Table 2.1 shows the ICVs, associated environment variables, and initial values.


Table 2.1: ICV Initial Values



ICV Environment Variable Initial value



dyn-var OMP_DYNAMIC See description below
nthreads-var OMP_NUM_THREADS Implementation defined
run-sched-var OMP_SCHEDULE Implementation defined
def-sched-var (none) Implementation defined
bind-var OMP_PROC_BIND Implementation defined
stacksize-var OMP_STACKSIZE Implementation defined
wait-policy-var OMP_WAIT_POLICY Implementation defined
thread-limit-var OMP_THREAD_LIMIT Implementation defined
max-active-levels-var OMP_MAX_ACTIVE_LEVELS, OMP_NESTED, OMP_NUM_THREADS, OMP_PROC_BIND Implementation defined
active-levels-var (none) zero
levels-var (none) zero
place-partition-var OMP_PLACES Implementation defined
cancel-var OMP_CANCELLATION false
display-affinity-var OMP_DISPLAY_AFFINITY false
affinity-format-var OMP_AFFINITY_FORMAT Implementation defined
default-device-var OMP_DEFAULT_DEVICE Implementation defined
target-offload-var OMP_TARGET_OFFLOAD DEFAULT
max-task-priority-var OMP_MAX_TASK_PRIORITY zero
tool-var OMP_TOOL enabled
tool-libraries-var OMP_TOOL_LIBRARIES empty string
tool-verbose-init-var OMP_TOOL_VERBOSE_INIT disabled
debug-var OMP_DEBUG disabled
num-procs-var (none) Implementation defined
thread-num-var (none) zero
final-task-var (none) false
implicit-task-var (none) true
team-size-var (none) one
def-allocator-var OMP_ALLOCATOR Implementation defined
nteams-var OMP_NUM_TEAMS zero
teams-thread-limit-var OMP_TEAMS_THREAD_LIMIT zero



Each ICV that does not have global scope (see Table 2.3) has a set of device-specific environment variables that extend the variables defined in Table 2.1 with the following syntax:

<ENVIRONMENT VARIABLE>_DEV[_<device>]

where <ENVIRONMENT VARIABLE> is one of the variables from Table 2.1 and <device> is the device number as specified in the device clause (see Section 2.14).

Description

The host and non-host device ICVs are initialized before any OpenMP API construct or OpenMP API routine executes. After the initial values are assigned, the values of any OpenMP environment variables that were set by the user are read and the associated ICVs are modified accordingly. If no <device> number is specified on the device-specific environment variable then the value is applied to all non-host devices.

Cross References