Fork me on GitHub

OpenMP Directives: Fortran Directive Format

Format: (case insensitive)

sentinel directive-name [clause ...]
All Fortran OpenMP directives must begin with a sentinel. The accepted sentinels depend upon the type of Fortran source. Possible sentinels are:
!$OMP
C$OMP
*$OMP
A valid OpenMP directive must appear after the sentinel and before any clauses. Optional. Clauses can be in any order, and repeated as necessary unless otherwise restricted.

Example:

!$OMP PARALLEL DEFAULT(SHARED) PRIVATE(BETA,PI)

Fixed Form Source:

Free Form Source:

General Rules:

!$OMP   <directive > 

    [ structured block of code ] 

!$OMP end   <directive >