Fork me on GitHub

Compiling OpenMP Programs

LC OpenMP Implementations:

As of June 2015, the documentation for LC’s default compilers claims the following OpenMP support:

Compiler Version Supports
Intel C/C++, Fortran 14.0.3 OpenMP 3.1
GNU C/C++, Fortran 4.4.7 OpenMP 3.0
PGI C/C++, Fortran 8.0.1 OpenMP 3.0
IBM Blue Gene C/C++ 12.1 OpenMP 3.1
IBM Blue Gene Fortran 14.1 OpenMP 3.1
IBM Blue Gene GNU C/C++, Fortran 4.4.6 OpenMP 3.0

OpenMP 4.0 Support:

According to vendor documentation, OpenMP 4.0 is supported beginning with the following compiler versions:

Use the command use -l compilers to view compiler packages by version. You can also view compiler version information at: https://computing.llnl.gov/code/compilers.html

Compiling:

All of LC’s compilers require you to use the appropriate compiler flag to “turn on” OpenMP compilations. The table below shows what to use for each compiler.

Compiler / Platform Compiler Flag
Intel
Linux Opteron/Xeon
icc
icpc
ifort
-openmp
PGI
Linux Opteron/Xeon
pgcc
pgCC
pgf77
pgf90
-mp
GNU
Linux Opteron/Xeon
IBM Blue Gene
gcc
g++
g77
gfortran
-fopenmp
IBM
Blue Gene
bgxlc_r, bgcc_r bgxlC_r, bgxlc++_r bgxlc89_r bgxlc99_r bgxlf_r bgxlf90_r bgxlf95_r bgxlf2003_r *Be sure to use a thread-safe compiler - its name ends with _r -qsmp=omp

Compiler Documentation: