Standalone GUI: Build Application and Create New Project

Follow these steps only if you are using the Standalone Intel Inspector GUI to complete this tutorial.

To create an application the Intel Inspector can inspect for memory errors:

Get Software Tools

You need the following tools to try tutorial steps yourself using the tachyon_insp_xe sample application:

  • Intel Inspector, including sample applications

  • .zip file extraction utility

  • Supported compiler (see Release Notes for more information)

Acquire the Intel Inspector

If you do not already have access to the Intel Inspector, you can download an evaluation copy from http://software.intel.com/en-us/articles/intel-software-evaluation-center/.

Install and Set Up the Intel Inspector Sample Applications

  1. Copy the tachyon_insp_xe.zip file from the <install-dir>\samples\<locale>\C++\ directory to a writable directory or share on your system. The default <install-dir> is below C:\Program Files (x86)\Intel\ (on certain systems, instead of Program Files (86), the directory name is Program Files).

  2. Extract the sample from the .zip file to create the tachyon_insp_xe directory.

Note

  • Samples are non-deterministic. Your screens may vary from the screen captures shown throughout this tutorial.

  • Samples are designed only to illustrate the Intel Inspector features; they do not represent best practices for creating code.

Verify Optimal Compiler/Linker Settings

You can use the Intel® Inspector to analyze:

  • Memory errors in debug and release modes of:

    • C++ binaries - The Intel Inspector can analyze native code in native and mixed native/managed binaries.

    • Fortran binaries - The Intel Inspector can analyze native code in native binaries.

  • Threading errors in debug and release modes of:

    • C++ binaries - The Intel Inspector can analyze native and managed code in native, managed, and mixed native/managed binaries.

    • Fortran binaries - The Intel Inspector can analyze native code in native binaries.

Applications compiled/linked in debug mode using the following settings produce the most accurate and complete analysis results.

Compiler/Linker Property

Correct C/C++ Setting

Correct Fortran Setting

Impact If Not Set Correctly

Debug information

Enabled (/Zi or /ZI)

Enabled (/debug:full)

Missing file/line information

Optimization

Disabled (/Od)

Disabled (/Od)

Incorrect file/line information

Dynamic runtime library

Selected (/MD or /MDd)

Selected (/libs:dll/threads or libs:dll/threads/dbglibs )

False positives or missing code locations

Basic runtime error checks

Disabled (do not use /RTC; Default option in Visual Studio* IDE)

None (/check:none)

False positives

Build the Application

  1. From the Windows* Start menu, choose All Programs > Intel Parallel Studio XE 2013 > Command Prompt > Parallel Studio XE with Intel Compiler > IA-32 Visual Studio [2008 | 2010] mode to set up your environment.

  2. Change directory to the tachyon_inspxe\vc9\ directory in its unzipped location.

  3. If you chose IA-32 Visual Studio 2010 mode, type devenv tachyon_insp_xe.sln to convert the tachyon_insp_xe.sln solution. When conversion is complete, close the Visual Studio* IDE.

  4. Type devenv tachyon_insp_xe.sln /Build to build all projects in the solution.

Verify the Application Runs Outside the Intel Inspector

  1. Change directory to find_and_fix_memory_errors_Win32\Debug\.

  2. Type find_and_fix_memory_errors.exe ..\..\..\dat\simpleballs.dat to execute the application.

  3. Check for application output similar to the following:


    Application output

    Notice the application output window is empty. The cause: Memory errors. This is how the application output should look after various memory errors are resolved:


    Application output

Tip

Keep the command prompt window open.

Open the Standalone Intel Inspector GUI

From the Windows* Start menu, choose All Programs > Intel Parallel Studio XE 2013 > Intel Inspector XE 2013.

Create a New Project

  1. Choose File > New > Project... to display a dialog box similar to the following:
    Create a Project dialog box

  2. In the Project name field, type memory. Then click the Create project button to create a config.inspxeproj file in the \Inspector\Projects\memory\ directory (default location) and display a dialog box similar to the following:
    Target tab in the Project Properties dialog box

  3. Click the Browse... button next to the Application field and select the tachyon_insp_xe\vc9\find_and_fix_memory_errors_Win32\Debug\find_and_find_memory_errors.exe application. Notice the Intel Inspector autofills the project Working directory field for you.

  4. Click the Modify button next to the Application Parameters field. In the Application Parameters window, click the Add Path to File... button, change the Select the file to launch window to show all files, choose the tachyon_insp_xe\dat\simpleballs.dat file, click the Open button, and click the OK button to close the Application Parameters window. Then click the OK button to return to the Welcome page, where the name of the opened project displays in the title bar and in the Project Navigator pane. (If necessary, choose View > Project Navigator to display the Project Navigator.).

Key Terms

False positive


Studio-specific supplemental documentation may be available at <install-dir>\<studio>\documentation\ .

For more complete information about compiler optimizations, see our Optimization Notice.