Intel® Fortran Compiler XE 13.1 User and Reference Guides
This is a summary of the OpenMP* directives and clauses supported in the Intel® Compiler. For detailed information about the OpenMP API, see the OpenMP Application Program Interface Version 3.1 specification, which is available from the OpenMP web site (http://www.openmp.org/).
|
Directive |
Description |
|---|---|
|
PARALLEL |
Defines a parallel region. |
|
TASK |
Defines a task region. |
|
DO |
Identifies an iterative worksharing construct in which the iterations of the associated loop should be divided among threads in a team. |
|
SECTIONS |
Identifies a non-iterative worksharing construct that specifies a set of structured blocks that are to be divided among threads in a team. |
|
SECTION |
Indicates that the associated structured block should be executed in parallel as part of the enclosing sections construct. |
|
SINGLE |
Identifies a construct that specifies that the associated structured block is executed by only one thread in the team. |
|
PARALLEL DO |
A shortcut for a PARALLEL region that contains a single DO directive. NoteThe OpenMP PARALLEL DO directive must be immediately followed by a DO statement (DO-stmt as defined by R818 of the ANSI Fortran standard). If you place another statement or an OpenMP directive between the PARALLEL DO directive and the DO statement, the Intel® Fortran Compiler issues a syntax error. |
|
PARALLEL SECTIONS |
Provides a shortcut form for specifying a parallel region containing a single SECTIONS construct. |
|
MASTER |
Identifies a construct that specifies a structured block that is executed by only the master thread of the team. |
|
CRITICAL[name] |
Identifies a construct that restricts execution of the associated structured block to a single thread at a time. Each thread waits at the beginning of the critical construct until no other thread is executing a critical construct with the same name argument. |
|
TASKWAIT |
Indicates a wait on the completion of child tasks generated since the beginning of the current task. |
|
TASKYIELD |
Indicates that the current task can be suspended in favor of a different task. |
|
BARRIER |
Synchronizes all the threads in a team. Each thread waits until all of the other threads in that team have reached this point. |
|
ATOMIC UPDATE |
Synchronizes with other atomic operations on a given variable. Updates the variable atomically with the indicated operation. |
|
ATOMIC READ |
Synchronizes with other atomic operations on a given variable. Reads the variable atomically. |
|
ATOMIC WRITE |
Synchronizes with other atomic operations on a given variable. Writes a new value into the variable. |
|
ATOMIC CAPTURE |
Synchronizes with other atomic operations on a given variable. Captures the old value of a variable atomically, then applies the indicated operation to the variable. |
|
FLUSH [(list)] |
Specifies a cross-thread sequence point at which the implementation is required to ensure that all the threads in a team have a consistent view of certain objects in memory. The optional list argument consists of a comma-separated list of variables to be flushed. |
|
ORDERED |
The enclosed structured block is executed in the order in which iterations would be executed in a sequential loop. |
|
THREADPRIVATE (list) |
Makes the named COMMON blocks or variables private to a thread. The list argument consists of a comma-separated list of COMMON blocks or variables. |
|
Clause |
Description |
|---|---|
|
PRIVATE (list) |
Declares variables in list to be PRIVATE to each thread in a team. Private copies of the variable are not initialized before they are used. |
|
FIRSTPRIVATE (list) |
Same as PRIVATE, but the copy of each variable in the list is initialized using the value of the original variable existing before the construct. Each private data object is initialized with the value of the original object. |
|
LASTPRIVATE (list) |
Same as PRIVATE, but the original variables in list are updated using the values assigned to the corresponding PRIVATE variables in the last iteration in the DO construct loop or the last SECTION construct. |
|
COPYPRIVATE (list) |
Uses private variables in list to broadcast values, or pointers to shared objects, from one member of a team to the other members at the end of a single construct. |
|
NOWAIT |
Specifies that threads need not wait at the end of worksharing constructs until they have completed execution. The threads may proceed past the end of the worksharing constructs as soon as there is no more work available for them to execute. |
|
SHARED (list) |
Shares variables in list among all the threads in a team. |
|
DEFAULT (mode) |
Sets the default data attributes of variables not explicitly specified by another clause. Possible values for mode are PRIVATE, SHARED, or NONE. |
|
REDUCTION ({operator|intrinsic}:list) |
Performs a reduction on variables that appear in list with the operator operator or the intrinsic procedure name intrinsic; operator is one of the following: +, *, .AND., .OR., .EQV., .NEQV.; intrinsic refers to one of the following: MAX, MIN, IAND, IOR, or IEOR. |
|
ORDERED |
Used in conjunction with a DO or SECTIONS construct to impose a serial order on the execution of a section of code. If ORDERED constructs are contained in the dynamic extent of the DO construct, the ordered clause must be present on the DO directive. |
|
IF (expression) |
The enclosed code block is executed in parallel only if the expression evaluates to .TRUE., otherwise it is serialized. The expression must be a scalar of type logical. |
|
NUM_THREADS (expression) |
Requests the number of threads specified by expression for the parallel region. The expressions must be of type integer. |
|
SCHEDULE (type[,chunk]) |
Specifies how iterations of the DO construct are divided among the threads of the team. Possible values for the type argument are STATIC, DYNAMIC, GUIDED, and RUNTIME. The optional chunk argument must be a positive scalar integer expression. |
|
COLLAPSE (n) |
Specifies how many nested loops of a for loop associated with the OpenMP for construct should be collapsed into a single loop for running in parallel. |
|
COPYIN (list) |
Provides a mechanism to copy the data values of the master thread to the THREADPRIVATE copy of the common blocks or variables specified in list, at the beginning of the parallel region. |
|
UNTIED |
Indicates that a resumed task does not have to be executed by same thread executing it before it was suspended. |
|
MERGEABLE
|
Indicates that the task defined by this task pragma need not create a private data environment for the task, but if the task execution is deferred, then the private data environment is created.
|
|
FINAL(expr)
|
The
expr is evaluated, and if the value is true, then this task and all its descendant tasks are not deferred (not executed in parallel).
|
|
Directive |
Use these Clauses |
|---|---|
|
PARALLEL |
|
|
DO |
|
|
SECTIONS |
|
|
SECTION |
None |
|
SINGLE |
|
|
PARALLEL DO |
|
|
PARALLEL SECTIONS |
|
|
All others |
None |