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

ID 767251
Date 6/24/2024
Public

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

Document Table of Contents

Compiler Directives

The following tables list available compiler directives.

Each OpenMP* Fortran directive name is preceded by the prefix !$OMP in free format source; in fixed format source the prefix is c$OMP, where c is one of the following: !, C (or c), or *; for example, !$OMP ATOMIC.

Directives that are extensions to OpenMP are preceded by the prefix !$OMPX in free format source; in fixed format source the prefix is c$OMP, where c is one of the following: !, C (or c), or *.

Compiler directives are specially formatted comments in the source file that provide information to the compiler. Some directives, such as line length or conditional compilation directives, provide the compiler information that is used in interpreting the source file. Other directives, such as optimization directives, provide hints or suggestions to the compiler, which, in some cases, may be ignored or overridden by the compiler, based on the heuristics of the optimizer and/or code generator. If the directive is ignored by the compiler, no diagnostic message is issued.

You do not need to specify a compiler option to enable general directives.

Some directives may perform differently on Intel® microprocessors than on non-Intel microprocessors.

General Directives

Name

Description

ALIAS

Specifies an alternate external name to be used when referring to an external subprogram.

ASSUME

Provides heuristic information to the compiler optimizer.

ASSUME_ALIGNED

Specifies that an entity in memory is aligned.

ATTRIBUTES

Applies attributes to variables and procedures.

BLOCK_LOOP

Enables loop blocking for the immediately following nested DO loops.

OpenMP* Fortran Directives

OpenMP* directives are specially formatted Fortran comment lines embedded in the source file that provide the compiler with hints and suggestions for parallelization, optimization, vectorization, and offloading code to accelerator hardware.

The compiler uses the information specified in the directives with compiler heuristic algorithms to generate more efficient code. At times, these heuristics may choose to ignore or override the information provided by a directive. If the directive is ignored by the compiler, no diagnostic message is issued.

To use the following directives, you must specify compiler option [q or Q]openmp. For more information, refer to the option description in the Compiler Options reference.

Name

Description

ALLOCATE

Specifies memory allocators to use for object allocation and deallocation. This feature is only available for ifx.

ALLOCATORS

Specifies memory allocators to be used to allocate variables in the associated Fortran ALLOCATE statement and to use in their deallocation. This feature is only available for ifx.

ASSUMES

Provides hints to the optimizer about the current compilation unit and all the code it can reach through procedure calls. This feature is only available for ifx.

ATOMIC

Specifies that a specific memory location is to be updated atomically.

BARRIER

Synchronizes all the threads in a team.

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

Notice revision #20201201

See Also