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

TASKWAIT

OpenMP* Fortran Compiler Directive: Specifies a wait on the completion of child tasks generated since the beginning of the current task.

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

clause

Is only allowed for ifx. It is one or more of the following:

  • DEPEND (dependence-type : list)

    The dependence-type MUTEXINOUTSET cannot be specified in a TASKWAIT directive. If dependence-type is DEPOBJ, the dependence object list items cannot have values that represent the MUTEXINOUTSET dependence type.

  • NOWAIT

    This clause can only be specified if at least one DEPEND clause is also specified.

    Only one NOWAIT clause can be specified in a TASKWAIT directive.

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

When the DEPEND clause is not specified, the current task region is suspended at an implicit scheduling point in the construct until the child tasks that the current task generated prior to the TASKWAIT have completed execution.

A TASKWAIT construct with one or more DEPEND clauses and a NOWAIT clause behaves as if the clauses were applied to a TASK construct with an empty structured block that generates a task whose execution is deferred until all preceding tasks of the current task complete execution before subsequently generated tasks that depend on this task begin execution.

A TASKWAIT construct with one or more DEPEND clauses and no NOWAIT clause behaves as if the DEPEND clauses were applied to a TASK construct with an empty structured block that generates an included and mergeable task. The current task is suspended until the preceding tasks of the current task complete execution.