Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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

CL (Windows)

_CL_ (Windows)

Define the files and options you use most often with the CL variable. Note: You cannot set the CL environment variable to a string that contains an equal sign. You can use the pound sign instead. In the following example, the pound sign (#) is used as a substitute for an equal sign in the assigned string: SET CL=/Dtest#100

COV_DIR (Windows)

Same as PROF_DIR.

COV_DPI (Windows)

Same as PROF_DPI.

IA32ROOT (IA-32 architecture and Intel® 64 architecture)

Points to the directories containing the include and library files for a non-standard installation structure.

NOTE:
IA-32 architecture is no longer supported on macOS*.

ICCCFG

Specifies the configuration file for customizing compilations when invoking the compiler using icc. Used instead of the default configuration file.

NOTE:
INTEL_ROOT is an environment variable that is reserved for the Intel® Compiler. Its use is not supported.

Compiler Run-Time Environment Variables

The following table summarizes compiler environment variables that are recognized at run time.

Run-Time Environment Variable

Description

INTEL_CHKP_REPORT_MODE (Linux)

Changes the pointer checker reporting mode at run time.

See Finding and Reporting Out-of-Bounds Errors.

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.

See CPU Feature Targeting.

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.

The following table summarizes CPU environment variables that are recognized at run time.

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:

  • 0: OpenCL address space alias analysis

CL_CONFIG_CPU_STREAMING_ALWAYS

False

Controls whether non-temporal instructions are used.


See Also