OpenMP is a standard for parallel programming on shared-memory systems, including multicore systems. It consists primarily of a set of compiler directives for sharing work among multiple threads. OpenMP is supported by all the Fortran, C, and C++ compilers installed on OSC systems.
Availability & Restrictions
OpenMP is available without restriction to all OSC users. It is supported by the Intel, PGI, and gnu compilers.
OpenMP support is built into the compilers. There is no separate module to load.
Building With OpenMP
To build a program with OpenMP, use the compiler flag appropriate to your compiler. The correct libraries are included implicitly.
An OpenMP program by default will use a number of threads equal to the number of processor cores available. To use a different number of threads, set the environment variable OMP_NUM_THREADS.
- The OpenMP® API specification for parallel programming, http://openmp.org/wp/openmp-specifications/