Legacy Sun and Cray style parallelization directives are now deprecated. The compiler still recognizes these directives, but that may change in a later Sun Studio release. The OpenMP parallelization API is preferred. Information on how to migrate from legacy Sun/Cray directives to the OpenMP model appears in the OpenMP API User’s Guide.
Sun style parallelization directives are the default for -parallel and -explicitpar. Sun directives have the directive sentinel $PAR.
Cray style parallelization directives, enabled by the -mp=cray compiler option, have the sentinel MIC$. Interpretations of similar directives differ between Sun and Cray styles. See the chapter on parallelization in the Fortran Programming Guide for details. See also the OpenMP API User’s Guide for guidelines on converting legacy Sun/Cray parallelization directives to OpenMP directives.
Note that only the OpenMP directives are available for parallelization on x86 Solaris and Linux platforms.
Sun/Cray parallelization directives have the following syntax:
The first character must be in column one.
The first character can be any one of c, C, *, or !.
The next four characters may be either $PAR (Sun style), or MIC$ (Cray style), without blanks, and in either upper or lower case.
Next, the directive keyword and qualifiers, separated by blanks. The explicit parallelization directive keywords are:
TASKCOMMON, DOALL, DOSERIAL, and DOSERIAL*
Each parallelization directive has its own set of optional qualifiers that follow the keyword.
Example: Specifying a loop with a shared variable:
C$PAR DOALL SHARED(yvalue) Sun style CMIC$ DOALL SHARED(yvalue) Cray style |