Intel® Parallel Debugger Extension

This tutorial describes the Intel® Parallel Debugger Extension for Microsoft Visual Studio* included with the Intel® Parallel Studio 2011, Intel® Parallel Studio XE 2011 and Intel® Composer XE 2011 for Windows* distributions. With this debugger extension for Microsoft Visual Studio* the application developer can debug the most complex of today’s multicore programs.
The Intel® Parallel Debugger Extension provides fully integrated graphical user interface extension of the Microsoft Visual Studio* debugger. It is a debug solution targeted specifically at threaded and multicore based programs. Its advanced features provide easy access to the thread-specific properties of the program under test.

This tutorial provides tips and tricks on how to best take advantage of the additional insight into parallel data constructs the Intel® Parallel Debugger Extension brings to the Microsoft Visual Studio* debug environment. In doing so it provides a high-level overview of the Intel® Parallel Debugger Extension for Microsoft Visual Studio* and the key features that enhance the debug experience through enhanced visibility and more in depth understanding of

• the data shared between multiple threads in Intel® C++ Compiler built applications,
• the vectorized data streams processed in Single Instruction Multiple Data (SIMD) registers,
• the use and dependencies of reentrant function calls,
• Active OpenMP tasks lock information and thread team hierarchies,
• Serial versus parallel execution flows in applications using OpenMP* and Intel® Cilk™ Plus.
• Intel® Cilk™ Plus thread stack view

The Data Sharing Event Detection comes with enhanced event filters that allow to suppress unwanted event reporting and it also comes with the ability to focus your data sharing event analysis on dedicated code areas of interest. More details can be found in the attached full tutorial document (ParallelDebuggerExtension2011.pdf).

The advent of more and more “multi”- and “many” core processors requires extensive use of parallel programming models to take advantage of the benefits these systems provide to program execution flow and thus to get great performance out of these systems. Using more and more advanced parallel programming techniques makes it however more and more difficult to keep track of all active threads and their possible data inter-dependencies. The purpose of the Intel® Parallel Debugger Extension for Microsoft Visual Studio* is to pair the tools Intel provides for developing highly multi-threaded parallel applications with the debug extensions to allow for equally advanced and easily accessible features in the debugger. Advanced parallel programming techniques call for advanced parallel debugging techniques to keep the executions flow and the analysis of runtime problems straight forward and allow for speedy error corrections.
This tutorial provides you with an introductions into the concepts and the features provided with the IntelR) Parallel Debugger Extension for Microsoft Visual Studio* to achieve this.

Operating System: Microsoft Windows* XP SP2 or SP3, Microsoft Window* Vista or Micrsoft Windows* 7
Build Environment: Microsoft Visual Studio* 2005, Microsoft Visual Studio* 2008 or Microsoft Visual Studio* 2010
Hardware Platform: IA-32, Intel®64 architecture or compatible.

Debugger Extension Key Features
The Intel® Parallel Debugger Extension is part of the Intel® Parallel Composer component of the Intel® Parallel Studio. It is also provided as part of the following product lines: Intel® Parallel Studio XE and Intel® Composer XE 2011 for Windows* distributions as well as the corresponding Fortran and C++ only flavors. It consists of a set of features that can be accessed through the Visual Studio Debug pulldown menu. The additional insight provided into the parallel execution of the code to debug is grouped into the following menu entries.


Thread Data Sharing Detection
If an applications has been built using Intel’s Debug Runtime Library by having Parallel Debug Checks enabled /debug:parallel with the Intel® Compiler, data sharing violations can be detected. Thread data sharing detection supports applications that use the Windows* native threading or OpenMP* directives. It is necessary to set both the build options enabling the parallel language extensions or OpenMP* and /debug:parallel because the thread data sharing detection feature as well as the function re-entrancy detection rely not only on the debug information instrumentation triggered with /debug:parallel, but also on Intel specific parallel language extensions in the respective runtime libraries. The “Enable Detection” menu entry allows turning thread data sharing event detection on. An exception is raised when the Debugger Extension detects the sharing of data between different threads.

The Intel® Parallel Debugger Extensions monitors this exception and display the data sharing events in a dedicated window.
You can enable data sharing event detection and tell the Debugger Extension to halt execution when such an event occurs treating it as the equivalent of a data breakpoint halting execution. The data sharing events detection feature comes with extensive filtering capabilities so only data sharing violations in specific memory regions or data objects are being logged. Suppress filters make the data sharing analysis ignore accessed data or code accessing data that is covered by one or more filter. Focus filters make the data sharing analysis ignore everything that is not explicitly covered by one or more filters. Last but not least you can monitor data sharing events in a dedicated window.
From any of the data sharing events displayed in the Thread Data Sharing Events treeview window you can link back to the associated source code or assembly code via double click at an of the events listed.
A data sharing event that has been detected does not indicate that an actual violation causing faulty program execution occurred. It does however indicate that you may want to have a closer look at these events as more than likely they could point to a potential problem.
If you determined that an event is harmless you may also suppress future reporting by selecting the corresponding context menu entry.

Re-entrant Function Call Detection
From the Visual Studio* Debug pulldown menu you can access a dialog that turns on reentrant function call detection and instructs Visual Studio* to break and stop execution when different threads call a function at the same time. Thus it permits to debug and monitor accesses closely so you can decide what measures may need to be taken to ensure consistent execution behavior of your application. Prerequisite for the re-entrant function call detection again is compilation of your code with the Intel® Compiler having Parallel Debug Checks enabled (/debug:parallel).
To enable detection you would select the corresponding debug pulldown menu entry and specify a memory address that can be resolved as belonging to a specific function. Any access timing conflicts between multiple threads to that function will then cause the execution to break.

SSE Registers Window
The Visual Studio* debug pulldown menu gives you access to Intel® Streaming SIMD Extensions and MMX, SSE, SSE2, SSE3, SSE4 registers commonly used for data vectorization and single instruction multipe data (SIMD) handling. It displays vectors as rows (or columns) in a table display. Therefore, the SSE Registers Window is a window for displaying expressions, not as single values, but as a vector of values. It thus provides you with ways to change the representation of the data in those registers that makes their use in the debuggee application as well as the actual data mapping to the underlying hardware more transparent.

OpenMP* Debugging Support
From the Debug pulldown menu as well as the Intel® Parallel Debug Extension icons bar you can access information about OpenMP* data structures. The prerequisite for this menu entry to be available and grayed out is to have your application built with the OpenMP runtime library, which means that it requires to be compiled with the compiler option /Qopenmp set.

The OpenMP* data structures you can access directly are tasks, task wait lists, task spawn trees, barriers, locks and thread teams.

Serialize Parallel Regions
For code based on OpenMP*, CilK Plus and Intel’s parallel threading extensions, you can analyze and better understand possible timing issues with parallelized code regions by forcing serial execution.

This lets you determine whether an execution flow correctness issue has been introduced with parallelism, or whether there is a more fundamental coding error that shows up in serial execution as well.

You can modify program execution behavior on the fly and thus it provides a very useful feature for basic code correctness checking before investigating an issue further.

Intel® Cilk™ Plus Thread Stack View
The call stack of a Intel Cilk Plus worker thread can be non-monotonic as Intel Cilk Plus threads have the capability of reusing work done by other threads. This call stack viewer assists in unwinding the thread call stack while taking the specifics of the Cilk Plus threading implementation into account.
The Cilk Plus Thread Stack Window displays the textual call stack list of the worker threads its own dedicated window allowing the same functionality as the familiar call stack window while ensuring correct awareness of thread specific dependencies.

The Intel® Parallel Debugger Extension for Microsoft Visual Studio* provides you with the additional insight and access to shared data and data dependencies in your parallel application that is needed to facilitate fast development cycles and early detection of potential data access conflicts that can lead to serious runtime issues. It is recommended to use the Intel® Parallel Debug Extension for Microsoft Visual Studio* whenever you are taking advantage of Single Instruction Multiple data execution and/or parallized codes using native OS threading, Cilk Plus or OpenMP. In combination with the Intel® Inspector for optimized threading and threading correctness the Intel® Parallel Debugger Extension provides the capabilities to debug for code correctness with added awareness of parallelized code and data. Check it all out at

Don't forget to read the full tutorial with in-depth descriptions of Intel® Parallel Debugger extension use cases. The full tutorial is available as an attachment to this article (ParallelDebuggerExtension2011.pdf).

How to get the Intel® Parallel Debugger Extension
Intel ® Parallel Debugger Extension is a component of the Intel® Composer XE 2011 for Windows* which is part of Intel® Parallel Studio XE 2011. The product can be purchased, or an evaluation copy can be downloaded, from the Intel® Developer Zone (
On the same page you can find software product information, user forums, blogs, knowledge base articles and information how to get product support.

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

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.