HP Fortran Programmer's Guide (B3908-90031; September 2011)

Using Fortran directives
Compatibility directives
Chapter 9216
NOTE The + Ovectorize option is valid only on the PA-RISC systems.
Controlling parallelization
HP Fortran can parallelize eligible program loops by distributing different iterations of the loop to different
processors for parallel execution on a multiprocessor machine. The following directives provide local
control over parallelization:
*$* [NO]CONCURRENTIZE
DIR$ [NO]CONCUR
These directives have both enable and disable versions: *$* CONCURRENTIZE and DIR$ CONCUR enable
parallelization; *$* NOCONCURRENTIZE and DIR$ NOCONCUR disable parallelization.
The parallelization directives are effective only if you have compiled and linked the program with the
+Oparallel and the +O3 option. Each directive applies to the beginning of the next loop and remains in
effect for the rest of the program unit or until superseded by a later directive.
The compiler considers the *$* CONCURRENTIZE and DIR$ CONCUR directives as requests to parallelize
a loop. If the compiler cannot profitably or safely parallelize the loop, it ignores the directive. For
information about conditions that can inhibit parallelization, see the Parallel Programming Guide for
HP-UX Systems.
Controlling dependence checks
The compiler will not parallelize a loop where it detects a possible data dependence, even if you use an
option or directive that specifically requests parallelization. However, if you know that there is no actual
data dependence in the loop in question, you can insert one of the following directives just before the loop:
DIR$ IVDEP
FPP$ NODEPCHK
VD$ NODEPCHK
The effect of these directives is to cause the compiler to ignore data dependences within the next loop when
determining whether to parallelize. The DIR$ IVDEP directive differs from the other two in that it causes
the compiler to ignore only array-based dependences, but not scalar-based. All three directives apply to the
next loop only.
NOTE Using these directives to incorrectly assert that a loop has no data dependences can result in
the loop producing wrong answers.