HOME
| OPENMP API Specification: "Version 5.2 -- GIT rev 95b2e3a44"

3.1.2  Free Source Form Directives

The following sentinels are recognized in free form source files:  

 
!$omp | !$ompx  

The !$omp sentinel is reserved for OpenMP directives that are defined in this specification. The !$ompx sentinel is reserved for implementation-defined extensions to the OpenMP directives.

The sentinel can appear in any column as long as it is preceded only by white space. It must appear as a single word with no intervening white space. Fortran free form line length and white space rules apply to the directive line. Initial directive lines must have a space after the sentinel. The initial line of a directive must not be a continuation line for a base language statement. Fortran free form continuation rules apply. Thus, continued directive lines must have an ampersand (&) as the last non-blank character on the line, prior to any comment placed inside the directive; continuation directive lines can have an ampersand after the directive sentinel with optional white space before and after the ampersand.

Comments may appear on the same line as a directive. The exclamation point (!) initiates a comment. The comment extends to the end of the source line and is ignored. If the first non-blank character after the directive sentinel is an exclamation point, the line is ignored.

One or more blanks or horizontal tabs are optional to separate adjacent keywords in directive-names unless otherwise specified.

In the following example the three formats for specifying the directive are equivalent (the first line represents the position of the first 9 columns):
 
!23456789 
       !$omp parallel do & 
                 !$omp shared(a,b,c) 
 
       !$omp parallel & 
      !$omp&do shared(a,b,c) 
 
!$omp paralleldo shared(a,b,c)