XL Fortran supports many directives available with other Fortran products. This ensures easy portability between products. If your code contains trigger_constants other than the defaults in XL Fortran Version 6, you can use the -qdirective compiler option to specify them. For instance, if you are porting CRAY code contained in a file xx.f, you would use the following command to add the CRAY trigger_constant:
xlf95 xx.f -qdirective=mic\$
For fixed source form code, in addition to the ! value for the trigger_head portion of the directive, XL Fortran Version 6 also supports the trigger_head values C, c, and *.
For more information, see -qdirective Option.
XL Fortran supports a number of programming terms as synonyms to ease the effort of porting code from other Fortran
products. Those terms that are supported are dependent on context, as
indicated in the following tables:
Figure 41. PARALLEL DO Clauses and Their XL Fortran Synonyms
PARALLEL DO Clause | XL Fortran Synonym |
---|---|
LASTLOCAL | LASTPRIVATE |
LOCAL | PRIVATE |
MP_SCHEDTYPE and CHUNK | SCHEDULE |
SAVELAST | LASTPRIVATE |
SHARE | SHARED |
NEW | PRIVATE |
Figure 42. PARALLEL DO Scheduling Types and Their XL Fortran Synonyms
Scheduling Type | XL Fortran Synonym |
---|---|
GSS | GUIDED |
INTERLEAVE | STATIC(1) |
INTERLEAVED | STATIC(1) |
INTERLEAVE(n) | STATIC(n) |
INTERLEAVED(n) | STATIC(n) |
SIMPLE | STATIC |
Figure 43. PARALLEL SECTIONS Clauses and Their XL Fortran Synonyms
PARALLEL SECTIONS Clause | XL Fortran Synonym |
---|---|
LOCAL | PRIVATE |
SHARE | SHARED |
NEW | PRIVATE |
The NEW directive is a means for specifying which variables should be local in a PARALLEL DO loop or a PARALLEL SECTIONS construct. It performs the same function as the PRIVATE clause of the PARALLEL DO directive and PARALLEL SECTIONS directive.
Background Information:
The NEW directive only takes effect if you specify the -qsmp compiler option.
Syntax:
>>-NEW--named_variable_list------------------------------------>< |
The NEW directive must immediately follow either a PARALLEL DO directive or a PARALLEL SECTIONS directive.
If you specify the NEW directive, you must specify the corresponding PARALLEL DO or PARALLEL SECTIONS directive with no clauses.
If the NEW directive follows the PARALLEL DO directive, the first noncomment line (not including other directives) following the NEW directive must be a DO loop. This line cannot be an infinite DO or DO WHILE loop.
A variable name in the named_variable_list of the NEW directive has the same restrictions as a variable name appearing in the PRIVATE clause of the PARALLEL DO directive or a PRIVATE clause of the PARALLEL SECTIONS directive. See the sections on the PARALLEL DO directive and the PARALLEL SECTIONS construct in the XL Fortran for AIX Language Reference.
Examples
!SMP$ PARALLEL DO !SMP$ NEW I, TMP DO I = 1, 10 TMP = A(I) + COS(B(I)) C(I) = TMP + FUNC() END DO