Visible to Intel only — GUID: GUID-534BF9EE-D396-44F5-8CC5-33A430A5FFA0
Visible to Intel only — GUID: GUID-534BF9EE-D396-44F5-8CC5-33A430A5FFA0
MASTER
OpenMP* Fortran Compiler Directive: (Deprecated; see MASKED) Specifies a block of code to be executed by the master thread of the team.
!$OMP MASTER
loosely-structured-block
!$OMP END MASTER
-or-
!$OMP MASTER
strictly-structured-block
!$OMP END MASTER
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. |
The binding thread set for a MASTER construct is the current team. A master region binds to the innermost enclosing parallel region.
When the MASTER directive is specified, the other threads in the team skip the enclosed block (section) of code and continue execution. There is no implied barrier, either on entry to or exit from the master section.
The MASTER directive is deprecated; you should use the MASKED directive.
The following example forces the master thread to execute the routines OUTPUT and INPUT:
!$OMP PARALLEL DEFAULT(SHARED)
CALL WORK(X)
!$OMP MASTER
CALL OUTPUT(X)
CALL INPUT(Y)
!$OMP END MASTER
CALL WORK(Y)
!$OMP END PARALLEL