OpenMP
OpenMP (Open Multi-Processing) is a shared-memory parallelization extension to C, C++, and Fortran builtin to supporting compilers. OpenMP does parallelization across threads in a single process, rather than across processes in contrast to MPI. This means that variables, file handles, and other program state is shared in an OpenMP program with the downside that parallelization across multiple nodes is IMPOSSIBLE.
The following compilers that support OpenMP for C, C++, and/or Fortran and the compiler options to enable it are given in the table below.
Compiler | Option | SIMD Option | GPU Offload Option |
---|---|---|---|
GCC | -fopenmp | -fopenmp-simd | |
AMD Optimizing Compilers | -fopenmp | -fopenmp-simd | |
Intel Compilers | -qopenmp | -fopenmp-simd | |
LLVM | -fopenmp | -fopenmp-simd | |
Nvidia HPC Compilers, successor to the PGI compilers | -mp | -mp | -mp gpu |