ALIs
kommt nochIntel Threading Tools
Introductory Remarks
What do the threading tools provide?
The threading tools allow you to perform correctness and performance checking on multi-threaded applications (running in shared memory). The parallelization method may be based on POSIX or Linux Threads, or on OpenMP. For OpenMP applications it is necessary to use the Intel compilers in combination with suitably chosen compiler switches to perform the analysis of applications.
- Thread Checker is the tool which identifies and locates threading issues. Very often, concurrency problems (race conditions) are overlooked by the user during the parallelization process. This tool reliably identifies all problems of this kind; under the right conditions it is also possible to specify the exact location in the source code where things go wrong.
- Thread Profiler is the tool which provides performance analysis for threaded applications. For each parallel region in the code, scalability extrapolations can be performed, provided a sufficient number of program runs with varying number of threads are performed. Note that Thread Profiler at this point only supports remote data collection mode, using a Windows-based VTune/Threading Tools front end GUI. The Linux version only offers rudimentary functionality.
Availability on LRZ platforms
Threading tools (versions 3.0 and 3.1) are provided on the following systems:
-
Itanium-based HPC systems including SGI Altix.
-
EM64T-based systems, in particular the login nodes lx64ia2, lx64ia3
How to use the threading tools
Setting up the tools
Before using the threading tools please load the appropriated environment module:
module load threading_tools
Then, the commands tcheck_cl, tprofile_cl should be available in your program search path, and the -tcheck, -tprofile switches can be used with the Intel compilers.
Thread checker: thread-number independent mode
For performing checking in thread-number independent mode, please add the -tcheck compiler switch to the -openmp switch. Simply running the program will then produce an output file threadchecker.thr which can then be analyzed
- either by transferring it to a Windows-based system and reading it into Thread Checker there. This presupposes that you've installed the software there!
- or by running the CLI:
tcheck_cl ./threadchecker.thrThis will print out a table listing all threading issues found in the program.
Alternatively, you can also run tcheck_cl directly on the executable. The thread-number independent mode is not as useful as the thread-number dependent one described in the next section since OpenMP function calls cannot be covered - in fact they will usually be flagged as errors.
Thread checker: thread-number dependent mode
For performing checking in thread-number dependent mode, please compile with the -openmp compiler switch. Then, run the program using the CLI (after setting OMP_NUM_THREADS to an appropriate value):
tcheck_cl ./myprog.exe
This will print out a table listing threading issues found in the program, including those found in function calls - e.g., locks. However there are the following restrictions:
- usually, not all problems will be identified. It may be advisable to repeatedly run with varying settings of OMP_NUM_THREADS
- this mode does not properly work on Itanium based systems
Thread profiler
Please compile your program using the switch -tprofile -openmp; then run the command
tprofile_cl ./myprog.exe
This will produce rudimentary output to the console, but also a database which can be transferred to a Windows system with the Windows version of Thread Profiler installed for further analysis.
Some observations which may help
- Do not use a static variable called time in your OpenMP parallel C program. This symbol is obviously used within Thread Checker, and vitiating this rule simply produces a crashing program.
- The command line tools have a -help switch which provides further usage information
- The newest 3.1 update now also supports CSV output format (-f csv)
Documentation and Resources
Here is the documentation for usage of the threading tools:
-
Thread checker - Getting Started Version 3.0, Version 3.1 (240 kByte PDF)
-
Thread Checker - Diagnostics Guide (430 kByte PDF)
-
Thread Checker - Release Notes Version 3.0 , Version 3.1 (Text file)
-
Thread profiler - Getting Started Version 3.1 (400 kByte PDF)
-
Thread Profiler - Release Notes Version 3.0, Version 3.1 (Text file)
-
FAQs for Thread checker and Thread profiler (both HTML).