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.
Table 15-1: 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
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
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.