Visible to Intel only — GUID: GUID-C4393C8E-2B6C-46CA-83C1-616A9F09BC00
Visible to Intel only — GUID: GUID-C4393C8E-2B6C-46CA-83C1-616A9F09BC00
Supported Environment Variables
You can customize your system environment by specifying paths where the compiler searches for certain files such as libraries, include files, configuration files, and certain settings.
Compiler Compile-Time Environment Variables
The following table shows the compile-time environment variables that affect the compiler:
Compile-Time Environment Variable |
Description |
---|---|
IFORTCFG |
Specifies a configuration file that the compiler should use instead of the default configuration file. By default, the compiler uses the default configuration file (ifort.cfg) from the same directory where the compiler executable resides.
NOTE:
On Windows, this environment variable cannot be set from Visual Studio*.
|
INTEL_LICENSE_FILE |
Specifies the location for the Intel license file.
NOTE:
On Windows, this environment variable cannot be set from Visual Studio.
|
__INTEL_PRE_FFLAGS __INTEL_POST_FFLAGS |
Specifies a set of compiler options to add to the compile line. This is an extension to the facility already provided in the compiler configuration file ifort.cfg.
NOTE:
By default, a configuration file named ifort.cfg is used. This file is in the same directory as the compiler executable. To use another configuration file in another location, you can use the IFORTCFG environment variable to assign the directory and file name for the configuration file.
You can insert command line options in the prefix position using __INTEL_PRE_FFLAGS , or in the suffix position using __INTEL_POST_FFLAGS. The command line is built as follows: Syntax:ifort <PRE flags> <flags from configuration file> <flags from the compiler invocation> <POST flags>
NOTE:
The driver issues a warning that the compiler is overriding an option because of an environment variable, but only when you include the option /W5 (Windows) or -w3 (Linux and macOS).
|
INTEL_TARGET_ARCH_IA32 (Linux and Windows) |
Set this environment variable to target 32-bit compilations for all associated tools (this includes the compiler and Intel-specific linker tools). Without this environment variable, you will be required to use the explicit command line options, /Qm32 on Windows and -m32 on Linux, for each compiler invocation.
NOTE:
IA-32 architecture is no longer supported on macOS. IA-32 is deprecated for other operating systems and will be removed in a future release.
|
PATH |
Specifies the directories the system searches for binary executable files.
NOTE:
On Windows, this also affects the search for Dynamic Link Libraries (DLLs).
|
TMP TMPDIR TEMP |
Specifies the location for temporary files. If none of these are specified, or writeable, or found, the compiler stores temporary files in /tmp (Linux, macOS) or the current directory (Windows). The compiler searches for these variables in the following order: TMP, TMPDIR, and TEMP.
NOTE:
On Windows, these environment variables cannot be set from Visual Studio. |
LD_LIBRARY_PATH (Linux) |
Specifies the location for shared objects (.so files). |
DYLD_LIBRARY_PATH (macOS) |
Specifies the path for dynamic libraries. |
INCLUDE (Windows) |
Specifies the directory path for the include files (files included by INCLUDE statements, #include files, RC INCLUDE files1, and module files referenced by USE statements). 1 Files from the Resource Compiler, used to create dialog boxes and other Windows-GUI interfaces. |
LIB (Windows) |
Specifies the directories for all libraries used by the compiler and linker. |
GNU Environment Variables and Extensions | |
CPATH (Linux and macOS) |
Specifies the path for include and module files. |
LIBRARY_PATH (Linux and macOS) |
Specifies the path for libraries to be used during the link phase. |
Compiler Runtime Environment Variables
The Intel® Fortran Compiler runtime system recognizes a number of environment variables. These variables can be used to customize runtime diagnostic error reporting, allow program continuation under certain conditions, disable the display of certain dialog boxes under certain conditions, and allow just-in-time debugging.
Environment variables relating to file I/O are interpreted when the file is opened. Other variables are read when the program starts.
The order of precedence for runtime environment variables is:
OPEN keyword
Environment variable(s)
Command line option
For Fortran runtime environment variables that are boolean (either enabled or disabled), the following tables describe values you can use to enable or disable them. These rules do not apply to environment variables for OpenMP* (OMP_) and their extensions (KMP_), or PGO.
Setting a Runtime Environment Variable to ON or OFF |
Examples |
---|---|
An integer composed entirely of digits other than 0 enables the environment variable. |
1 4938493848 |
A string starting with t or T, y or Y, enables the environment variable. Because you cannot include quotes, or spaces preceding the string, " T" and ' YES' do not work, because both spaces and quotation marks are considered letters. |
T t TRUE TFALSE Y y yes yeti |
Anything that doesn't enable the environment variable disables it. |
0 -1 +1 <no value set> |
The following table summarizes compiler environment variables that are recognized at runtime.
Runtime Environment Variable |
Description |
---|---|
F_UFMTENDIAN |
This variable specifies the numbers of the units to be used for little-endian-to-big-endian conversion purposes. See Environment Variable F_UFMTENDIAN Method. The variable is retrieved once when the first unit is opened, and then checked for every open. |
FOR_COARRAY_CONFIG_FILE (Windows and Linux) |
This variable specifies the coarray configuration file and path to be used at execution time. The variable overrides the value specified by the [Q]coarray-config-file=value qualifier at runtime. |
FOR_COARRAY_DEBUG_STARTUP (Windows and Linux) |
Boolean. When set to TRUE, this variable tells the Fortran runtime library to display the Message Passing Interface (MPI) launcher command that begins the underlying parallel support for coarrays. |
FOR_COARRAY_MPI_VERBOSE (Windows and Linux) |
Boolean. When set to TRUE, this variable tells the Fortran runtime library to pass the '-verbose' qualifier to the MPI support underlying the coarray implementation so that MPI will issue status and activity messages. |
FOR_COARRAY_NUM_IMAGES (Windows and Linux) |
This variable specifies the number of images created for coarrays. The value overrides the value specified by the [Q]coarray-num-images=value qualifier at runtime. If neither is specified, the number of logical processors is used. |
FOR_DUMP_CORE_FILE |
Boolean. This variable must be lowercase for Linux. When set to TRUE, a core dump will be taken when any severe Intel® Fortran runtime error occurs. Default: FALSE decfort_dump_flag is an alternate spelling for FOR_DUMP_CORE_FILE |
FOR_FASTMEM_NORETRY |
Boolean. When set to TRUE, this variable specifies that if an allocation from FASTMEM fails because either the libmemkind library is not linked into the executable or HBW memory is not available on the node then the runtime will report the failure to the user via STAT= or ERRMSG= or aborting the program with the appropriate error message. The variable is retrieved once at program initialization, and checked for each FASTMEM memory allocation. Default: TRUE |
FOR_FASTMEM_RETRY |
Boolean. When set to TRUE, this variable specifies that if an allocation from FASTMEM fails because either the libmemkind library is not linked into the executable or HBW memory is not available on the node then memory will be allocated from the default memory allocator for that platform. The variable is retrieved once at program initialization, and checked for each FASTMEM memory allocation. Default: FALSE |
FOR_FASTMEM_RETRY_WARN |
Boolean. When set to TRUE, this variable specifies that if an allocation from FASTMEM fails because either the libmemkind library is not linked into the executable or HBW memory is not available on the node then a warning message will be issued to stdout and memory will be allocated from the default memory allocator for that platform. The variable is retrieved once at program initialization, and checked for each FASTMEM memory allocation. Default: FALSE |
FOR_FMT_TERMINATOR |
This variable specifies the numbers of the units to have a specific record terminator. See Record Types. The variable is retrieved once when the first unit is opened, and then checked for every open. |
FORT_FMT_NO_WRAP_MARGIN |
Boolean. When set to TRUE, disables column wrapping in Fortran list-directed output when the record being written is longer than 80 characters.
NOTE:
There is no environment variable to set a value for the right margin, this only disables wrapping. The RECL= open specifier can be used to set the right margin when the unit is opened. Default: FALSE (Wrap margin) |
FOR_ACCEPT |
The ACCEPT statement does not include an explicit logical unit number. Instead, it uses an implicit internal logical unit number and the FOR_ACCEPT environment variable. If FOR_ACCEPT is not defined, the code ACCEPT f,iolist reads from standard input. If FOR_ACCEPT is defined (as a file name optionally containing a path), the specified file would be read. |
FOR_DEBUGGER_IS_PRESENT |
Boolean. When set to TRUE, this variable tells the Fortran runtime library that your program is executing under a debugger, and generates debug exceptions whenever severe or continuable errors are detected. Under normal conditions, this variable can be extracted from the operating system for Windows.
User-convenience feature:
If the user sets this environment variable to a TRUE value (such as 1) on Windows and the user's program executes an ERROR STOP statement, the Windows system function __debugbreak will be called and will bring up the Windows debugger (if it is really present). The user can use the debugger to look at the state of the application, and any step or continue command will continue the ERROR STOP process and terminate the application. On Linux and macOS, this variable must be set for debug exceptions. Setting this variable to TRUE when a program is not executing under a debugger causes unpredictable behavior. Default: FALSE |
FOR_DEFAULT_PRINT_DEVICE (Windows) |
This variable lets you specify the print device other than the default print device PRN (LPT1) for files closed (CLOSE statement) with the DISPOSE='PRINT' specifier. To specify a different print device for the file associated with the CLOSE statement DISPOSE='PRINT' specifier, set FOR_DEFAULT_PRINT_DEVICE to any legal spooled print device before executing the program. It can also be used for the PRINT settings in the OPEN: DISPOSE specifier. |
FOR_DIAGNOSTIC_LOG_FILE |
If this variable is set to the name of a file, diagnostic output is written to the specified file. The Fortran runtime system attempts to open that file (append output) and write the error information (ASCII text) to the file. Because the setting of FOR_DIAGNOSTIC_LOG_FILE is independent of FOR_DISABLE_DIAGNOSTIC_DISPLAY, you can disable the screen display of information but still capture the error information in a file. Because the text string you assign for the file name is used literally, you must specify the full name. If the file open fails, no error is reported and the runtime system continues diagnostic processing. See also Locating Runtime Errors and Traceback. |
FOR_DISABLE_DIAGNOSTIC_DISPLAY |
Boolean. When set to TRUE, this variable disables the display of all error information. This variable is helpful if you just want to test the error status of your program and do not want the Fortran runtime system to display any information about an abnormal program termination. See also Traceback. |
FOR_DISABLE_KMP_MALLOC |
Boolean. When set to TRUE, this variable forces Fortran allocate statements to resolve to glibc malloc. Default: FALSE |
FOR_FORCE_STACK_TRACE |
Boolean. When set to TRUE, this variable forces a traceback to follow any runtime diagnostic message. If FOR_DISABLE_STACK_TRACE is also set, FOR_FORCE_STACK_TRACE takes precedence over FOR_DISABLE_STACK_TRACE . Default: FALSE |
FOR_DISABLE_STACK_TRACE |
Boolean. When set to TRUE, this variable disables the call stack trace information that typically follows the displayed severe error message text. The Fortran runtime error message is displayed regardless of whether FOR_DISABLE_STACK_TRACE is set to TRUE. If the program is executing under a debugger, the automatic output of the stack trace information by the Fortran library will be disabled to reduce noise. Use the debugger's stack trace facility to view the stack trace. Default: FALSE See also Locating Runtime Errors and Traceback. |
FOR_IGNORE_EXCEPTIONS |
Boolean. When set to TRUE, this variable disables default runtime exception handling to allow, for example, just-in-time debugging. The runtime system exception handler returns EXCEPTION_CONTINUE_SEARCH to the operating system, which looks for other handlers to service the exception. Default: FALSE |
FOR_NOERROR_DIALOGS |
Boolean. When set to TRUE, this variable disables the display of dialog boxes when certain exceptions or errors occur. This is useful when running many test programs in batch mode to prevent a failure from stopping execution of the entire test stream. Default: FALSE |
FOR_PRINT |
Neither the PRINT statement nor a WRITE statement with an asterisk (*) in place of a unit number includes an explicit logical unit number. Instead, both use an implicit internal logical unit number and the FOR_PRINT environment variable. If FOR_PRINT is not defined, the code PRINT f,iolist or WRITE (*,f) iolist writes to standard output. If FOR_PRINT is defined (as a file name optionally containing a path), the specified file would be written to. |
FOR_READ |
A READ statement that uses an asterisk (*) in place of a unit number does not include an explicit logical unit number. Instead, it uses an implicit internal logical unit number and the FOR_READ environment variable. If FOR_READ is not defined, the code READ (*,f) iolist or READ f,iolist reads from standard input. If FOR_READ is defined (as a file name optionally containing a path), the specified file would be read. |
FOR_TYPE |
The TYPE statement does not include an explicit logical unit number. Instead, it uses an implicit internal logical unit number and the FOR_TYPE environment variable. If FOR_TYPE is not defined, the code TYPE f,iolist writes to standard output. If FOR_TYPE is defined (as a file name optionally containing a path), the specified file would be written to. |
FORT_BLOCKSIZE |
Specifies the default BLOCKSIZE value to be used when BLOCKSIZE= is omitted on the OPEN statement. Valid values are 0 to 2147467264. Sizes are rounded up to the next 512-byte boundary. This variable applies to all Fortran I/O units except stderr, which is never buffered. The variable is retrieved once at program initialization, and checked for each unit open. |
FORT_BUFFERCOUNT |
Specifies the default BUFFERCOUNT value to be used when BUFFERCOUNT= is omitted on the OPEN statement. Valid values are 0 to 127. If set to 0, the default value of 1 is used. This variable applies to all Fortran I/O units except stdout (units * and 6) and stderr. The variable is retrieved once at program initialization, and checked for each unit open. |
FORT_BUFFERED |
Boolean. When set to TRUE, this variable specifies that buffered I/O should be used at runtime for input and output on all Fortran I/O units, except stdout (units * and 6). Output to stderr is never buffered. Default: FALSE |
FORT_BUFFERING_THRESHOLD=n |
Specifies dynamic buffering for unformatted sequential READ operations:
|
FORT_CONVERTn |
Specifies the data format for an unformatted file associated with a particular unit number (n), as described in Specify the Data Format. |
FORT_CONVERT.ext and FORT_CONVERT_ext |
Specifies the data format for unformatted files with a particular file extension suffix (.ext), as described in Specify the Data Format. |
FORT_FMT_RECL |
Specifies the default record length (normally 132 bytes) for formatted files. The variable is retrieved once at program initialization, and checked for each unit open. |
FORT_UFMT_RECL |
Specifies the default record length (normally 2040 bytes) for unformatted files. The variable is retrieved once at program initialization, and checked for each unit open. |
FORTn |
Specifies the file name for a particular unit number n, when a file name is not specified in the OPEN statement or an implicit OPEN is used, and the compiler option fpscomp with option keyword filesfromcmd was not specified. Preconnected files attached to units 0, 5, and 6 are associated with system standard I/O files by default. |
INTEL_CHKP_REPORT_MODE (Linux) |
Changes the pointer checker reporting mode at runtime. |
INTEL_ISA_DISABLE |
Causes named features (in a comma-separated list) not to be visible on the host even if the CPUID reports that it has them onboard. |
NLSPATH (Linux and macOS) |
Specifies the path for the Intel® Fortran runtime error message catalog. |
TBK_ENABLE_VERBOSE_STACK_TRACE |
Boolean. When set to TRUE, traceback output displays more detailed call stack information in the event of an error. The default brief output is usually sufficient to determine where an error occurred. Brief output includes up to twenty stack frames, reported one line per stack frame. For each frame, the image name containing the PC, routine name, line number, and source file are given. The verbose output, if selected, will provide the exception context record (in addition to the information in brief output) if the error was a machine exception (machine register dump), and for each frame, the return address, frame pointer and stack pointer and possible parameters to the routine. This output can be quite long (limited to 16K bytes) and use of the environment variable FOR_DIAGNOSTIC_LOG_FILE is recommended if you want to capture the output accurately. Most situations should not require the use of verbose output. Default: FALSE See also Locating Runtime Errors and Traceback. |
TBK_FULL_SRC_FILE_SPEC |
Boolean. When set to TRUE, traceback output displays complete file name information including the path. By default, the traceback output displays only the file name and extension in the source file field. Default: FALSE See also Locating Runtime Errors and Traceback. |
FORT_TMPDIR TMP TMPDIR TEMP |
Specifies an alternate working directory where scratch files are created. |
GNU extensions (recognized by the Intel OpenMP* compatibility library) | |
GOMP_CPU_AFFINITY (Linux) |
GNU extension recognized by the Intel OpenMP compatibility library. Specifies a list of OS processor IDs. You must set this environment variable before the first parallel region or before certain API calls including omp_get_max_threads(), omp_get_num_procs() and any affinity API calls. For detailed information on this environment variable, see Thread Affinity Interface. Default: Affinity is disabled |
GOMP_STACKSIZE (Linux) |
GNU extension recognized by the Intel OpenMP compatibility library. Same as OMP_STACKSIZE.KMP_STACKSIZE overrides GOMP_STACKSIZE, which overrides OMP_STACKSIZE. Default: See the description for OMP_STACKSIZE. |
OpenMP Environment Variables (OMP_) and Extensions (KMP_) | |
OMP_CANCELLATION |
Activates cancellation of the innermost enclosing region of the type specified. If set to TRUE, the effects of the cancel construct and of cancellation points are enabled and cancellation is activated. If set to FALSE, cancellation is disabled and the cancel construct and cancellation points are effectively ignored.
NOTE:
Internal barrier code will work differently depending on whether the cancellation is enabled. Barrier code should repeatedly check the global flag to figure out if the cancellation had been triggered. If a thread observes the cancellation it should leave the barrier prematurely with the return value 1 (may wake up other threads). Otherwise, it should leave the barrier with the return value 0. Enables (TRUE) or disables (FALSE) cancellation of the innermost enclosing region of the type specified. Default: FALSE Example: OMP_CANCELLATION=TRUE |
OMP_DISPLAY_ENV |
Enables (TRUE) or disables (FALSE) the printing to stderr of the OpenMP version number and the values associated with the OpenMP environment variable. Possible values are: TRUE, FALSE, or VERBOSE. Default: FALSE Example: OMP_DISPLAY_ENV=TRUE |
OMP_DEFAULT_DEVICE |
Sets the device that will be used in a target region. The OpenMP routine omp_set_default_device or a device clause in a target directive can override this variable. If no device with the specified device number exists, the code is executed on the host. If this environment variable is not set, device number 0 is used. |
OMP_DYNAMIC |
Enables (TRUE) or disables (FALSE) the dynamic adjustment of the number of threads. Default: FALSE Example: OMP_DYNAMIC=TRUE |
OMP_MAX_ACTIVE_LEVELS |
The maximum number of levels of parallel nesting for the program. Possible values: Non-negative integer. Default: 1 |
OMP_NESTED |
Deprecated; use OMP_MAX_ACTIVE_LEVELS instead. |
OMP_NUM_THREADS |
Sets the maximum number of threads to use for OpenMP parallel regions if no other value is specified in the application. The value can be a single integer, in which case it specifies the number of threads for all parallel regions. The value can also be a comma-separated list of integers, in which case each integer specifies the number of threads for a parallel region at a nesting level. The first position in the list represents the outer-most parallel nesting level, the second position represents the next-inner parallel nesting level, and so on. At any level, the integer can be left out of the list. If the first integer in a list is left out, it implies the normal default value for threads is used at the outer-most level. If the integer is left out of any other level, the number of threads for that level is inherited from the previous level. This environment variable applies to the options Qopenmp (Windows) or qopenmp (Linux and macOS), and Qparallel (Windows) or parallel (Linux and macOS. Default: The number of processors visible to the operating system on which the program is executed. Syntax: OMP_NUM_THREADS=value[,value]* |
OMP_PLACES |
Specifies an explicit ordered list of places, either as an abstract name describing a set of places or as an explicit list of places described by nonnegative numbers. An exclusion operator “!” can also be used to exclude the number or place immediately following the operator. For explicit lists, the meaning of the numbers and how the numbering is done for a list of nonnegative numbers are implementation defined. Generally, the numbers represent the smallest unit of execution exposed by the execution environment, typically a hardware thread. Intervals can be specified using the <lower-bound> : <length> : <stride> notation to represent the following list of numbers: "<lower-bound>, <lower-bound> + <stride>, ..., <lower-bound> +(<length>-1)*<stride>."When <stride> is omitted, a unit stride is assumed. Intervals can specify numbers within a place as well as sequences of places. # EXPLICIT LIST EXAMPLE setenv OMP_PLACES "{0,1,2,3},{4,5,6,7},{8,9,10,11},{12,13,14,15}" setenv OMP_PLACES "{0:4},{4:4},{8:4},{12:4}" setenv OMP_PLACES "{0:4}:4:4" The abstract names listed below should be understood by the execution and runtime environment:
When requesting fewer places or more resources than available on the system, the determination of which resources of type abstract_name are to be included in the place list is implementation-defined. The precise definitions of the abstract names are implementation defined. An implementation may also add abstract names as appropriate for the target platform. The abstract name may be appended by a positive number in parentheses to denote the length of the place list to be created, that is abstract_name(num-places). # ABSTRACT NAMES EXAMPLE setenv OMP_PLACES threads setenv OMP_PLACES threads(4)
NOTE:
If any numerical values cannot be mapped to a processor on the target platform the behavior is implementation-defined. The behavior is also implementation-defined when the OMP_PLACES environment variable is defined using an abstract name. |
OMP_PROC_BIND (Windows, Linux) |
Sets the thread affinity policy to be used for parallel regions at the corresponding nested level. Enables (TRUE) or disables (FALSE) the binding of threads to processor contexts. If enabled, this is the same as specifying KMP_AFFINITY=scatter. If disabled, this is the same as specifying KMP_AFFINITY=none. Acceptable values: TRUE, FALSE, or a comma separated list, each element of which is one of the following values: PRIMARY, MASTER (deprecated), CLOSE, SPREAD. Default: FALSE If set to FALSE, the execution environment may move OpenMP threads between OpenMP places, thread affinity is disabled, and proc_bind clauses on parallel constructs are ignored. Otherwise, the execution environment should not move OpenMP threads between OpenMP places, thread affinity is enabled, and the initial thread is bound to the first place in the OpenMP place list. If set to PRIMARY, all threads are bound to the same place as the primary thread. If set to CLOSE, threads are bound to successive places, close to where the primary thread is bound. If set to SPREAD, the primary thread's partition is subdivided and threads are bound to single place successive sub-partitions.
NOTE:
KMP_AFFINITY takes precedence over GOMP_CPU_AFFINITY and OMP_PROC_BIND. GOMP_CPU_AFFINITY takes precedence over OMP_PROC_BIND. |
OMP_SCHEDULE |
Sets the runtime schedule type and an optional chunk size. Default: static, no chunk size specified Example syntax: OMP_SCHEDULE="[modifier:]kind[,chunk_size]" where
NOTE:
Some environment variables are available for both Intel® microprocessors and non-Intel microprocessors, but may perform additional optimizations for Intel® microprocessors than for non-Intel microprocessors. |
OMP_STACKSIZE |
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 to specify byte units: B (bytes), K (Kilobytes), M (Megabytes), G (Gigabytes), or T (Terabytes) to specify the units. If you specify a value without a suffix, the byte unit is assumed to be K (Kilobytes). This variable does not affect the native operating system threads created by the user program, or the thread executing the sequential part of an OpenMP program or parallel programs created using the option Qparallel (Windows) or parallel (Linux and macOS) . The kmp_{set,get}_stacksize_s() routines set/retrieve the value. The kmp_set_stacksize_s() routine must be called from sequential part, before first parallel region is created. Otherwise, calling kmp_set_stacksize_s() has no effect. Default (IA-32 architecture): 2M Default (Intel® 64 architecture): 4M
NOTE:
IA-32 architecture is no longer supported on macOS. IA-32 is deprecated for other operating systems and will be removed in a future release.
Related environment variables: KMP_STACKSIZE (overrides OMP_STACKSIZE). Syntax: OMP_STACKSIZE=value |
OMP_THREAD_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: Qopenmp (Windows) or qopenmp (Linux and macOS), or Qparallel (Windows) or parallel (Linux and macOS) . The omp_get_thread_limit() routine returns the value of the limit. Default: No enforced limit Related environment variable: KMP_ALL_THREADS (overrides OMP_THREAD_LIMIT). Example syntax: OMP_THREAD_LIMIT=value |
OMP_WAIT_POLICY |
Decides whether threads spin (active) or yield (passive) while they are waiting. OMP_WAIT_POLICY=ACTIVE is an alias for KMP_LIBRARY=turnaround, and OMP_WAIT_POLICY=PASSIVE is an alias for KMP_LIBRARY=throughput. Default: Passive Syntax: OMP_WAIT_POLICY=value |
OMP_DISPLAY_AFFINITY |
Instructs the runtime to display formatted affinity information for all OpenMP threads in the parallel region upon entering the first parallel region and when any change occurs in the information accessible by the format specifiers listed in the OMP_AFFINITY_FORMAT entry. Possible values: TRUE or FALSE Default: FALSE |
OMP_AFFINITY_FORMAT |
Defines the format when displaying OpenMP thread affinity information. Possible values are any string with the following format field available:
Default: 'OMP: pid %P tid %i thread %n bound to OS proc set {%A}' |
OMP_MAX_TASK_PRIORITY |
Controls the use of task priorities by setting the initial value. Possible values: Non-negative integer. Default: 0 |
OMP_TOOL |
Controls whether the OpenMP runtime will try to register a first party tool that uses OMPT interface. Possible values: ENABLED or DISABLED. Default: ENABLED
NOTE:
Only the host OpenMP runtime is supported.
|
OMP_TOOL_LIBRARIES |
Sets a list of first-party tool locations that use the OMPT interface. The list enumerates names of dynamically-loadable libraries with OS-specific path separator. Default: Empty
NOTE:
Only the host OpenMP runtime is supported.
|
OMP_TOOL_VERBOSE_INIT |
Controls whether the OpenMP runtime will verbosely log the registration of a tool that uses the OMPT interface. Possible values:
Default:DISABLED
NOTE:
Only the host OpenMP runtime is supported.
|
OMP_DEBUG |
Controls whether the OpenMP runtime collects information that an OMPD library may need to support a tool. Possible values: ENABLED or DISABLED. Default: DISABLED
NOTE:
Only the host OpenMP runtime is supported.
|
OMP_ALLOCATOR |
Specifies the default allocator for allocation calls, directives, and clauses that do not specify an allocator. Default: omp_default_mem_alloc Syntax: <PredefinedMemAllocator> | <PredefinedMemSpace> | <PredefinedMemSpace>:<Traits> Currently supported values for <PredefinedMemAllocator> and <PredefinedMemSpace> :
Additional values are supported if libmemkind is available and there is system support for it:
Refer to the OpenMP specification for more information. |
OMP_NUM_TEAMS |
Sets the maximum number of teams created by a teams construct by setting nteams-var ICV. Possible values: Positive integer. Default: 1 |
OMP_TEAMS_THREAD_LIMIT |
Sets the maximum number of OpenMP threads to use in each team created by a teams construct. Possible values: Positive integer. Default: <NumberOfProcessors> / <nteams-var ICV> |
KMP_AFFINITY (Linux, Windows) |
Enables runtime library to bind threads to physical processing units. You must set this environment variable before the first parallel region, or certain API calls including omp_get_max_threads(), omp_get_num_procs() and any affinity API calls. For detailed information on this environment variable, see Thread Affinity Interface. Default: noverbose,warnings,noreset,respect,granularity=core,none Default (Windows with multiple processor groups): noverbose,warnings,noreset,norespect,granularity=group,compact,0,0
NOTE:
On Windows with multiple processor groups, the norespect affinity modifier is assumed when the process affinity mask equals a single processor group (which is default on Windows). Otherwise, the respect affinity modifier is used.
|
KMP_ALL_THREADS |
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, then the program may abort with an error message. If this limit is reached at the time an OpenMP parallel region begins, a one-time warning message may be generated indicating that the number of threads in the team was reduced, but the program will continue execution. This environment variable is only used for programs compiled with the Qopenmp(Windows) or qopenmp (Linux and macOS) option. Default: No enforced limit. |
KMP_BLOCKTIME |
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. Default: 200 milliseconds Related Environment Variable: KMP_LIBRARY environment variable. |
KMP_CPUINFO_FILE |
Specifies an alternate file name for a file containing the machine topology description. The file must be in the same format as /proc/cpuinfo. Default: None |
KMP_DETERMINISTIC_REDUCTION |
Enables (TRUE) or disables (FALSE) the use of a specific ordering of the reduction operations for implementing the reduction clause for an OpenMP parallel region. This has the effect that, for a given number of threads, in a given parallel region, for a given data set and reduction operation, a floating point reduction done for an OpenMP reduction clause has a consistent floating point result from run to run, since round-off errors are identical.
NOTE:
When compiling, you must set the following flag to ensure correct behavior:
Default: FALSE |
KMP_DYNAMIC_MODE |
Selects the method used to determine the number of threads to use for a parallel region when OMP_DYNAMIC=TRUE. Possible values: (asat | load_balance | thread_limit), where,
Default (IA-32 architecture): load_balance (on all supported OSes) Default (Intel® 64 architecture): load_balance (on all supported OSes)
NOTE:
IA-32 architecture is no longer supported on macOS. IA-32 is deprecated for other operating systems and will be removed in a future release.
|
KMP_HOT_TEAMS_MAX_LEVEL |
Sets the maximum nested level to which teams of threads will be hot.
NOTE:
A hot team is a team of threads optimized for faster reuse by subsequent parallel regions. In a hot team, threads are kept ready for execution of the next parallel region, in contrast to the cold team, which is freed after each parallel region, with its threads going into a common pool of threads. For values of 2 and above, nested parallelism should be enabled. Default: 1 |
KMP_HOT_TEAMS_MODE |
Specifies the runtime behavior when the number of threads in a hot team is reduced. Possible values:
Default: 0 |
KMP_HW_SUBSET |
Specifies the subset of available hardware resources for the hardware topology hierarchy. The subset is specified in terms of number of units per upper layer unit starting from top layer downwards. For example, it can specify the number of sockets (top layer units), cores per socket, and the threads per core, to use with an OpenMP application. It is a convenient alternative to writing complicated explicit affinity settings or a limiting process affinity mask. You can also specify an offset value to set which resources to use. When available, you can specify attributes to select different subsets of resources. An extended syntax is available when KMP_TOPOLOGY_METHOD=hwloc. Depending on what resources are detected, you may be able to specify additional resources, such as NUMA nodes and groups of hardware resources that share certain cache levels. Basic syntax: [num_units]ID[@offset][:attribute] [,[num_units]ID[@offset][:attribute]...] where
NOTE:
The hardware cache can be specified as a unit, for example L2 for L2 cache, or LL for last level cache.
Extended syntax when KMP_TOPOLOGY_METHOD=hwloc: Additional IDs can be specified if detected. For example:
When any numa or tile units are specified in KMP_HW_SUBSET, the KMP_TOPOLOGY_METHOD will be automatically set to hwloc,so there is no need to set it explicitly. If you don't specify one or more types of resource, such as socket or thread, all available resources of that type are used. The runtime library prints a warning, and the setting of KMP_HW_SUBSET is ignored if:
This variable does not work if the OpenMP affinity is set to disabled. Default: If omitted, the default value is to use all the available hardware resources. Examples:
To see the result of the setting, you can specify the verbose modifier in for the KMP_AFFINITY environment variable. The OpenMP runtime library will output to stderr stream the information about discovered HW topology before and after the KMP_HW_SUBSET setting was applied. For example, on Intel® Xeon Phi™ 7210 CPU in SNC-4 Clustering Mode, the setting KMP_AFFINITY=verbose KMP_HW_SUBSET=1N,1L2,1L1,1T outputs various verbose information to stderr, including the following lines about discovered HW topology before and after KMP_HW_SUBSET was applied:
|
KMP_INHERIT_FP_CONTROL |
Enables (TRUE) or disables (FALSE) the copying of the floating-point control settings of the primary thread to the floating-point control settings of the OpenMP worker threads at the start of each parallel region. Default: TRUE |
KMP_LIBRARY |
Selects the OpenMP runtime library execution mode. The values for this variable are serial, turnaround, or throughput. Default: throughput |
KMP_PLACE_THREADS |
Deprecated; use KMP_HW_SUBSET instead. |
KMP_SETTINGS |
Enables (TRUE) or disables (FALSE) the printing of OpenMP runtime library environment variables during program execution. Two lists of variables are printed: user-defined environment variables settings and effective values of variables used by OpenMP runtime library. Default: FALSE |
KMP_STACKSIZE |
Sets the number of bytes to allocate for each OpenMP thread to use as its private stack. Recommended size is 16m. Use the optional suffixes to specify byte units: B (bytes), K (Kilobytes), M (Megabytes), G (Gigabytes), or T (Terabytes) to specify the units. If you specify a value without a suffix, the byte unit is assumed to be K (Kilobytes). 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 the option Qparallel (Windows) or parallel (Linux and macOS) . KMP_STACKSIZE overrides GOMP_STACKSIZE, which overrides OMP_STACKSIZE. Default (IA-32 architecture): 2m Default (Intel® 64 architecture): 4m
NOTE:
IA-32 architecture is no longer supported on macOS. IA-32 is deprecated for other operating systems and will be removed in a future release.
|
KMP_TOPOLOGY_METHOD |
Forces OpenMP to use a particular machine topology modeling method. Possible values are:
Default: all |
KMP_USER_LEVEL_MWAIT |
Enables (TRUE) or disables (FALSE) the use of user-level mwait as alternative to putting waiting threads to sleep, if available, either from ring3 or WAITPKG. Default: FALSE |
KMP_VERSION |
Enables (TRUE) or disables (FALSE) the printing of OpenMP runtime library version information during program execution. Default: FALSE |
KMP_WARNINGS |
Enables (TRUE) or disables (FALSE) displaying warnings from the OpenMP runtime library during program execution. Default: TRUE |
OpenMP Offload Environment Variables (OMP_, LIBOMPTARGET) This feature is only available for ifx. |
|
OMP_TARGET_OFFLOAD |
Controls the program behavior when offloading a target region. Possible values:
Default: DEFAULT |
LIBOMPTARGET_DEBUG |
Controls whether debugging information will be displayed from the offload runtime. Possible values:
Default: 0 |
LIBOMPTARGET_INFO |
Controls whether basic offloading information will be displayed from the offload runtime. Possible values:
Default: 0 |
LIBOMPTARGET_PLUGIN |
Specifies which offload plugin is used when offloading a target region. Possible values:
Default: LEVEL_ZERO |
LIBOMPTARGET_DEVICETYPE |
Selects device type to which a target region is offloaded. Possible values:
Offload plugin support for device type:
Default: GPU |
LIBOMPTARGET_PLUGIN_PROFILE |
Enables basic plugin profiling and displays the result when program finishes. Default: Disabled Syntax: <Value>[,usec], where <Value>=1 | T | t The unit of reported time is microsecond if “,usec” is appended, millisecond otherwise. |
LIBOMPTARGET_DYNAMIC_MEMORY_SIZE |
Sets the size of preallocated memory in MB to service malloc calls on the device. Currently, calls to free memory on the device do not release memory. All the allocated memory is released only when the program exits. Possible values: Non-negative integer. Default: 0 |
OpenMP Offload Environment Variables for Level Zero Offload Plugin This feature is only available for ifx. |
|
LIBOMPTARGET_LEVEL0_COMPILATION_OPTIONS |
Passes extra build options when building native target program binaries. Possible values: Valid Level Zero build options. |
LIBOMPTARGET_DEVICES |
Controls how subdevices or sub-subdevices are exposed to users if device supports subdevices. Possible values:
Default: DEVICE |
LIBOMPTARGET_LEVEL0_MEMORY_POOL |
Controls memory pool configuration. Possible values:
Examples:
Default: all,1,4,256 |
LIBOMPTARGET_LEVEL0_USE_COPY_ENGINE |
Disables use of copy engine for memory transfers. Possible values:
Default: Enabled |
LIBOMPTARGET_LEVEL0_DEFAULT_TARGET_MEM |
Selects memory type returned by the omp_target_alloc routine. Possible values:
Default: DEVICE |
LIBOMPTARGET_LEVEL0_STAGING_BUFFER_SIZE |
Sets the staging buffer size in KB that is used in data transfer between host and device. Possible values: Non-negative integers where 0 disables use of staging buffer. Default: 4 |
OpenMP Offload Environment Variables for OpenCL Offload Plugin This feature is only available for ifx. |
|
LIBOMPTARGET_OPENCL_COMPILATION_OPTIONS |
Passes extra compilation options when compiling target programs from SPIRV target images. Possible values: Valid OpenCL compilation options. |
LIBOMPTARGET_OPENCL_LINKING_OPTIONS |
Passes extra linking options when linking target programs. Possible values: Valid OpenCL linking options. |
LIBOMPTARGET_OPENCL_USE_SVM |
Enables or disables using OpenCL SVM memory for default target memory type. Possible values:
Default: Disabled |
LIBOMPTARGET_OPENCL_DATA_TRANSFER_METHOD |
Selects memory transfer method to use. This is only effective when OpenCL SVM memory is enabled by setting LIBOMPTARGET_OPENCL_USE_SVM. Possible values:
Default: 1 |
Profile Guided Optimization (PGO_) Environment Variables |
|
INTEL_PROF_DUMP_CUMULATIVE |
When using interval profile dumping (initiated by INTEL_PROF_DUMP_INTERVAL or the function _PGOPTI_Set_Interval_Prof_Dump) during the execution of an instrumented user application, allows creation of a single .dyn file to contain profiling information instead of multiple .dyn files. If not set, executing an instrumented user application creates a new .dyn file for each interval. Setting this environment variable is useful for applications that do not terminate or those that terminate abnormally (bypass the normal exit code). |
INTEL_PROF_DUMP_INTERVAL |
Initiates interval profile dumping in an instrumented user application. This environment variable may be used to initiate Interval Profile Dumping in an instrumented application. |
INTEL_PROF_DYN_PREFIX |
Specifies the prefix to be used for the .dyn filename to distinguish it from the other .dyn files dumped by other PGO runs. Executing the instrumented application generates a .dyn filename as follows: <prefix>_<timestamp>_<pid>.dyn, where <prefix> is the identifier that you have specified.
NOTE:
The value specified in this environment variable must not contain < > : " / \ | ? * characters. The default naming scheme is used if an invalid prefix is specified. |
PROF_DIR |
Specifies the directory where profiling files (files with extensions .dyn, .dpi, .spi and so on) are stored. The default is to store the .dyn files in the source directory of the file containing the first executed instrumented routine in the binary compiled with [Q]prof-gen option. This variable applies to all three phases of the profiling process:
|
PROF_DPI |
Name for the .dpi file. Default: pgopti.dpi |
PROF_DUMP_INTERVAL |
Deprecated; use INTEL_PROF_DUMP_INTERVAL instead. |
PROF_NO_CLOBBER |
Alters the feedback compilation phase slightly. By default, during the feedback compilation phase, the compiler merges data from all dynamic information files and creates a new pgopti.dpi file if the .dyn files are newer than an existing pgopti.dpi file. When this variable is set, the compiler does not overwrite the existing pgopti.dpi file. Instead, the compiler issues a warning. You must remove the pgopti.dpi file if you want to use additional dynamic information files. |
The following table summarizes CPU environment variables that are recognized at runtime.
Runtime configuration |
Default value |
Description |
---|---|---|
CL_CONFIG_CPU_FORCE_PRIVATE_MEM_SIZE |
32KB |
Forces CL_DEVICE_PRIVATE_MEM_SIZE for the CPU device to be the given value. The value must include the unit; for example: 8MB, 8192KB, 8388608B.
NOTE:
You must compile your host application with sufficient stack size.
|
CL_CONFIG_CPU_FORCE_LOCAL_MEM_SIZE |
32KB |
Forces CL_DEVICE_LOCAL_MEM_SIZE for CPU device to be the given value. The value needs to be set with size including units, examples: 8MB, 8192KB, 8388608B.
NOTE:
You must compile your host application with sufficient stack size. Our recommendation is to set the stack size equal to twice the local memory size to cover possible application and OpenCL Runtime overheads.
|
CL_CONFIG_CPU_EXPENSIVE_MEM_OPT |
0 |
A bitmap indicating enabled expensive memory optimizations. These optimizations may lead to more JIT compilation time, but give some performance benefit.
NOTE:
Currently, only the least significant bit is available.
Available bits:
|
CL_CONFIG_CPU_STREAMING_ALWAYS |
False |
Controls whether non-temporal instructions are used. |