NEW
Purpose
Use the NEW directive to specify which variables should be local in a PARALLEL DO loop or a PARALLEL SECTIONS construct. This directive performs the same function as the PRIVATE clause of the PARALLEL DO directive and PARALLEL SECTIONS directive.
Class
The NEW directive only takes effect if you specify the -qsmp compiler option.
Rules
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,
DO
CONCURRENT
, 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 Optimization and Programming Guide.
Examples
INTEGER A(10), C(10)
REAL B(10)
INTEGER FUNC(100)
!SMP$ PARALLEL DO
!SMP$ NEW I, TMP
DO I = 1, 10
TMP = A(I) + COS(B(I))
C(I) = TMP + FUNC(I)
END DO



