Intel® Threading Building Blocks - Threading performance and correctness analysis

Submit New Article


Last Modified On :   December 1, 2008 9:38 AM PST
Rate
 


Intel® Threading Building Blocks provides a rich library of generic constructs to help you write scalable parallel programs. This set of generic constructs includes parallel control flow structures (parallel_for, parallel_reduce, parallel_do, pipeline and others), concurrent containers (hash-maps, vectors, queues), and a basic set of low overhead synchronization primitives (read-write lock, queuing mutex, and spin-locks). Use Intel Threading Building Blocks to help you create high-performance scalable software that can run on many cores.

Threading introduces a variety of errors and performance issues that are not encountered in sequential software including data-races and dead-locks. Due to the inherent complexity of threading, isolating performance and correctness problems is difficult without the right software tools. The Intel® Threading Analysis Tools can detect errors and performance issues, helping you to simplify the process of debugging and tuning for multi-core processors. Intel Threading Building Blocks is designed to work well with the other Intel Threading Analysis Tools.


Intel Threading Analysis Tools include:
  • Intel® Thread Checker - Detects thread-correctness issues including data-races, dead-locks, and threads stalls. Use it to verify the correctness of your multi-threaded code.
  • Intel® Thread Profiler - Analyzes threading performance and lets you visualize thread interactions. Use it to identify threading performance bottlenecks and trace them down to the source code.

Intel Threading Tools can track threading events for applications that use native operating system threads and synchronization primitives (Win32* API or POSIX* threads) and OpenMP* directives. Intel Threading Analysis Tools also provide a special API for marking user-defined synchronization objects. Intel TBB uses this custom API, so you can effectively analyze and correct your multi-threaded applications using Intel Threading Analysis Tools.

To set up your system for threading performance and correctness analysis, do the following:

  1. Install Intel Threading Tools version 3.0 or higher, and follow the links for complete installation information and system requirements:
  2. Intel Thread Checker
  3. Intel Thread Profiler
  4. Create an Intel Thread Checker or Thread Profiler Activity within VTune™ Performance Environment that launches the application you developed using Intel Threading Building Blocks.

    Note: If this is your first time using Intel Threading Tools, read the Getting Started Guide for the tools:
  5. Intel Thread Checker Getting Started Guide
  6. Intel Thread Profiler Getting Started Guide
  7. Run the activity.
  8. Analyze results.

 

Note: Intel Threading Tools Graphical User Interface (GUI) is available for Windows* only. Command line versions are available to collect data on Linux*. You can always view the results from the GUI on a Windows* system.

Tip: The Intel Threading Building Blocks library initialization requires the creation of a task_scheduler_init object by each of the non-pool threads that might request Intel TBB work. If library components are used before this initialization occurs, your program will probably crash and burn very quickly.

For complete information about performance and correctness analysis with Intel Threading Tools please refer to the following documents:

 





This article applies to: Intel® Threading Building Blocks Knowledge Base