OpenMP Compilers
A number of compilers from various vendors or open source communities implement the OpenMP API:
| Vendor/Source |
Compiler |
Information |
| »GNU |
gcc (4.3.2) |
Free and open source - Linux, Solaris, AIX, MacOSX, Windows
Compile with -fopenmp |
| »IBM |
XL C/C++ / Fortran |
Windows, AIX and Linux.
http://www-01.ibm.com/software/awdtools/fortran/ for XL Fortran http://www-01.ibm.com/software/awdtools/xlcpp/ for XL C/C++. |
| »Sun Microsystems |
C/C++ / Fortran | Sun Studio compilers and tools - free download for Solaris and Linux.
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 FortranMP | Fortran | |
| »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 C++ | Implements OpenMP 2.0 »More Information |
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.


RSS