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

ID 767251
Date 3/22/2024
Public

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

Document Table of Contents

TASKGROUP

OpenMP* Fortran Compiler Directive: Specifies a wait for the completion of all child tasks of the current task and all of their descendant tasks.

Syntax

!$OMP TASKGROUP [clause[[,] clause] ... ]

   loosely-structured-block

!$OMP END TASKGROUP

-or-

!$OMP TASKGROUP [clause[[,] clause] ... ]

   strictly-structured-block

[!$OMP END TASKGROUP]

clause

Is one of the following:

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.

A TASKGROUP construct binds to the current task region. The binding thread set of the taskgroup region is the current team.

When a thread encounters a TASKGROUP construct, it starts executing the region. There is an implicit task scheduling point at the end of the TASKGROUP region. The current task is suspended at the task scheduling point until all child tasks that it generated in the TASKGROUP region and all of their descendant tasks complete execution.

Any number of reduction clauses can be specified in the TASKGROUP directive, but a list item can appear only once in reduction clauses for that directive.