Don't use the OpenMP THREADPRIVATE 'compatibility' option when everything is compiled by Intel

Introduction : The Intel C++ and Fortran compilers for Windows* and Linux* provide 'legacy' and 'compatibility' implementations of the OpenMP THREADPRIVATE directive (-Qopenmp-threadprivate:[compat | legacy], -openmp-threadprivate [compat | legacy]).  The 'compat' option should not be used when everything is compiled by Intel compilers. Doing some may result in application crashes or incorrect results. In this case, the 'legacy' option (which is the default) should be used.  The 'compat' option should only be used when some of the objects in an application have been compiled by a compatible Microsoft* or GNU* compiler.

Version : 11.x, 12.x


Application Notes : -Qopenmp-threadprivate:legacy (-openmp-threadprivate legacy) is the default when -Qopenmp (-openmp) is specified.  This setting does not provide compatibility with the THREADPRIVATE implementation used by other compilers. -Qopenmp-threadprivate:compat (-openmp-threadprivate compat) can be used when some of the objects in an application have been compiled by a compatible Microsoft* or GNU* compiler.  This setting provides compatibility with the implementation provided by the Microsoft* and GNU* compilers.


Building the Application : -Qopenmp (-openmp) must be given when using -Qopenmp-threadprivate (-openmp-threadprivate), or the compiler will not recognize the OpenMP THREADPRIVATE directive (warning #161: unrecognized #pragma).


Known Issues or Limitations : On Mac OS* X systems, 'legacy' is the only type of THREADPRIVATE implementation supported. Option '-openmp-threadprivate' is not recognized by the compiler.

For more complete information about compiler optimizations, see our Optimization Notice.