Parallel Programming Guide for HP-UX Systems

OpenMP
HP’s implementation of OpenMP
Chapter 486
Parallel and work-shared directives (including the clauses for these directives) are only
processed. While they will return right answers, you will not achieve parallel code. Each
thread will run a serial version of the code.
Optimization levels +O3 through +O4
When using optimization levels +O3 and +O4:
All sync and run-time library directives are processed and honored.
Parallel and work-shared directives (including the clauses for these directives) are
processed and honored. The compiler will generate the parallel and work-shared code
required to go parallel.
Parallelism
Nested parallelism is now supported dynamically, and with the use of the NUM_THREADS
clause on the Parallel directive, finer-grained control of parallelism is possible. This also
allows parallelized code to use parallel versions of MLIB.
Additionally, statically-nested parallelization is enabled.
Arrays
Arrays are allowed in reduction clauses as well as scalar variables.
Table 4-1 Parallel and work-shared directives
Parallel / work-shared
directives
Opt level
accepted
Opt level
required to
achieve
parallelism
PARALLEL +O0, +O1, +O2 +O3, +O4
PARALLEL DO +O0, +O1, +O2 +O3, +O4
PARALLEL SECTIONS +O0, +O1, +O2 +O3, +O4
DO +O0, +O1, +O2 +O3, +O4
SECTION +O0, +O1, +O2 +O3, +O4
SECTIONS +O0, +O1, +O2 +O3, +O4