OpenMP

 

This section discusses OpenMP, which is a specification for a set of compiler directives, library routines, and environment variables that can be used to specify shared memory parallelism in Fortran and C/C++ programs.

 

note

OpenMP is currently supported in PV-WAVE on Sun Solaris, Microsoft Windows, and Red Hat Enterprise Linux.

OpenMP is a hardware and software vendor supported specification designed to standardize compiler directives required to implement scalable, parallelized code for shared-memory multi-processor systems. One of the best things about OpenMP is the straightforward manner in which you can apply loop-level parallelization to sections of code in existing programs that would otherwise be unsuitable for multi-threading. This is what has been implemented for most of the array operations which take place in PV-WAVE.

To determine if a particular kernel routine supports OpenMP, look for the following logo:

 

at the top of the routine description within the PV-WAVE documentation. OpenMP Enabled Functionality lists the OpenMP enabled functionality of PV-WAVE. Besides the parallelized kernel routines previously listed, many Standard Library and some Math Library routines also run faster in parallel since they are built from composites of these kernel routines.

 

OpenMP Enabled Functionality

ABS Function

DINDGEN Function

Minimum Operator <

ACOS Function

Division Operator /

MOD

ACOSH Function

DOUBLE Function

Multiplication Operator *

Addition Operator +

EQ

NE

ADJOINT Function

EXP Function

NEIGHBORS Function

AFFINE Function

Exponentiation Operator ^

NINT Function

ALOG Function

FINDGEN Function

NOT

ALOG10 Function

FIX Function

OR

AND

FLOAT Function

PRODUCT Function

Array Concatenation Operators [ ]

FLTARR Function

RBFIMSCL

ARRAYTRACE Function

GE

REBIN Function

ASIN Function

GREAT_INT Function

REFORM Function

ASINH Function

GT

REPLICATE Function

Assignment Operator =

I32ARR Function

RESAMP Function

ATAN Function

I32INDGEN Function

REVERSE Function

ATANH Function

IMAGINARY Function

SIN Function

AVG Function

INDEX_CONV Function

SINH Function

BINDGEN Function

INDGEN Function

SLICE Function

BOUNDARY

INT32 Function

SMALL_INT Function

BYTARR Function

INTARR Function

SPMVM Function

BYTE Function

INTERPOL Function

SQRT Function

CINDGEN Function

INTRP Function

STDEV Function

CLUSTBOX Function

LE

Array Subscripting

COMPLEX Function

LINDGEN Function

Subtraction Operator –

COMPLEXARR Function

LINSPACE Function

TAN Function

CONJ Function

LONARR Function

TANH Function

COS Function

LONG Function

TENSOR Functions

COSH Function

LT

TOTAL Function

CPROD Function

MAKE_ARRAY Function

TRANSPOSE Function

CUMSUM Function

Matrix Multiplication Operator #

vecOverArr Functions

DBLARR Function

MAX Function

WHERE Function

DCINDGEN Function

Maximum Operator >

WHEREIN Function

DCOMPLEX Function

MIN Function

XOR

DCOMPLEXARR Function

 

 

PV‑WAVE provides the user with controls over the two OpenMP runtime parameters most critical to performance (see SET_OMP). These parameters are the number of threads to be used (Nthreads) and a threshold array size below which parallelization will not be considered (Threshold). Nthreads too high can degrade performance with superfluous thread overhead, and Nthreads too low can degrade performance with underused processors. The Threshold parameter prevents the overhead of a superfluous thread being created for the case Nthreads=1. The optimal values for these parameters vary depending on the hardware, operating system, mathematics, data type, and array size. Establishing these parameters for every array operation in a large PV‑WAVE application can be tedious. Fortunately PV‑WAVE can automatically vary these parameters so that they are optimal for any operation. Both the manual and the automatic methods are discussed in the following sections.