Parallel Programming Guide for HP-UX Systems

OpenMP
HP’s implementation of OpenMP
Chapter 4 85
HP’s implementation of OpenMP
This section discusses HP’s implementation of OpenMP.
Command-line option
HP OpenMP directives are only accepted if the command-line option +Oopenmp is given.
NOTE +Oopenmp implies +Onodynsel, +Oparallel, and +Onoautopar.
Default
The default command-line option is +Onoopenmp. If +Oopenmp is not given, all OpenMP
directives (c$omp) are ignored.
Optimization levels and parallelism
+Oopenmp is accepted at all optimization levels. However, the following differences exist
between Itanium-based and PA-RISC architectures.
Itanium-based architectures
OpenMP is accepted at all optimization levels on Itanium-based architectures.
Parallelization directives and worksharing directives can be compiled at any optimization
level from +O0 through +O4. Additionally, OpenMP will interoperate with +objdebug,
+noobjdebug, and -g. Therefore, source-level debugging of parallelized applications is
supported subject to the same restrictions of debugging at +O2 or below.
PA-RISC architectures
The following limitations exist for OpenMP on PA-RISC architectures.
For parallel and work-shared directives (including the clauses for these directives), code is
parallelized only at optimization levels +O3 or +O4. The parallel and work-shared directives
are listed in Table 4-1 on page 86.
Optimization levels +O0 through +O2
When using optimization levels +O0 through +O2:
All sync and run-time library directives are processed and honored.