Fortran User's Guide

Form of Parallelization Directive Lines

Parallel directives have the following syntax.


!MIC$ DOALL [general parameters] [scheduling parameter]

A parallelization directive line is defined as follows.

The form varies for fixed-form and free-form source as follows.

Fixed

Free

Thus, !MIC$ in columns 1 through 5 works for both free and fixed.

Example: Directive with continuation lines (DOALL directive and parameters.)


C$PAR DOALL
!MIC$&   SHARED( a, b, c, n )
!MIC$&   PRIVATE( i )
	DO i = 1, n
		a(i) = b(i) * c(i)
	END DO

Example: Same directive and parameters, with no continuation lines.


C$PAR DOALL  SHARED( a, b, c, n )  PRIVATE( i )
	DO i = 1, n
		a(i) = b(i) * c(i)
	END DO