Search
Support & Downloads
All of Support
This Category
Software Products
Performance Tools for Software Developers
Using the Intel® Compilers with Intel® Thread Checker

When you compile threaded applications to be analyzed by the Intel® Thread Checker with the Intel® C++ or Fortran Compilers, you must use the /Qtcheck (Windows*) or -tcheck (Linux*) options. You must have Intel® Thread Checker installed on the system you are compiling on, as the compilation will fail with {/Qtcheck,-tcheck} if Intel® Thread Checker cannot be found. The {/Qtcheck,-tcheck} option takes a mode argument which indicates the method of analysis to be performed for threaded applications. The possible values are:

tci Enables emulate-and-predicate analysis. It causes the Intel® Thread Checker to emulate OpenMP* threads (without creating real OpenMP* threads) and to predict errors that may occur if the program runs as a real OpenMP* program. This mode only has an effect on OpenMP* programs.
tcd Enables run-and-detect analysis. It causes the Intel® Thread Checker to detect errors while the program is running. This mode has an effect on OpenMP* and non-OpenMP* programs. This is the default if mode is not specified.
api Instruments system APIs for OpenMP* and non-OpenMP* programs.

If you then execute your application after compiling with {/Qtcheck,-tcheck}, it will generate a threadchecker.thr file which can be opened with Intel® Thread Checker. Alternatively, you can execute your application from within Intel® Thread Checker.

Using {/Qtcheck,-tcheck} will enable debug information automatically (/Zi on Windows*, -g on Linux*). Make sure that this information is not stripped by your build. Also, on Windows* you must specify the Linker option /fixed:no, which can be done in the Microsoft Visual Studio* 2005 IDE by setting Linker->Advanced->Fixed Base Address to "Generate a Relocation Section".

This applies to:
Intel® C++ Compiler
Intel® C++ Compiler for Linux*
Intel® C++ Compiler for Windows*
Intel® Fortran Compiler
Intel® Fortran Compiler for Linux*
Intel® Fortran Compiler for Windows*
Intel® Thread Checker
Intel® Thread Checker for Linux*
Intel® Thread Checker for Windows*

Solution ID: CS-025876
Date Created: 11-Apr-2007
Last Modified: 18-May-2007
Back to Top