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 sample application:

  • Intel Advisor, including sample applications

  • .zip file extraction utility

  • Supported compiler (see Release Notes for more information). Intel Advisor samples require the Intel® Visual Fortran compiler included in Intel® Composer XE.

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>\Fortran\ 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 (x86), the directory name is Program Files).

  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.sln file to display the nqueens 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 > Fortran > and:

    • Select General and verify the Debug Information Format is set to Full (/debug:full).

    • Select Optimization and verify that:

      • Optimization is set to Maximize Speed or similar.
      • Inline Function Expansion is set to Only INLINE directive (/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.

When using a C/C++ application, the build options are different (see the Intel Advisor help).

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: 6797 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 solution, such as the 2_nqueens_annotated project.

Key Terms


Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.