The Intel® Compiler supports OpenMP* environment variables (with the OMP_ prefix) and extensions in the form of Intel-specific environment variables (with the KMP_ prefix).
The syntax examples assume bash on Linux* and Mac OS* X. Use the set command for Windows*.
Variable Name |
Default |
Description and Syntax |
---|---|---|
OMP_NUM_THREADS |
Number of processors visible to the operating system. |
Sets the maximum number of threads to use for OpenMP* parallel regions if no other value is specified in the application. This environment variable applies to both -openmp and -parallel (Linux and Mac OS X) or /Qopenmp and /Qparallel (Windows). Example syntax: export OMP_NUM_THREADS=value |
OMP_SCHEDULE |
STATIC, no chunk size specified |
Sets the run-time schedule type and an optional chunk size. Example syntax: export OMP_SCHEDULE="kind[,chunk_size]" |
OMP_DYNAMIC |
.FALSE. |
Enables (.TRUE.) or disables (.FALSE.) the dynamic adjustment of the number of threads. Example syntax: export OMP_DYNAMIC=value |
OMP_NESTED |
.FALSE. |
Enables (.TRUE.) or disables (.FALSE.)nested parallelism. Example syntax: export OMP_NESTED=value |
Variable Name |
Default |
Description |
---|---|---|
KMP_ALL_THREADS |
No enforced limit |
Limits the number of simultaneously executing threads in an OpenMP* program. If this limit is reached and another native operating system thread encounters OpenMP* API calls or constructs, the program can abort with an error message. If this limit is reached when an OpenMP parallel region begins, a one-time warning message might be generated indicating that the number of threads in the team was reduced, but the program will continue. This environment variable is only used for programs compiled with the following options: -openmp or -openmp-profile (Linux and Mac OS X) and /Qopenmp or /Qopenmp-profile (Windows). |
KMP_BLOCKTIME |
200 milliseconds |
Sets the time, in milliseconds, that a thread should wait, after completing the execution of a parallel region, before sleeping. Use the optional character suffixes: s (seconds), m (minutes), h (hours), or d (days) to specify the units. Specify infinite for an unlimited wait time. See also the throughput execution mode and the KMP_LIBRARY environment variable. |
KMP_LIBRARY |
throughput |
Selects the OpenMP run-time library execution mode. The options for the variable value are throughput, turnaround, and serial. |
KMP_STACKSIZE |
IA-32 architecture: 2m Intel® 64 and IA-64 architectures: 4m |
Sets the number of bytes to allocate for each OpenMP* thread to use as the private stack for the thread. Recommended size is 16m. Use the optional suffixes: b (bytes), k (kilobytes), m (megabytes), g (gigabytes), or t (terabytes) to specify the units. This variable does not affect the native operating system threads created by the user program nor the thread executing the sequential part of an OpenMP* program or parallel programs created using -parallel (Linux and Mac OS X) or /Qparallel (Windows). |
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 suffixes: b (bytes), k (kilobytes), m (megabytes), g (gigabytes), or t (terabytes) to specify the units. |
KMP_VERSION |
.FALSE. |
Enables (.TRUE.) or disables (.FALSE.) the printing of OpenMP run-time library version information during program execution. |
KMP_AFFINITY
|
noverbose, |
Enables run-time library to bind threads to physical processing units. See Thread Affinity Interface for more information on the default and the affect this environment variable has on the parallel environment. |
KMP_CPUINFO_FILE |
none |
Specifies an alternate file name for file containing machine topology description. The file must be in the same format as /proc/cpuinfo. |