Q&A from Webinar: Find Errors in Windows* C++ Parallel Applications

Submit New Article

Last Modified On :   June 30, 2009 5:56 PM PDT
Rate
 


On April 14, 2009 Bernth Andersson presented a technical session and live demo webinar focusing on the Intel(R) Parallel Debugger Extension and it's use for identifying parallel coding issues and run-time problems related to concurrency. Below are questions that came up during this webinar and answers to those questions.  

Q1. Can you disable a single specific parallel region?

A: The "Serialize Parallel Region" option of the Intel(R) Parallel Debugger extensions temporarily sets the OpenMP* omp_set_num_threads() environment variable to 1, thus forcing single threaded execution even on a multi-core system. This temporary change applies to the next parallel block or parallel region in your code relative to the current EIP or program counter location.

Thus, yes - the "Serialize Parallel Region" option can be applied to a specific parallal region of your choice. You can do so by setting a breakpoint just before you enter the parallel region you would like to have executed as a single serial thread and then selecting the serialization option from the Intel(R) Parallel Debugger Extension menu inside Microsoft* Visual Studio. 


Q2. Do the Parallel Debugger Extensions only support OpenMP* or also native Windows* threads or Threading Building Blocks? 
A: Most of the Parallel Debugger Extension features like Thread Data Sharing Event Detection, Function Reentrancy Detection amd Serialize Parallel Region, rely on instrumentation of debug information and on the OpenMP* library. As such these features are currently only available for OpenMP* based threading. The one feature that is independent of the threading model used are the enhanced and highly configurable SSE register windows.

Q3. Do the Intel(R) Parallel Debugger Extensions use similar instrumentations as the Intel(R) Parallel Inspector? 
A: The debug symbol information instrumentation done by the Intel(R) C++ Compiler when the /debug:parallel option is set along with /Zi is different from the code instrumentations used by the Intel(R) Parallel Inspector for it's instrumentation assisted operating mode.
The Intel(R) Parallel Debugger Extensions do not rely on executable code instrumentation, but rather on instrumentation of the symbol information used for debugging. As such the Parallel Debugger Extensions cannot statically anaylze the execution flow, but rely on a detectable event that may be of interest happening at real time during a debug session. At the same time, because only the debug information is instrumented there should only be very minimal performance impact on the execuatble if run outside the Microsoft* Visual Studio Debugger.

Q4. Is the compiler option /Qpenmp required for use of the Intel(R) Parallel Debugger Extension?
A: Yes, all enhanced parallelism features of the Intel(R) Parallel Debugger Extensions rely on OpenMP* based threading, except for the SSE register windows.

Q5.  Do the Intel(R) Parallel Debugger Extensions require the use of the Intel(R) Compiler?
A: Yes, the Parallel Debugger Extensions rely on debug info instrumentation added with the Intel(R) Compiler option /debug:parallel in conjunction with /Qopenmp. Therefore the full capabilities of the Intel(R) Parallel Debugger Extensions are only available when used with the Intel(R) Compiler.

Q6. Can I use the Intel(R) Parallel Debugger Extensions to debug parallelism in the Intel(R) Integrated Performance Primitives and to serialize execution in them?
A: In principle yes, BUT this would require rebuilding and relinking the Intel(R) IPP with symbol information and /debug:parallel. Since you are most likely taking the primitives from prebuilt libraries that you link into your project, this not really a supported usage model, although it may work in some cases depending on how the call to the Intel(R) IPP function of your choice is embedded in the rest of your application.
The short answer thus is really no, with some exceptions.

Q7.  Does the OpenMP* library have to be linked in statically? Can 3rd party OpenMP* libraries be used?

A: The OpenMP* library can be linked in statically or dynamically into your application build for the use of the Intel(R) Parallel Debugger Extension. The OpenMP* library used by the Intel(R) C++ Compiler is really a standard OpenMP* library. However, there is the dependency on the debug information instrumentation using /debug:parallel. This instrumentation has only been tested and is only expected to work with the OpenMP* libraries provided with the Intel(R) Compiler.

Q8. What is the main benefit of the SSE Register Window? Does it depend on OpenMP*?
A: The SSE Register Window allows you to group the display of the register contents and display said contents in the exact way that you are using it in your parallelized loops, your structured arrays or other parallel structures. By doing this the highly configurable SSE Register Window provides you with the link between your data as it is used in your application and the way this very same data is actually stored and processed in the SSE registers.

This can be quite valuable for understanding more complex heavily parallel multimedia or graphics code for instants.

This feature does not rely on any instrumentation or any specific threading implementation. It is independent of OpenMP*. 

For additional questions please also refer to the Intel(R) Parallel Debugger Extension article and whitepaper at http://software.intel.com/en-us/articles/parallel-debugger-extension/




This article applies to: Parallel Programming,   Intel® Compilers,   Intel® Parallel Composer Knowledge Base