Developer Guide and Reference

Contents

Using the OpenMP* Libraries

This section describes the steps needed to set up and use the OpenMP* Libraries from the command line.
On Windows* systems, you can also build applications compiled with the OpenMP libraries in the Microsoft Visual Studio* development environment.
For a list of the options and libraries used by the OpenMP* libraries, see OpenMP* Support Libraries .
Set up your environment for access to the Intel®
C++
Compiler to ensure that the appropriate OpenMP* library is available during linking.
On Windows* systems, you can either execute the appropriate batch (
.bat
) file or use the command-line window supplied in the compiler program folder that already has the environment set up.
On Linux*
and
macOS*
systems, you can source the appropriate script file (
compilervars
file).
During compilation, ensure that the version of
omp.h
used when compiling is the version provided by that compiler.
For example, use the
omp.h
provided with gcc when you compile on Linux* systems.
Be aware that when using the gcc* or Microsoft* compiler, you may inadvertently use inappropriate header/module files. To avoid this, copy the header/module file(s) to a separate directory and put it in the appropriate
include
path using the
-I
option.
If a program uses data structures or classes that contain members with data types defined in
omp.h
file, then source files that use those data structures should all be compiled with the same
omp.h
file.
The following table lists the commands used by the various command-line compilers for both C and C++ source files.:
Operating System
C Source Module
C++ Source Module
Linux*
gcc