15.2.1 Syntax Rules for Parallel Directives (TU*X only)

The following general syntax rules apply to all parallel compiler directives. You must follow these rules precisely to compile your program properly and obtain meaningful results.

A parallel directive prefix (tag) takes one of the following forms:

c$OMP
c$PAR


c
Is one of the following: C (or c), !, or *.

The following are source form rules for directive prefixes:

Parallel directives can be continued and comments can be mixed within a continued parallel directive. The directive prefix must appear on each line of a continued directive.

A comment can follow a directive on the same line.

Additional Fortran statements (or directives) cannot appear on the same line as the parallel directive.

Parallel directives cannot appear within a continued Fortran statement.

Examples

The following examples are equivalent:

  !$OMP PARALLEL DO  &
  !$OMP SHARED(A,B,C)

  !$OMP PARALLEL  &
  !$OMP SHARED(A,B,C)

  !$OMP PARALLEL DO SHARED(A,B,C)


Previous Page Next Page Table of Contents