Setting Environment Variables

You can customize your system environment by specifying paths where the compiler searches for special files such as libraries, include files, and configuration files. The Intel® C++ Compiler supports the environment variables listed in the following table:

Environment
Variable
Description
GXX_INCLUDE Specifies the location of the gcc headers. Set this variable only when the compiler cannot locate the gcc headers when using the -gcc-name option.
GXX_ROOT Specifies the location of the gcc binaries. Set this variable only when the compiler cannot locate the gcc binaries when using the -gcc-name option.
IA32ROOT (IA-32 architecture and Intel® 64 architecture) Points to the directories containing the include and library files for a non-standard installation structure.
IA64ROOT (IA-64 architecture based systems) Points to the directories containing the include and library files for a non-standard installation structure.
ICCCFG Specifies the configuration file for customizing compilations when invoking the compiler using icc.
ICPCCFG Specifies the configuration file for customizing compilations when invoking the compiler using icpc.
INTEL_LICENSE_FILE Specifies the location for the Intel license file.
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 -openmp or -openmp-profile.

KMP_LIBRARY Selects the OpenMP run-time library execution mode. The values for this variable are serial, turnaround, or throughput (default).
KMP_STACKSIZE Sets the number of bytes to allocate for each OpenMP* 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. Note that this variable does not have any effect on native operating system threads created by the user program or the thread executing the sequential part of an OpenMP* program. Default: IA-32 architecture: 2m, Intel® 64 architecture: 4m, IA-64 architecture: 4m.
KMP_VERSION Enables (1) or disables (0) the printing of OpenMP run-time library version information during program execution. Default: disabled.
LD_LIBRARY_PATH Specifies the location for shared objects.
OMP_DYNAMIC Enables (1) or disables (0) the dynamic adjustment of the number of threads. Default is 0 (disabled).
OMP_NESTED Enables (1) or disables (0) nested parallelism. Default is 0 (nested parallelism disabled).
OMP_NUM_THREADS Sets the maximum number of threads to use for OpenMP* parallel regions if no other value is specified in the program itself. Default is the number of processors currently visible to the operating system on which the program is executed.
PATH Specifies the directories the system searches for binary executable files.
TMP
TMPDIR
TEMP
Specifies the location for temporary files. If none of these are specified, the compiler stores temporary files in /tmp.

GNU* Environment Variables

The Intel C++ Compiler also supports the GNU environment variables listed in the following table:

Environment
Variable
Description
CPATH Path to include directory for C/C++ compilations.
C_INCLUDE_PATH Path include directory for C compilations.
CPLUS_INCLUDE_PATH Path include directory for C++ compilations.
DEPENDENCIES_OUTPUT If this variable is set, its value specifies how to output dependencies for make based on the non-system header files processed by the compiler. System header files are ignored in the dependency output.
GCC_EXEC_PREFIX This variable specifies alternative names for the linker (ld) and assembler (as).
LIBRARY_PATH The value of LIBRARY_PATH is a colon-separated list of directories, much like PATH.
SUNPRO_DEPENDENCIES This variable is the same as DEPENDENCIES_OUTPUT, except that system header files are not ignored.