OpenMP* Environment Variables

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

Standard Environment Variables

Variable

Default

Description

OMP_SCHEDULE

STATIC, no chunk size specified

Sets the run-time schedule type and chunk size.

OMP_NUM_THREADS

Number of processors

Sets the number of threads to use during execution.

OMP_DYNAMIC

.FALSE.

Enables (.TRUE.) or disables (.FALSE.) the dynamic adjustment of the number of threads.

OMP_NESTED

.FALSE.

Enables (.TRUE.) or disables (.FALSE.)nested parallelism.

Intel Extension Environment Variables

Environment Variable

Default

Description

KMP_ALL_THREADS

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

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

KMP_BLOCKTIME

200 milliseconds

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.

KMP_LIBRARY

throughput
(execution mode)

Selects the OpenMP run-time library execution mode.  The options for the variable value are throughputor turnaround.

KMP_MONITOR_STACKSIZE

max(32k, system minimum thread stack size)

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.

KMP_STACKSIZE

2m: IA-32 compiler

4m: ItaniumŪ compiler

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.

KMP_VERSION

Disabled

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