Setting up your compilerEdit
To do any useful OpenMP programming, you will need a compiler that supports it.
- The GNU C Compiler (GCC) has OpenMP 3.1 support since version 4.7. This compiler comes with practically any Linux system; for instance, on Ubuntu you can install it (and a set of related tools) with
sudo apt-get install build-essential. To find out the version of GCC that you have installed, issue
gcc --versionon the command line.
- The Intel C Compiler supports OpenMP.
- The Clang compiler, shipped with Apple's Xcode, does not support OpenMP as of April 2014, but an experimental version by Intel does.
- Microsoft Visual C++ apparently has limited support for OpenMP, depending on the version.
- The LLVM-GCC compiler, shipped with older versions of Apple's Xcode, does not support OpenMP.
The OpenMP website has a more complete list of compilers with OpenMP support.
Apart from a compiler, we'll also be using the
make tool in this book. You can do without if you want to use a different build system.