Intel(R) Parallel Debugger Extension

Submit New Article

Last Modified On :   January 16, 2009 9:19 AM PST
Rate
 


This whitepaper 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.

The Intel(R) Parallel Debugger Extension is part of the Intel(R) Parallel Studio. More information on the Intel(R) Parallel Studio can be found at http://www.intel.com/go/parallel.

It is also provided as part of the following product lines: Intel(R) Compiler Suite Professional Edition for Windows*, Intel(R) C++ Compiler Professional Edition for Windows* and Intel(R) Visual Fortran Compiler for Windows* in version 11.1 or higher.

For more information on these products visit http://software.intel.com/en-us/intel-compilers.


The advent of more and more “multi”- and “many” core processors requires extensive use of parallel programming models to best take advantage of the benefits these systems provide to program execution flow and thus to get the best 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.

ParallelDebuggerExtension.JPG

This document provides you with an introduction into the concepts and the features provided with the Intel® Parallel Debugger Extension for Microsoft Visual Studio* to achieve this.

The example code used throughout the attached whitepaper is based on the so-called N-Queens problem. A detailed description of the problem definition and solution sample code explaining various solutions employing parallel programming techniques can be found at http://software.intel.com/en-us/articles/solve-the-n-queens-problem-in-parallel.

 

Additional considerations when debugging parallel code:

Breakpoints and parallelized loops

With a single breakpoint inside a loop in an application the standard expectation may be that with a single click on "run/restart" you always return (loop around) to your breakpoint and have all debugger-windows updated accordingly.  In a heavily parallelized environment with more than one thread the behavior will however be different.

It may require several hits of the “Continue…” button to kick off all the threads and get the application running again.  Thus it may also take several runs for several threads to actually trigger a data sharing event and  this be detectable and logged in the Data Sharing Events window.

This is a property of debugging parallized code that you may want to be aware of, lest you come to incorrect conclusions about your code’s behavior too quickly.

Serializing already once entered parallel regions

One detail you may want to be aware of when using the Serialize Parallel Regions functionality is that you have to enable it before you enter the parallel region you would like to analyze. This functionality only affects the NEXT parallel region  you enter.

If you already ran through a parallel region once it will not affect the execution mode when you enter it anew. If the result of using Serialize Parallel Region seems to indicate to you that behavior may not actually have changed it is recommended to have a second look at your function callstack to clearly identify the start and end of the applicable parallel region. 

 

 

 

Known Issues to be fixed in next minor product update

On Microsoft Visual Studio* 2005 Parallel Debugger Extension Exception has to be enabled manually in Visual Studio* Debug pulldown menu

Detection of debug exceptions for the Intel® Parallel Debugger Extension in the Microsoft Visual Studio* environment needs to be enabled. After you first installed the Intel® Parallel Composer this may not be the case. It should happen automatically if you installed on Microsoft Visual Studio* 2008. After you first installed the Intel® Parallel Composer on Microsoft Visual Studio* 2005 this may however not be the case yet. To ensure the Intel® Parallel Debugger Exceptions are enabled in the Visual Studio* Debugger it is recommended to follow the steps outlined below.

From the “Debug” pulldown menu select “Exceptions…” and ensure that in the “Win32 Exceptions” treeview list the three boxes for “Intel Parallel Debugger Extension Exception” are enabled. Even if the menu shows they are enabled you may want to re-select it once more.

To further ensure that this setting is persistent please go to the “File” pulldown menu and select “Save all”.

 





This article applies to: ISN General,   Tools,   Intel® C++ Compiler for Windows* Knowledge Base,   Intel® Parallel Composer Knowledge Base,   Intel® Visual Fortran Compiler for Windows* Knowledge Base