Compiler Settings for Memory Error Analysis in Intel Parallel Inspector

Introduction :
Memory error analysis in Intel® Parallel Inspector can analyze just about any native binary.  However, some settings make analysis easier.

For the Purposes of this article - when I refer to Intel® Parallel Inspector - I am referring to the memory error analysis within Intel® Parallel Inspector.

Useful Settings for memory error analysis in Intel® Parallel Inspector:

Switch

Purpose

/Zi, /ZI
(highly recommended)

Intel® Parallel Inspector uses the symbols to associate addresses to source lines. 

Additionally using this setting is one of the ways in which leak detection is done.

  

Settings which impact memory error analysis in Intel Parallel Inspector

/Od
(recommended for Initial analysis)

Allows Intel® Parallel Inspector to more easily associate errors to the correct source line.

Threading Error analysis can also analyze optimized binaries, but it is difficult for Intel® Parallel Inspector to pinpoint the source code location causing a problem in optimized assembly that does not have specific source lines.

Note: While it is easier to do analysis of binaries built with /Od, it is also important to check for memory errors in your "released" (not /Od) version of your binaries.

/RTC[su1]

It is likely you want to use this setting to detect memory errors in your program. It detects some memory errors which Intel® Parallel Inspector does not identify.

These settings initialize uninitialized memory with a bit pattern preventing memory error analysis in Intel® Parallel Inspector from identifying uninitialized memory errors in your code.

There is some duplication in the kinds of errors that memory error analysis will do at Level 4 with this switch.

  

Settings not recommended for use with memory error analysis in Intel® Parallel Inspector:

Switch

Purpose

/Qtcheck
(do not use)

This setting is an alternative method of instrumentation for Intel® Thread Checker.  Intel® Parallel Inspector does not use this switch.

/Qtprofile

(do not use)

This setting is an alternative method of instrumentation for Intel® Thread Profiler.  Intel® Parallel Inspector does not use this switch.

/debug:parallel

(do not use)

This setting enables the Intel® Parallel Debugger Extension for the Intel® Parallel Composer.  It is not used for the Intel® Parallel Inspector

  

Settings which have no impact on memory error analysis of Intel® Parallel Inspector:

Switch

Purpose

/FIXED[:NO]

This setting which allows binaries to be instrumented and is not required for Intel® Parallel Inspector.  It is required for callgraph in Intel® VTuneTM Performance Analyzer, Intel® Thread Checker and Intel® Thread Profiler.

/MDd, MD, MT, MTd

This setting chooses which version of the C runtime to use.  This switch impacts Intel Parallel Amplifier and threading error analysis for Intel Parallel Inspector.  Memory error analysis in Intel Parallel Inspector works with all versions of the C Runtime.

/Qopenmp-link

This setting chooses which version of the OpenMP* runtime to use.  This switch impacts Intel® Parallel Amplifier and threading error analysis for Intel Parallel Inspector.  Memory error analysis in Intel Parallel Inspector works with all versions of the OpenMP* runtime.

/D "TBB_USE_THREADING_TOOLS"

This setting causes Intel Threading Building Blocks (TBB) be instrumented.  This switch impacts Intel® Parallel Amplifier and threading error analysis for Intel® Parallel Inspector.  But is not used for memory error analysis in Intel® Parallel Inspector.

  

More Information:

This article addressed the most obvious switches that developers would have concerns over.  Most switches will work with Intel® Parallel Inspector - but not every switch combination is tested.  If you have information regarding other switches, please add a comment to this article.  If you have question regarding a particular switch please submit an issue to the Intel® Parallel Studio Forum.

Version :
Intel® Parallel Inspector
Intel® Parallel Composer
Intel® C++ Compiler for Windows* 11.0
Intel® C++ Compiler for Windows* 10.1
Microsoft* Visual Studio 2005
Microsoft* Visual Studio 2008

Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.