An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.


Home

OpenMP Directives: Synchronization Constructs: TASKWAIT Directive

Purpose:

  • New with OpenMP 3.1

  • The TASKWAIT construct specifies a wait on the completion of child tasks generated since the beginning of the current task.

Format:

Fortran

!$OMP TASKWAIT

C/C++

#pragma omp taskwait  newline

Restrictions:

Because the taskwait construct does not have a C language statement as part of its syntax, there are some restrictions on its placement within a program. The taskwait directive may be placed only at a point where a base language statement is allowed. The taskwait directive may not be used in place of the statement following an if, while, do, switch, or label. See the OpenMP 3.1 specifications document for details.