OpenMP Compilers
A number of compilers from various vendors or open source communities implement the OpenMP API:
| Vendor/Source |
Compiler |
Information |
| »GNU |
gcc |
Free and open source - Linux, Solaris, AIX, MacOSX, Windows OpenMP 3.1 is supported since GCC 4.7 » GCC OpenMP Wiki Compile with -fopenmp |
| »IBM |
XL C/C++ / Fortran |
AIX and Linux.
http://www.ibm.com/developerworks/ http://www-01.ibm.com/software/awdtools/fortran/ for XL Fortran http://www-01.ibm.com/software/awdtools/xlcpp/ for XL C/C++. |
| »Oracle |
C/C++ / Fortran | Oracle Solaris Studio compilers and tools - free download for Solaris and Linux.Oracle Solaris Studio 12.2 compilers support OpenMP 3.0
Compile with -xopenmp |
| »Intel |
C/C++ / Fortran
(10.1) |
Windows, Linux, and MacOSX.
Compile with -Qopenmp on Windows, or just -openmp on Linux or Mac OSX |
| »Portland Group Compilers and Tools | C/C++ / Fortran | »More Information on PGI Compilers
Compile with -mp |
| »Absoft Pro Fortran | Fortran | Version 11.1 of the Fortran 95 compiler for Linux, Windows and Mac OS X includes integrated OpenMP 3.0 support. Compile with -openmp. »More Information |
| »Lahey/Fujitsu Fortran 95 | C/C++ / Fortran | »More Information |
| »PathScale | C/C++ / Fortran | Linux 32/64 bit. »PathScale Compiler Suite User Guide |
| »HP | C/C++ / Fortran | »More Information |
| »MS | Visual Studio 2008-2010 C++ | Implements OpenMP 2.0 Not all versions support OpenMP. Visual Studio 2008 supports OpenMP in the Standard, Professional and Team System Editions. Visual Studio 2010 supports OpenMP in the Professional, Premium and Ultimate Editions. »More Information |
| »Cray | Cray C/C++ and Fortran | Supports OpenMP 3.0 on the Cray XT series Linux environment. OpenMP is on by default. »More Information |
| OpenUH Research Compiler | C/C++/Fortran | Supports OpenMP 3.0. »More Information |
Test Your Compiler and Environment
Here is a trivial test program that you can use to test your compiler and environment (file hello.c):
#include <omp.h> |
Compilation should proceed with no errors or warnings.
Execute the output, called variously a.out, a.exe, hello.exe . You should see more than one “Hello” line
with different thread numbers. Note that the lines may be mixed together. If you see only one, try setting the environment variable OMP_NUM_THREADS to some number (say 4) and try again.


