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
Tells the compiler to process the OpenMP* pragmas.
Enables thread count independent (TCI) analysis mode instead of thread count dependent (TCD) analysis mode on OpenMP* applications.
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.
Using Intel® Thread Checker on OpenMP* Applications Compiled with the GNU* GCC Compiler
Intel® C/C++ Compiler 10.1 for Linux*
Intel® Fortran Compiler 10.1 for Linux*
Intel® Thread Checker 3.1 for Linux*
Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.