Next: Independent Example 1
Up: Expressing Parallel Execution
Previous: The INDEPENDENT Directive
There are a number of conditions imposed on INDEPENDENT which
ensure that it really does
not matter which order the iterations are performed in.
If an INDEPENDENT loop
- assigns to same element twice parallel integrity would be lost,
- contains EXIT, STOP or PAUSE then the iterations must
progress sequentially so as to ensure that the loop is terminated on the
correct iteration,
- contains jumps out of loop then, again, the iterations must
progress sequentially so as to ensure that the loop is terminated on the
correct iteration,
- performs external I/O then the iterations must
progress sequentially so as to ensure that the file is read from or
written
to in the correct order,
- prefixes statements other than DO or FORALL then it has no
meaning and will cause an error.
(Hint: To decide whether a Fortran 90 or FORTRAN 77 loop is INDEPENDENT reverse
the
upper and lower bounds and negate the stride. If the loop still produces
exactly the same effect then it must be INDEPENDENT.)
Return to corresponding overview page
Next: Independent Example 1
Up: Expressing Parallel Execution
Previous: The INDEPENDENT Directive
©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997Not for commercial use.