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

Compiler Directives

The following tables list available compiler directives.

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

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.

ATOMIC

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

BARRIER

Synchronizes all the threads in a team.

CANCEL

Requests cancellation of the innermost enclosing region of the type specified, and causes the encountering implicit or explicit task to proceed to the end of the canceled construct.

CANCELLATION POINT

Defines a point at which implicit or explicit tasks check to see if cancellation has been requested for the innermost enclosing region of the type specified.

Product and Performance Information

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

Notice revision #20201201