You can customize your system environment by specifying paths where the compiler searches for certain files such as libraries, include files, and configuration files, and certain settings.
The Intel® C++ Compiler supports the following environment variables on Linux* OS and Mac OS* X:
Environment |
Description |
---|---|
CILK_NWORKERS (Linux* OS) |
Specifies the number of worker threads to use in an Intel® Cilk™ Plus program. |
DYLD_LIBRARY_PATH (Mac OS* X) |
Specifies the location for shared objects. |
GCCROOT |
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. |
GXX_INCLUDE |
Specifies the location of the gcc headers. Set this variable to specify the locations of the GCC installed files when the compiler does not find the needed values as specified by the use of the -gcc-name=<directory-name>/gcc option. |
GXX_ROOT |
Specifies the location of the gcc binaries. Set this variable to specify the locations of the GCC installed files when the compiler does not find the needed values as specified by the use of the -gcc-name=<directory-name>/gcc 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. |
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. |
LD_LIBRARY_PATH (Linux OS) |
Specifies the location for shared objects. |
PATH |
Specifies the directories the system searches for binary executable files. |
PROF_DIR |
Specifies the directory where profiling files (files with extensions .dyn, .dpi, .spi and so forth) 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 -prof-gen . |
PROF_DPI |
Name for the .dpi file. The default is pgopti.dpi. |
TMP |
Specifies the location for temporary files. If none of these are specified, the compiler stores temporary files in /tmp. |
OpenMP* environment variables (OMP_) and extensions (KMP_) | |
KMP_AFFINITY |
Enables run-time library to bind threads to physical processing units. Default: none This environment variable is available for both Intel and non-Intel microprocessors but it may perform additional optimizations for Intel microprocessors than it performs for non-Intel microprocessors. |
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. 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. Default: 200 milliseconds |
KMP_CPUINFO_FILE |
Specifies an alternate file name for file containing machine topology description. The file must be in the same format as /proc/cpuinfo. Default: None This environment variable is available for both Intel and non-Intel microprocessors but it may perform additional optimizations for Intel microprocessors than it performs for non-Intel microprocessors. |
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: load_balance (only on Linux* OS, if support is available); thread_limit (elsewhere) |
KMP_INHERIT_FP_CONTROL |
Enables (1) or disables (0) the copying of the floating point control settings of the master thread to the floating point control settings of the OpenMP* worker threads at the start of each parallel region. Default: 1 |
KMP_LIBRARY |
Selects the OpenMP run-time library execution mode. The values for this variable are serial, turnaround, or throughput (default). |
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 suffixes: b (bytes), k (kilobytes), m (megabytes), g (gigabytes), or t (terabytes) to specify the units. Default: max (32k, system minimum thread stack size) |
KMP_SETTINGS |
Enables (1) or disables (0) the printing of OpenMP run-time 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 run-time library. Default: 0 |
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 suffix b, k, m, g, or t, to specify bytes, kilobytes, megabytes, gigabytes, or terabytes.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). Default: IA-32 architecture: 2m, Intel® 64 architecture: 4m. |
KMP_VERSION |
Enables (1) or disables (0) the printing of OpenMP run-time library version information during program execution. Default: disabled. |
OMP_DYNAMIC |
Enables (1) or disables (0) the dynamic adjustment of the number of threads. Default: 0 Example syntax: export OMP_DYNAMIC=value |
OMP_MAX_ACTIVE_LEVELS |
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 or -parallel (Linux and Mac OS X) and /Qopenmp or /Qopenmp-profile or /Qparallel (Windows). omp_get_thread_limit() routine returns the value of the limit. Default: No enforced limit Related env variable: KMP_ALL_THREADS. OMP_THREAD_LIMIT overrides KMP_ALL_THREADS. Example syntax: export OMP_MAX_ACTIVE_LEVELS=value |
OMP_NESTED |
Enables (1) or disables (0)nested parallelism. Default: 0 Example syntax: export OMP_NESTED=value |
OMP_NUM_THREADS |
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). Default: Number of processors visible to the operating system. Example syntax: export OMP_NUM_THREADS=value |
OMP_SCHEDULE |
Sets the run-time schedule type and an optional chunk size. Default: STATIC, no chunk size specified Example syntax: export OMP_SCHEDULE="kind[,chunk_size]" This environment variable is available for both Intel and non-Intel microprocessors but it may perform additional optimizations for Intel microprocessors than it performs 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: B (bytes), K (Kilobytes), M (Megabytes), G (Gigabytes), or T (Terabytes) to specify the units. If only value is specified and B, K, M, G, or T is not specified, then size 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 -parallel (Linux and Mac OS X) or /Qparallel (Windows). kmp_{set,get}_stacksize_s() routines set/retrieve the value. 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 for IA-32 architecture: 2M Related env variables: KMP_STACKSIZE. KMP_STACKSIZE overrides OMP_STACKSIZE. Example syntax: export 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: -openmp or -openmp-profile or -parallel (Linux and Mac OS X) and /Qopenmp or /Qopenmp-profile or /Qparallel (Windows). omp_get_thread_limit() routine returns the value of the limit. Default: No enforced limit Related environment variable: KMP_ALL_THREADS. Its value overrides OMP_THREAD_LIMIT. Example syntax: export OMP_THREAD_LIMIT=value |
OMP_WAIT_POLICY |
Decides whether threads spin (active) or sleep (passive) while they are waiting. Default: Passive Syntax: export OMP_WAIT_POLICY=value |
GNU* Environment Variables and extensions |
|
CPATH |
Specifies path to include directory for C/C++ compilations. |
C_INCLUDE_PATH |
Specifies path to include directory for C compilations. |
CPLUS_INCLUDE_PATH |
Specifies path to include directory for C++ compilations. |
DEPENDENCIES_OUTPUT |
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 |
Specifies alternative names for the linker (ld) and assembler (as). |
GOMP_CPU_AFFINITY |
Specifies a list of OS processor IDs. Default: Affinity is disabled |
GOMP_STACKSIZE |
This environment variable is a GNU extension recognized by the Intel OpenMP compatibility library. OMP_STACKSIZE overrides GOMP_STACKSIZE. KMP_STACKSIZE overrides OMP_STACKSIZE and GOMP_STACKSIZE |
LIBRARY_PATH |
Specifies 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. |
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 this environment variable is 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. |
PROF_DIR |
Specifies the directory in which dynamic information files are created. This variable applies to all three phases of the profiling process. |
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. |
Copyright © 1996-2011, Intel Corporation. All rights reserved.