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

ID 767251
Date 7/13/2023
Public

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

Document Table of Contents

TARGET PARALLEL

OpenMP* Fortran Compiler Directive: Creates a device data environment in a parallel region and executes the construct on that device.

Syntax

!$OMP TARGET PARALLEL [clause[[,] clause] ... ]

      loosely-structured-block

!$OMP END TARGET PARALLEL

-or-

!$OMP TARGET PARALLEL [clause[[,] clause] ... ]

      strictly-structured-block

[!$OMP END TARGET PARALLEL]

clause

Can be any of the clauses accepted by the TARGET or PARALLEL directives with identical meanings and restrictions.

loosely-structured-block

Is a structured block (section) of statements or constructs. You cannot branch into or out of the block.

strictly-structured-block

Is a Fortran BLOCK construct. You cannot branch into or out of the BLOCK construct.

This directive provides a shortcut for specifying a TARGET construct immediately followed by a PARALLEL construct. The effect of any clause that applies to both constructs is as if it were applied to both constructs separately. The only exceptions are the following:

  • If any IF clause in the directive includes a directive-name-modifier then all IF clauses in the directive must include a directive-name-modifier.

  • At most one IF clause with no directive-name-modifier can appear on the directive.

  • At most one IF clause with the PARALLEL directive-name-modifier can appear on the directive.

  • At most one IF clause with the TARGET directive-name-modifier can appear on the directive.