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.
Table 16-1: OpenMP Enabled Functionality
ABS Function | DINDGEN Function | |
ACOS Function | | |
ACOSH Function | DOUBLE Function | |
| | |
ADJOINT Function | EXP Function | NEIGHBORS Function |
AFFINE Function | | NINT Function |
ALOG Function | FINDGEN Function | |
ALOG10 Function | FIX Function | |
| FLOAT Function | PRODUCT Function |
| FLTARR Function | RBFIMSCL Procedure |
ARRAYTRACE Function | | REBIN Function |
ASIN Function | GREAT_INT Function | REFORM Function |
ASINH Function | | REPLICATE Function |
| I32ARR Function | RESAMP |
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 | | |
COMPLEX Function | LINDGEN Function | |
COMPLEXARR Function | LINSPACE Function | TAN Function |
CONJ Function | LONARR Function | TANH Function |
COS Function | LONG Function | Outer Operations |
COSH Function | | TOTAL Function |
CPROD Function | MAKE_ARRAY Function | TRANSPOSE Function |
CUMSUM Function | | vecOverArr_* Functions |
DBLARR Function | MAX Function | WHERE Function |
DCINDGEN Function | | WhereIn Function |
DCOMPLEX Function | MIN Function | |
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.
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.