The DO_PARALLEL directive tells the compiler to run an indexed DO- loop in parallel. It takes the following form:
cPAR$ DO_PARALLEL [count]
The numeric expression must evaluate to a positive, non-zero integer. If necessary, the process converts it to an integer by truncation. For example, 50.56 is acceptable and is converted to 50. However, 0.20 is not acceptable because it is converted to zero.
The indexed DO statement must be the next executable statement following the DO_PARALLEL directive. Only comments can appear between the directive and its corresponding DO-loop.
The parallel DO-loop control variable must be a private integer. If it is not specified PRIVATE, the compiler gives an informational message and changes the control variable's default to PRIVATE. If the control variable is not an integer, the compiler gives an error.
A parallel DO-loop cannot contain the following:
A parallel DO-loop must not have a branch into or out of its body.
When calculations in parallel DO-loops require scalar (sequential) execution to achieve correct results, you must guard those calculations (called critical regions) against parallel execution. This situation occurs when calculations modify shared values that are needed in successive iterations of the parallel DO-loop or elsewhere in the routine.
For details on directives that guard critical regions, see Section 11.3.4.