Intel® Advisor GUI: Build Application and Open the Project

To create an application the Intel Advisor tools can use to predict parallel performance and possible parallel data sharing problems, you need to:

Get Software Tools and Unpack the Sample

If you completed this step in the previous part of this tutorial, skip to Verify optimal compiler/linker options.

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

  • Intel Advisor, including sample applications
  • .zip file extraction utility
  • Supported compiler (see Release Notes for more information)

Acquire Intel Advisor

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

Install and Set Up Intel Advisor Sample Applications

  1. Copy the nqueens_Advisor.zip file from the <install-dir>\samples\<locale>\C++\ directory to a writable directory or share on your system. The default installation path is C:\Program Files\Intel\Advisor XE 2013\ (on certain systems, instead of Program Files, the directory name is Program Files (x86).
  2. Extract the sample from the .zip file.

Verify Optimal Compiler/Linker Options

You can use the Intel Advisor Suitability and Correctness tools to predict parallel performance and possible parallel data sharing problems.

Applications compiled/linked using the following options produce the most accurate, complete results.

Compiler/Linker Settings

Release Build for Suitability

Debug Build for Correctness

Compiler: Debug information

Debug Information Format > Program Database (/Zi).

Debug Information Format > Program Database (/Zi).

Compiler: Optimization

Maximize Speed (/O2)

Inline Function Expansion > Only __inline (/Ob1)

Disabled (/Od)

Compiler: Code Generation

Runtime Library > either Multi-threaded Debug DLL (/MDd) or Multi-threaded DLL (/MD)

Compiler: search an additional include directory

Command line: /I"%ADVISOR_XE_2013_DIR%"\include)

In Visual Studio: C/C++ > General > Additional Include Directories > $(ADVISOR_XE_2013_DIR)\include

Command line: /I"%ADVISOR_XE_2013_DIR%"\include)

In Visual Studio: C/C++ > General > Additional Include Directories > $(ADVISOR_XE_2013_DIR)\include

Linker Options

Debugging > Generate Debug Info > Yes (/DEBUG).

Debugging > Generate Debug Info > Yes (/DEBUG).

Build the Target Executable

  1. From the Windows* Start menu, choose Intel Parallel Studio XE 2013 > Command Prompt > Parallel Studio XE > IA-32 Visual Studio [2008 | 201x] mode to set your environment.

  2. Change directory to the nqueens_Advisor\ directory in its unzipped location.

  3. If you choose IA-32 Visual Studio 20xx mode, type devenv nqueens_Advisor.sln to convert the nqueens_Advisor.sln solution. When conversion is complete, close the Visual Studio* IDE.

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

Verify the Target Executable Runs Outside the Intel Advisor

  1. Change directory to nqueens_Advisor\Release.
  2. Type 2_nqueens_annotated.exe to execute the application.
  3. Check for output similar to the following:



Open the Intel Advisor GUI

From the Windows* Start menu, choose Intel Parallel Studio XE 2013 > Intel Advisor XE 2013.

The previously opened project should be re-opened and its name should appear in the title bar and in the Project Navigator:
Intel Advisor GUI after opening a project

If the project was closed, either click the nqueens_Advisor link below Recent Projects: in the Welcome page, or choose File > Recent Projects... and select the recently created project name.

Modify Project Properties

  1. Verify that the project is open by viewing its name in the title bar.

  2. Click File > Project Properties... or click the toolbar icon to display a dialog box similar to the following:
    Project Properties dialog box

  3. For the selected Target type of Survey/Suitability, click the Browse... button next to the Application field and select the nqueens_Advisor\2_nqueens_annotated.exe file.

  4. For the selected Target type of Correctness:

    • Click the Browse... button next to the Application field and select the nqueens_Advisor\Debug\2_nqueens_annotated.exe file. Notice that Intel Advisor autofills the project Working directory field for you.

    • To the right of Application parameters, type a value of 8. This reduces the board size to minimize execution time.

  5. Click the Binary/Symbol Search tab. In this tab:

    • Click the line labeled Add new search location.
    • Click the button on the right of that line.
    • Navigate to and select the nqueens_Advisor directory.
    • Click OK to add the line.
    • With your own application, repeat the above steps if you need to include other directories. You can move the current line up, down, and delete lines using the buttons on the lower-right.

  6. Click the Source Search tab. In this tab:

    • Locate the line labeled Add new search location.
    • Click the button on the right of that line.
    • Navigate to and select the nqueens_Advisor directory.
    • Click OK to add the line.
    • With your own application, repeat the above steps if you need to include other local directories. You can also use wildcard characters (*.cpp) or specific file names to be included or excluded. You can move the current line up, down, and delete lines using the buttons on the lower-right.

  7. When all directories are complete, click the OK button to display a nqueens_Advisor project is open window.

Key Terms

target

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.