Intel® Thread Checker for Linux* - Compiler settings for Linux* OpenMP* applications when using Thread Checker

Submit New Article

September 18, 2008 12:00 AM PDT


Recommended Intel® Compiler Settings for Linux* OpenMP* Applications When Using the Intel® Thread Checker

Get the best results from Intel® Thread Checker by using the following command to compile your Linux* OpenMP* applications:

icc file.c -openmp [-tcheck] -O0 -g
Switch Purpose
-openmp
(required)
Tells the compiler to process the OpenMP* pragmas.
-tcheck
(optional)
Enables thread count independent (TCI) analysis mode instead of thread count dependent (TCD) analysis mode on OpenMP* applications.
-O0
(recommended)

Allows Intel® Thread Checker to more easily associate errors to source lines.

Intel® Thread Checker can also analyze optimized binaries, but it is difficult for Intel® Thread Checker to pinpoint the source code location causing a problem in optimized assembly that does not have specific source lines.

-g
(highly recommended)

Creates symbols for the binary. Intel® Thread Checker uses the symbols to associate addresses to source lines.

Note: For binaries compiled without -g (no symbols), Intel® Thread Checker instruments using API Imports. Intel® Thread Checker cannot find all threading errors within a binary that is instrumented with API Imports. The Default of API Imports instrumentation on a particular file can be changed to Full Image via advanced settings in Intel® Thread Checker, but the result is that you will not see the source code that caused the problem, only the assembly.

Note: Intel® Thread Checker requires the dynamic versions of the following libraries:

  • OpenMP* Runtime Library (libguide.so or libiomp5.so)
  • Posix* Thread Library (libpthread.so)
  • C Runtime Library (libc.so)

Linking to any of the following static libraries causes problems with Intel® Thread Checker:

  • OpenMP* Runtime Library (libguide.a or libiomp5.a)
  • Posix* Thread Libra ry (libpthread.a)
  • C Runtime Library (libc.a)

The switch -static is not compatible with Intel® Thread Checker, as it links the static version of these libraries.

Related Documentation

  • Using Intel® Thread Checker on OpenMP* Applications Compiled with the GNU* GCC Compiler

Confirmed On:

  • Intel® C/C++ Compiler 10.1 for Linux*
  • Intel® Fortran Compiler 10.1 for Linux*
  • Intel® Thread Checker 3.1 for Linux*
Optimization Notice

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804



Do you need more help?


This article applies to: Intel® Thread Checker for Linux* Knowledge Base,   Software Products General