Visible to Intel only — GUID: GUID-CB11187E-81BA-46EC-8B82-AC14A955BF73
Visible to Intel only — GUID: GUID-CB11187E-81BA-46EC-8B82-AC14A955BF73
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 |
---|---|
Specifies an alternate external name to be used when referring to an external subprogram. |
|
Provides heuristic information to the compiler optimizer. |
|
Specifies that an entity in memory is aligned. |
|
Applies attributes to variables and procedures. |
|
Enables loop blocking for the immediately following nested DO loops. |
|
Generates warning messages for undeclared variables. |
|
Creates a variable whose existence can be tested during conditional compilation. |
|
Suggests a location at which a DO loop may be split. |
|
Marks the beginning of an alternative conditional-compilation block to an IF directive construct. |
|
Marks the beginning of an alternative conditional-compilation block to an IF directive construct. |
|
Marks the end of a conditional-compilation block. |
|
Sets fixed-form line length. This directive has no effect on freeform code. |
|
Tells the compiler to allow generation of fused multiply-add (FMA) instructions, also known as floating-point contractions. |
|
Specifies that a routine should be inlined whenever the compiler can do so. |
|
Uses freeform format for source code. |
|
Specifies an identifier for an object module. |
|
Marks the beginning of a conditional-compilation block. |
|
Marks the beginning of a conditional-compilation block. |
|
Specifies that the routines can be inlined. |
|
Selects default integer size. |
|
Assists the compiler's dependence analysis of iterative DO loops. |
|
Specifies the typical trip loop count for a DO loop; which assists the optimizer. |
|
Sends a character string to the standard output device. |
|
Disables loop blocking for the immediately following nested DO loops. |
|
(Default) Turns off warning messages for undeclared variables. |
|
Disables the generation of FMA instructions. |
|
(Default) Uses standard FORTRAN 77 code formatting column rules. |
|
Prevents a loop from fusing with adjacent loops. |
|
Specifies that a routine should not be inlined. |
|
Disables auto-parallelization for an immediately following DO loop. This feature is only available for ifort. |
|
Disables optimizations for the program unit. |
|
Disables a data prefetch from memory. |
|
(Default) Disables a previous STRICT directive. |
|
Disables the unrolling of a DO loop. |
|
Disables loop unrolling and jamming. |
|
Disables vectorization of a DO loop. |
|
Specifies a library search path in an object file. |
|
Enables optimizations for the program unit. |
|
Controls whether fields in records and data items in common blocks are naturally aligned or packed on arbitrary byte boundaries. |
|
Specifies the memory alignment of derived-type items. |
|
Helps auto-parallelization by assisting the compiler's dependence analysis of an immediately following DO loop. This feature is only available for ifort. |
|
Hints to the compiler to prefetch data from memory. |
|
Modifies certain characteristics of a common block. |
|
Selects default real size. |
|
Requires and controls SIMD vectorization of loops. This feature is only available for ifort. |
|
Disables Intel® Fortran features not in the language standard specified on the command line. |
|
Removes a symbolic variable name created with the DEFINE directive. |
|
Tells the compiler's optimizer how many times to unroll a DO loop. |
|
Enables loop unrolling and jamming. |
|
Overrides default heuristics for vectorization of 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 |
---|---|
Specifies memory allocators to use for object allocation and deallocation. This feature is only available for ifx. |
|
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. |
|
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. |
|
Specifies that a specific memory location is to be updated atomically. |
|
Synchronizes all the threads in a team. |
|
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. |
|
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. |
|
Restricts access for a block of code to only one thread at a time. |
|
Declares a user defined data mapper for derived types and local variables that can subsequently be used in MAP clauses. This feature is only available for ifx. |
|
Declares a user defined reduction for one or more types. |
|
Generates a SIMD procedure. |
|
Specifies that named variables, common blocks, functions, and subroutines are mapped to a device. This feature is only available for ifx. |
|
Identifies a variant of a base procedure and specifies the context in which this variant is used. This feature is only available for ifx. |
|
Initializes, updates, or uninitializes an OpenMP depend object. This feature is only available for ifx. |
|
Determines if a variant of a procedure is called for a given function or subroutine call. This feature is only available for ifx. |
|
Specifies that loop iterations will be executed by thread teams in the context of their implicit tasks. |
|
Specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams. |
|
Specifies a loop that will be executed in parallel by multiple threads that are members of multiple teams. It will be executed concurrently using SIMD instructions. |
|
Specifies a loop that will be distributed across the primary threads of the teams region. It will be executed concurrently using SIMD instructions. |
|
Specifies that the iterations of the immediately following DO loop must be executed in parallel. |
|
Specifies a loop that can be executed concurrently using SIMD instructions. |
|
Causes the compiler or runtime system to process an error condition. This feature is only available for ifx. |
|
Specifies synchronization points where the implementation must have a consistent view of memory. |
|
Identifies a foreign runtime context and identifies runtime characteristics of that context, enabling interoperability with it. This feature is only available for ifx. |
|
Specifies that all iterations of the associated DO loop(s) can execute in any order or concurrently. This feature is only available for ifx. |
|
Specifies a block of code to be executed by a subset of threads of the current team. This feature is only available for ifx. |
|
Provides an abbreviated way to specify a TASKLOOP construct inside a MASKED construct. This feature is only available for ifx. |
|
Provides an abbreviated way to specify a TASKLOOP SIMD construct inside a MASKED construct. This feature is only available for ifx. |
|
(Deprecated, see MASKED) Specifies a block of code to be executed by the master thread of the team. |
|
Deprecated; provides an abbreviated way to specify a TASKLOOP construct inside a MASTER construct. This feature is only available for ifx. |
|
Deprecated; provides an abbreviated way to specify a TASKLOOP SIMD construct inside a MASTER construct. This feature is only available for ifx. |
|
Provides documentary clarity in conditionally compiled code or conditional OpenMP* code. It has no effect on the semantics or execution of the program. This feature is only available for ifx. |
|
Specifies a block of code to be executed sequentially. |
|
Defines a parallel region. |
|
Defines a parallel region that contains a single DO directive. |
|
Specifies a loop that can be executed concurrently using SIMD instructions. It provides a shortcut for specifying a PARALLEL construct containing one SIMD loop construct and no other statement. |
|
Provides an abbreviated way to specify a PARALLEL region containing a single LOOP construct and no other statements. This feature is only available for ifx. |
|
Provides an abbreviated way to specify a MASKED construct inside a PARALLEL construct, with no other statements inside the PARALLEL construct. This feature is only available for ifx. |
|
Provides an abbreviated way to specify a MASKED TASKLOOP construct inside a PARALLEL construct, with no other statements inside the PARALLEL construct. This feature is only available for ifx. |
|
Provides an abbreviated way to specify a MASKED TASKLOOP SIMD construct inside a PARALLEL construct, with no other statements inside the PARALLEL construct. This feature is only available for ifx. |
|
Deprecated; provides an abbreviated way to specify a MASTER construct inside a PARALLEL construct, with no other statements inside the PARALLEL construct. This feature is only available for ifx. |
|
Deprecated; provides an abbreviated way to specify a MASTER TASKLOOP construct inside a PARALLEL construct, with no other statements inside the PARALLEL construct. This feature is only available for ifx. |
|
Deprecated; provides an abbreviated way to specify a MASTER TASKLOOP SIMD construct inside a PARALLEL construct, with no other statements inside the PARALLEL construct. This feature is only available for ifx. |
|
Defines a parallel region that contains SECTIONS directives. |
|
Defines a parallel region that contains a single WORKSHARE directive. |
|
Suggests to the compiler to preload data into cache. Preloading data in cache minimizes the effects of memory latency. This feature is only available for ifx. |
|
Lists the features that an implementation must support so that the program compiles and runs correctly. This feature is only available for ifx. |
|
Specifies a scan computation that updates each list item in each iteration of the loop. |
|
Specifies a block of code to be executed by all threads of a team. This feature is only available for ifx. |
|
Appears within a SECTIONS construct to indicate a block (section) of code. This directive is optional for the first block of code within the SECTIONS construct. |
|
Specifies a block of code to be divided among threads in a team (a worksharing area). |
|
Requires and controls SIMD vectorization of loops. |
|
Specifies a block of code to be executed by only one thread in a team. |
|
Creates a device data environment and executes the construct on the same device. This feature is only available for ifx. |
|
Creates a device data environment for the extent of the region. This feature is only available for ifx. |
|
Specifies that variables are mapped to a device data environment. This feature is only available for ifx. |
|
Specifies that variables are unmapped from a device data environment. This feature is only available for ifx. |
|
Creates a device data environment in a parallel region and executes the construct on that device. |
|
Provides an abbreviated way to specify a TARGET directive containing a PARALLEL DO directive and no other statements. |
|
Specifies a TARGET construct that contains a PARALLEL DO SIMD construct and no other statement. |
|
Provides an abbreviated way to specify a TARGET region containing a single PARALLEL LOOP construct and no other statements. This feature is only available for ifx. |
|
Specifies a TARGET construct that contains a SIMD construct and no other statement. |
|
Creates a device data environment and executes the construct on the same device. It also creates a league of thread teams with the primary thread in each team executing the structured block. |
|
Creates a device data environment and executes the construct on the same device. It also specifies that loop iterations will be shared among the primary threads of all thread teams in a league created by a TEAMS construct. |
|
Creates a device data environment and then executes the construct on that device. It also specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams created by a TEAMS construct. |
|
Creates a device data environment and then executes the construct on that device. It also specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams created by a TEAMS construct. The loop will be distributed across the teams, which will be executed concurrently using SIMD instructions. |
|
Creates a device data environment and executes the construct on the same device. It also specifies that loop iterations will be shared among the primary threads of all thread teams in a league created by a teams construct. It will be executed concurrently using SIMD instructions. |
|
Provides an abbreviated way to specify a TARGET region containing a single TEAMS LOOP construct and no other statements. This feature is only available for ifx. |
|
Makes the list items in the device data environment consistent with their corresponding original list items. This feature is only available for ifx. |
|
Conditionally calls a procedure offload variant if the device is free; otherwise, executes the procedure on the host. This feature is only available for ifx. |
|
Defines a task region. |
|
Specifies a wait for the completion of all child tasks of the current task and all of their descendant tasks. |
|
Specifies that the iterations of one or more associated DO loops should be executed in parallel using OpenMP* tasks. The iterations are distributed across tasks that are created by the construct and scheduled to be executed. |
|
Specifies a loop that can be executed concurrently using SIMD instructions and that those iterations will also be executed in parallel using OpenMP* tasks. |
|
Specifies a wait on the completion of child tasks generated since the beginning of the current task. |
|
Specifies that the current task can be suspended in favor of execution of a different task. |
|
Creates a league of thread teams inside a target region to execute a structured block in the primary thread of each team. This feature is only available for ifx. |
|
Creates a league of thread teams to execute a structured block in the primary thread of each team. It also specifies that loop iterations will be shared among the primary threads of all thread teams in a league created by a TEAMS construct. |
|
Creates a league of thread teams to execute a structured block in the primary thread of each team. It also specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams. |
|
Creates a league of thread teams to execute a structured block in the primary thread of each team. It also specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams. The loop will be distributed across the primary threads of the teams region, which will be executed concurrently using SIMD instructions. |
|
Creates a league of thread teams to execute the structured block in the primary thread of each team. It also specifies a loop that will be distributed across the primary threads of the teams region. The loop will be executed concurrently using SIMD instructions. |
|
Provides an abbreviated way to specify a TEAMS region containing a single LOOP construct and no other statements. This feature is only available for ifx. |
|
Makes named common blocks private to a thread but global within the thread. |
|
Tiles (or blocks) one or more loops in a loop nest. This feature is only available for ifx. |
|
Partially or fully unrolls a DO loop. This feature is only available for ifx. |
|
Divides the work of executing a block of statements or constructs into separate units. |
Product and Performance Information |
---|
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex. Notice revision #20201201 |