Parallel Programming Guide for HP-UX Systems

OpenMP
From HP Programming Model to OpenMP
Chapter 4 91
From HP Programming Model to OpenMP
This section discusses migration from the HP Programming Model (HPPM) to the OpenMP
parallel programming model.
Syntax
The OpenMP parallel programming model is very similar to the HP Programming Model
(HPPM). The general thread model is the same, the spawn (fork) mechanisms behave in a
similar fashion, etc. However, the specific syntax to specify the underlying semantics has been
changed significantly.
The following table shows the OpenMP directive or clause (relative to the directive) and the
equivalent HPPM directive or clause that implements the same functionality. Certain clauses
are valid on multiple directives, but are typically listed only once unless there is a distinction
warranting further explanation.
Exceptions are defined immediately following the table.
Table 4-2 OpenMP and HPPM Directives/Clauses
HPPM OpenMP
!$dir parallel
task_private(list)
<‘shared’ is default>
<None, see below>
!$OMP parallel
private (list)
shared (list)
default (private|shared|non
e)
!$dir
loop_parallel(dist)
blocked(chunkconstant)
ordered
!$OMP do
schedule(static[,chunkconst
ant])
ordered
!$dir begin_tasks(dist) !$OMP sections
!$dir next_task !$OMP section
!$dir loop_parallel
<see parallel and
loop_parallel(dist)
clauses>
!$OMP parallel do
<see parallel and do
clauses>