Compiling OpenMP Programs
LC OpenMP Implementations:
As of June 2022, the documentation for LC’s default compilers claims the following OpenMP support:
| Compiler | Version | Supports |
|---|---|---|
| Intel C/C++, Fortran | intel/19.0.4 | OpenMP 5.0 |
| GNU C/C++, Fortran | 4.9 | OpenMP 4.5 |
| PGI C/C++, Fortran | pgi/22.1 | OpenMP 5.0 |
| IBM Coral Systems C/C++ | xl/2021.09.22 | OpenMP 4.5 |
| IBM Coral Systems Fortran | xl/2021.09.22 | OpenMP 4.5 |
| IBM Coral Systems GNU C/C++, Fortran | xl/2021.09.22 | OpenMP 4.5 |
OpenMP 4.0 Support:
According to vendor documentation, OpenMP 4.0 is supported beginning with the following compiler versions:
- GNU: 4.9 for C/C++ and 4.9.1 for Fortran
- Intel: 14.0 has “some” support; 15.0 supports “most features”
- PGI: not currently available
- IBM Coral Systems: 4.0, 4.5 - depending upon compiler
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 |
-qopenmp |
| PGI Linux Opteron/Xeon |
pgcc pgCC pgf77 pgf90 |
-mp |
| GNU Linux Opteron/Xeon IBM Blue Gene |
gcc g++ g77 gfortran |
-fopenmp |
| IBM Coral Systems |
xlc_r, cc_r xlC_r, xlc++_r xlc89_r xlc99_r xlf_r xlf90_r xlf95_r xlf2003_r *Be sure to use a thread-safe compiler - its name ends with _r | -qsmp=omp |
Compiler Documentation:
- IBM Coral Systems: https://hpc.llnl.gov/documentation/tutorials/using-lc-s-sierra-systems
- Intel: www.intel.com/software/products/compilers/
- PGI: www.pgroup.com
- GNU: www.gnu.org
- All: See the relevant man pages and any files that might relate in
/usr/local/docs




