Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/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

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).

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

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:

  1. OPEN keyword

  2. Environment variable(s)

  3. 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.

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:

  • 0: OpenCL address space alias analysis

CL_CONFIG_CPU_STREAMING_ALWAYS

False

Controls whether non-temporal instructions are used.