Visual Studio* IDE: Choose Project and Build Application

To create an application the Intel Advisor can profile, you need to:

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

Install and Set Up Intel Advisor Sample Applications

  1. Copy the 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.

Open a Visual Studio* Solution

  1. Launch Microsoft Visual Studio*.

  2. Choose File > Open > Project/Solution.

  3. In the Open Project dialog box, open the nqueens_Advisor.sln file to display the nqueens_Advisor solution in the Solution Explorer:
    Microsoft* Visual Studio, after opening nqueens_Advisor sample solution

When using Visual Studio 2010 or later, you will first be prompted to convert the solution to the Visual Studio version you are using.

Choose a Startup Project

  1. Right-click the 1_nqueens_serial project.

  2. Choose Set as StartUp Project.

Verify the Application is Set to Build in Release Mode

  1. Display the Configuration Manager dialog box. For example, click Build > Configuration Manager....

  2. Verify the Active solution configuration drop-down list is set to Release.

  3. Click the Close button to close the Configuration Manager dialog box.

Verify Optimal Compiler/Linker Options for the Survey Tool

You can use the Survey tool provided with Intel Advisor to profile the selected startup project.

Applications compiled/linked using a release build with debug symbols produce the most accurate results. Verify that the application uses the following options:

  1. Right-click the 1_nqueens_serial project in the Solution Explorer.

  2. Choose Properties to display the Property Pages dialog box.

  3. Verify the Configuration drop-down list is set to Release or Active(Release).

  4. In the left pane, choose Configuration Properties > C/C++ > and:

    • Select General and verify the Debug Information Format is set to Program Database (/Zi) or Program Database for Edit & Continue (/ZI).

    • Select Optimization and verify that:

      • Optimization is set to Maximize Speed (/O2) or similar.
      • Inline Function Expansion is set to Only_inline (Ob1) or similar.

    • Select Code Generation and verify the Runtime Library field is set to Multi-threaded DLL (/MD) or Multi-threaded Debug DLL (/MDd).

  5. In the left pane, choose Configuration Properties > Linker > Debugging and verify the Generate Debug Info field is set to Yes (/DEBUG).

  6. Click the OK button to close the Property Pages dialog box.

Build and Test the Application's Target Executable

  1. Choose Build > Build 1_nqueens_serial.

  2. Choose Debug > Start Without Debugging.

  3. If the Visual Studio* IDE responds that any projects are out of date, click Yes to build.

  4. The default board size is 14. Check for a display similar to the following:

    Application output

    Notice this application output window displays:

    • The board size: 14.
    • The total time it took to run the application's target executable, such as: 6218 milliseconds (ms). Later we will compare this time with the time required to run the parallel version of the application. The time needed to run this sample on your system will be different.

    Press Enter (or any key) to dismiss the application output window.


This part of the tutorial uses the 1_nqueens_serial project. Later parts use different projects in the nqueens_Advisor solution, such as the 2_nqueens_annotated project.

Key Terms


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