OpenMP Environment Variables

This topic describes the standard OpenMP environment variables (with the OMP_ prefix) and Intel-specific environment variables (with the KMP_ prefix) that are Intel extensions to the standard Fortran Compiler .

Standard Environment Variables

Variable

Description

Default

OMP_SCHEDULE

Sets the run-time schedule type and chunk size.

static, no chunk size specified

OMP_NUM_THREADS

Sets the number of threads to use during execution.

Number of processors

OMP_DYNAMIC

Enables (true) or disables (false) the dynamic adjustment of the number of threads.

false

OMP_NESTED

Enables (true) or disables (false)nested parallelism.

false

Intel Extension Environment Variables

Environment Variable

Description

Default

KMP_ALL_THREADS

Sets the maximum number of threads that can be used by any parallel region.

max(32, 4 * OMP_NUM_THREADS,
4 * number of processors)

KMP_BLOCKTIME

Sets the time, in milliseconds, that a thread should wait, after completing the execution of a parallel region, before sleeping.

See also the throughput execution mode and the KMP_LIBRARY environment variable. Use the optional character suffix s, m, h, or d, to specify seconds, minutes, hours, or days.

200 milliseconds

KMP_LIBRARY

Selects the OpenMP run-time library throughput. The options for the variable value are: serial, turnaround, or throughput indicating the execution mode. The default value of throughput is used if this variable is not specified.

throughput
(execution mode)

KMP_MONITOR_STACKSIZE

Sets the number of bytes to allocate for the monitor thread, which is used for book-keeping during program execution. Use the optional suffix b, k, m, g, or t, to specify bytes, kilobytes, megabytes, gigabytes, or terabytes.

max(32k, system minimum thread stack size)

KMP_STACKSIZE

Sets the number of bytes to allocate for each parallel thread to use as its private stack. Use the optional suffix b, k, m, g, or t, to specify bytes, kilobytes, megabytes, gigabytes, or terabytes.

IA-32: 2m
Itanium compiler: 4m

KMP_VERSION

Enables (set) or disables (unset) the printing of OpenMP run-time library version information during program execution.

Disabled