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

OpenMP* Directives

This is a summary of the OpenMP* directives supported in the Intel® Fortran Compiler. For detailed information about the OpenMP API, see the OpenMP Application Program Interface Version 5.1 specification, which is available from the OpenMP web site.

In the directive lists below, an OpenMP directive is qualified with the word Directive when the name of the directive is also used for one or more elements besides the directive. For example: FLUSH refers to a directive, a statement, and a subroutine.

PARALLEL Directive

Use this directive to form a team of threads and execute those threads in parallel.

Directive

Description

PARALLEL Directive (OpenMP)

Defines a parallel region.

TASKING Directives

Use these directives for deferring execution.

Directive

Description

TASK

Defines a task region.

TASKLOOP

Specifies that the iterations of one or more associated DO loops should be executed using OpenMP tasks. The iterations are distributed across tasks that are created by the construct and scheduled to be executed in parallel by the current team.

WORKSHARING Directives

Use these directives to share work among a team of threads.

Directive

Description

DO Directive

Identifies an iterative worksharing construct in which the iterations of the associated loop should be divided among threads in a team.

LOOP Directive (ifx)

Specifies that the iterations of the associated DO loops can execute in any order or concurrently. This feature is only available for ifx.

SECTIONS

Specifies that the enclosed SECTION directives define blocks of code to be divided among threads in a team. Each section is executed once by a thread in the team.

SCOPE (ifx)

Specifies a block of code to be executed by all threads of the team. This feature is only available for ifx.

SINGLE

Specifies that a block of code is to be executed by only one thread in the team.

SYNCHRONIZATION Directives

Use these directives to synchronize between threads.

Directive

Description

ATOMIC

Ensures that a specific memory location is updated atomically; this prevents the possibility of multiple, simultaneous reading and writing of threads.

BARRIER

Synchronizes all the threads in a team. It causes each thread to wait until all of the other threads in the team have reached the barrier.

CRITICAL Directive

Restricts access to a block of code to only one thread at a time.

FLUSH Directive

Identifies synchronization points at which the threads in a team must provide a consistent view of memory.

MASKED

Specifies a structured block that is executed by a subset of the threads of the current team. This feature is only available for ifx.

Data Environment Directive

Use these directives to affect the data environment.

Directive

Description

DECLARE MAPPER (ifx)

Declares a user-defined data mapper for derived types and variables that can subsequently be used in MAP clauses. This feature is only available for ifx.

DEPOBJ (ifx)

Initializes, updates, or uninitializes an OpenMP depend object. This feature is only available for ifx.

PREFETCH (ifx)

Suggests to the compiler to preload data into cache. Preloading data in cache minimizes the effects of memory latency. This is an Intel® language extension. This feature is only available for ifx.

THREADPRIVATE

Specifies named common blocks to be private (local) to each thread; they are global within the thread.

Offload Target Control Directives

Use these directives to control execution on one or more offload targets.

Directive

Description

DECLARE TARGET (ifx)

Specifies named routines and variables that are created or mapped to a device. This feature is only available for ifx.

DECLARE VARIANT (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.

DISPATCH (ifx)

Determines if a procedure variant is called for a given subroutine or function call. This feature is only available for ifx.

DISTRIBUTE

Specifies that loop iterations will be distributed among the primary threads of all thread teams in a league created by a teams construct.

INTEROP (ifx)

Identifies a foreign runtime context and identifies runtime characteristics of that context, enabling interoperability with it. This feature is only available for ifx.

Vectorization Directives

Use these directives to control execution on vector hardware.

Directive

Description

SCAN

Specifies a scan computation that updates each list item in each iteration of an enclosing SIMD loop nest.

SIMD Directive (OpenMP*)

Transforms the loop into a loop that will be executed concurrently using SIMD instructions.

DECLARE SIMD

Generates a SIMD procedure.

Loop Transformation Directive

Use thia directive to transform or restructure loops.

Directive

Description

UNROLL (ifx)

Partially or fully unrolls a DO loop. This feature is only available for ifx.

Cancellation Constructs

Directive

Description

CANCEL

Requests cancellation of the innermost enclosing region of the construct specified, and causes the encountering task to proceed to the end of the cancelled 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.

Memory Space Allocation Directive

Use this declarative directive to allocate memory space. This feature is only available for ifx.

Directive

Description

ALLOCATE (ifx)

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

Combined and Composite Directives

Use these directives as shortcuts for multiple directives in sequence. A combined construct is a shortcut for specifying one construct immediately nested inside another construct. A combined construct is semantically identical to that of explicitly specifying the first construct containing one instance of the second construct and no other statements.

A composite construct is composed of two constructs but does not have identical semantics to specifying one of the constructs immediately nested inside the other. A composite construct either adds semantics not included in the constructs from which it is composed or the nesting of the one construct inside the other is not conforming.

Directive

Description

DISTRIBUTE PARALLEL DO1

Specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams.

DISTRIBUTE PARALLEL DO SIMD1

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.

DISTRIBUTE SIMD1

Specifies a loop that will be distributed across the primary threads of the teams region. It will be executed concurrently using SIMD instructions

DO SIMD1

Specifies a loop that can be executed concurrently using SIMD instructions.

MASKED TASKLOOP

Provides an abbreviated way to specify a TASKLOOP construct inside a MASKED construct. This feature is only available for ifx.

Footnotes:

1 This directive specifies a composite construct.