OpenMP* Source Compatibility and Interoperability with Other Compilers

Intel compilers include two sets of OpenMP libraries:

To select the Compatibility (default) or Legacy OpenMP libraries, use the Intel compiler to link your application and specify the Intel compiler option /Qopenmp-lib (Windows OS) or -openmp-lib (Linux OS and Mac OS X) .

The term "object-level interoperability" refers to the ability to link object files and libraries generated by one compiler with object files and libraries generated by the second compiler, such that the resulting executable runs successfully. In contrast, "source compatibility" means that the entire application is compiled and linked by one compiler, and you do not need to modify the sources to get the resulting executable to run successfully.

Different compilers support different versions of the OpenMP specification. Based on the OpenMP features your application uses, determine what version of the OpenMP specification your application requires. If your application uses an OpenMP specification level equal or less than the OpenMP specification level supported by all the compilers, your application should have source compatibility with all compilers, but you need to link all object files and libraries with the same compiler's OpenMP libraries.

OpenMP Compatibility Libraries Provided by Intel Compilers

The Compatibility libraries provide source compatibility and object-level interoperability with the OpenMP support provided by:

For Fortran applications on Linux systems, it is not possible to link objects compiled by the Intel® Fortran Compiler (ifort) with objects compiled by the GNU* Fortran compiler (gfortran). Thus, for mixed-language C++ and Fortran applications, you can do one of the following:

OpenMP Legacy Libraries Provided by Intel Compilers

The set of Legacy OpenMP libraries has been provided by Intel compilers for multiple releases and provide source compatibility and object-level interoperability with the current Legacy libraries and OpenMP libraries provided by previous Intel compiler versions, including those prior to version 10.0. The Legacy libraries are not compatible with OpenMP support from non-Intel compilers, such as Microsoft Visual C++*, GNU gcc*, or GNU Fortran.

You should only use the Legacy libraries if your application requires object-level interoperability with OpenMP library versions provided prior to Intel compilers version 10.0.

Guidelines for Using Different Intel Compiler Versions

To avoid possible linking or run-time problems, follow these guidelines:

Guidelines for Using Intel and Non-Intel Compilers

To avoid possible linking or run-time problems, follow these guidelines:

Limitations When Using OpenMP Compatibility Libraries with Other Compilers

Limitations of threadprivate objects on object-level interoperability: