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

ID 767251
Date 6/24/2024
Public

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

Document Table of Contents

GROUPPRIVATE

OpenMP* Fortran Compiler Directive: Specifies that a variable is replicated once for a group of threads participating in a parallel region. This feature is only available for ifx.

Syntax

!$OMP GROUPPRIVATE (list)[clause [[,] clause]... ]

list

Is a comma-separated list of variables or named common blocks. A common block name must be enclosed in slashes (/ /).

If a list item has the BIND attribute, the corresponding C entities must also appear in a GROUPPRIVATE directive.

List items must have the SAVE attribute, either implicitly or explicitly, or be declared in the specification part of a module.

List items cannot appear in an EQUIVALENCE statement, and they cannot be any of the following:

  • Coarrays

  • Associate names

  • Elements of a COMMON block

  • Initialized variables

clause

Is a DEVICE_TYPE (device) clause.

The GROUPPRIVATE directive is a declarative directive that must appear in the specification part of the scope where its list items are declared. If a list item is a COMMON block name, all scopes that declare a COMMON block with the same name must contain a GROUPPRIVATE directive containing the COMMON block name enclosed in slashes.

GROUPPRIVATE directives containing COMMON block names must appear after the last COMMON statement declaring a COMMON block that appears as a list item in that directive.

List items in a GROUPPRIVATE directive are replicated such that there is one copy for each contention group. A contention group consists of all implicit tasks and their descendent tasks generated in an implicit parallel region R, and all nested regions for which R is the innermost enclosing parallel region.

List items are uninitialized when they are replicated, and their lifetime is limited to that of all tasks in the contention group. References to list items refer to the GROUPPRIVATE copy created for the contention group of the innermost enclosing implicit parallel region.

If no DEVICE_TYPE clause appears, the behavior is as if DEVICE_TYPE (ANY) had been specified.

References to GROUPPRIVATE list items in a DO CONCURRENT construct are undefined.