The PDO directive specifies that the iterations of the immediately following DO loop must be executed in parallel. It takes the following form:
Adjusts the number of consecutive iterations assigned to a thread. At the end of the PDO construct, chunksize reverts to the default. The effect of CHUNK varies, depending on the scheduling type.
A chunksize specified in a PDO directive supersedes any chunksize set with a CHUNK directive earlier in the program, and applies only for the duration of the PDO construct.
For details on default chunksize and on the effect of specifying chunksizes for the same program in more than one context, see Section 22.214.171.124.
BLOCKED is allowed as an alternative spelling for CHUNK.
See Section 126.96.36.199.
The LASTLOCAL keyword is the same as the LASTPRIVATE clause described in Section 188.8.131.52.
LAST LOCAL is allowed as an alternative spelling for LASTLOCAL, even in free form source code.
Controls the scheduling type and allocation of work for the PDO construct.
There are several ways to specify a scheduling type. The scheduling type defaults to STATIC when no other information is available. For a description of mode and scheduling types, see Section 184.108.40.206.
At the end of the PDO construct, the scheduling type reverts to the default. The scheduling type does not affect the correctness of the program, but may affect performance.
Specifies that iterations are assigned to threads in the same order in which iterations would be generated by a normal Compaq Fortran DO statement.
See Section 220.127.116.11.
LOCAL is allowed as an alternative spelling for PRIVATE.
The REDUCTION keyword used here is different from the REDUCTION clause described in Section 18.104.22.168, where both a variable and an operator type need to be specified.
In this version of the keyword, the operator is not given in the PDO directive. The compiler must be able to determine the reduction operation from the source code.
The REDUCTION keyword can be applied to a variable in a DO loop only if the variable meets the following criteria:
x = x operator expr x = expr operator x (except for subtraction) x = operator(x, expr) x = operator(expr, x)
where operator is one of the following supported reduction operations: +, -, *, .AND., .OR., .EQV., .NEQV., MAX, MIN, IAND, or IOR.
The compiler rewrites the reduction operation by computing partial results into local variables and then combining the results into the reduction variable. The reduction variable must be SHARED in the enclosing context.
The iterations of the DO loop are distributed across the already existing threads.
Rules and Behavior
Specifying NOWAIT is the same as specifying NOWAIT in an OpenMP Fortran API DO directive (see Section 22.214.171.124).
PDO directives are permitted only within the lexical extent of the PARALLEL and END PARALLEL directives.
For more information about rules and restrictions, see your user manual.