The PDONE directive is an executable statement that terminates the current parallel DO loop. It takes the following form:
The PDONE directive terminates the current parallel DO loop early, without completing any iterations that have not yet been assigned to a thread. Any iterations that have already been assigned to a thread are completed.
PDONE directives are permitted only within the lexical extent of a PDO or PARALLEL DO construct.
When the scheduling type is STATIC or INTERLEAVED, a PDONE directive has no effect because all iterations are assigned before execution of the parallel DO loop begins.