Intel® Advisor GUI: Build Application and Create New Project

To create an application the Intel Advisor can profile:

Get Software Tools and Unpack the Sample

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 (x86)\Intel\Advisor XE 2013\ (on certain systems, instead of Program Files, the directory name is Program Files).

  2. Extract the sample from the .zip file to a writable directory or share on your system.

Verify Optimal Compiler/Linker Options

You can use the Intel Advisor Survey tool to profile your application.

Applications compiled/linked for a release build using the following options produce the most accurate, complete results.

Compiler/Linker Settings

Release Build Options

Compiler: Debug information

Debug Information Format > Program Database (/Zi).

Compiler: Optimization

Optimization > Maximize Speed (/O2).

Inline Function Expansion > Only __inline (/Ob1) or similar.

Linker Options

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 | 2010 | 2012 | 2013] mode to set your environment.

  2. Change directory to the nqueens_Advisor\ directory (where the zipped files were extracted to).

  3. If you choose IA-32 Visual Studio 20xx mode, type devenv nqueens_Advisor.sln to convert the nqueens.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.

Note

This first part primarily uses the 1_nqueens_serial project. Later parts use different projects in the nqueens solution, such as 2_nqueens_annotated (both Release and Debug configuration).

Verify the Target Executable Runs Outside the Intel Advisor

  1. Change directory to nqueens_Advisor\Release.

  2. Type 1_nqueens_serial.exe to execute the application.

  3. Check for output similar to the following:

Open the Standalone Intel Advisor GUI

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

Tip

Keep the command prompt window open.

Create a New Project and Specify its Properties

  1. Choose File > New > Project... (or click New Project... in the Welcome page) to display a dialog box similar to the following:
    Create a Project dialog box

  2. Type nqueens_advisor in the Project name field. Then click the Create Project button to create a config.advixeproj file in the \Temp\Samples\ directory (default location) and display a dialog box similar to the following:
    Project Properties dialog box

  3. For the selected Target type of Survey/Suitability Analysis, click the Browse... button next to the Application field and select the nqueens_advisor\Release\1_nqueens_serial.exe file. Notice the Intel Advisor autofills the project Working directory field for you.

  4. Click the Binary/Symbol 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.
    • Later when you use your own application, you may need to repeat the above steps to include other directories. You can move the current line up, down, and delete lines using the buttons on the lower-right.
    • In this case, do not select (check) the Search recursively box (lower-left corner).

  5. 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.
    • Later when using your own application, repeat the above 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.
    • In this case, do not check the Search recursively box (lower-left corner).

  6. When the directories are complete, click the OK button. Notice that the project name appears in the title bar.

You have created a project and specified its project properties. At any time, to modify project properties for the currently opened project, click the Project properties icon in the Intel Advisor toolbar.

Key Terms

target

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