Tutorial: Where to Add Parallelism with Intel® Advisor 2015 and a C/C++ Sample

Standalone Intel Advisor GUI: Build Target in Release Mode and Create New Project

Follow these initial steps if you prefer to use the Standalone Intel Advisor GUI to complete this tutorial:

Each step is described more fully below.

Get Software Tools and Unpack the Sample

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

Acquire and Install Intel Advisor

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

Note

If you have not rebooted your system since you installed the Intel Advisor, please do so now.

Set Up Intel Advisor Sample Application

  1. Copy the nqueens_Advisor.tgz file from the <install-dir>/samples/<locale>/Fortran/ directory to a writable directory or share on your system. The default installation path (<install-dir>) is opt/intel/advisor_xe_201n/.

  2. Extract the sample from the .tgz file.

  3. Verify you have set the EDITOR or VISUAL environment variable to your source code editor.

Verify Optimal Compiler/Linker Settings for Survey Tool

Applications compiled/linked using the following options produce the most accurate, complete, analysis results. Verify the sample code uses the optimal release build settings for the Survey and Suitability tools.

To Do This

Use These Release Build Settings for Survey and Suitability Tools

Use These Debug Build Settings for Correctness Tool

Search additional directory related to Intel Advisor annotation definitions.

-I${ADVISOR_XE_2015_DIR}/include

-I${ADVISOR_XE_2015_DIR}/include

Compiler: Request full debug information.

-g

-g

Compiler: Request moderate optimization (for Survey and Suitability tool) or disable optimization (for Correctness tool).

-O2 or higher and -fno-inline-functions

-O0

Linker: Search for unresolved references in multithreaded, dynamically linked libraries.

-Bdynamic

Linker: Request full debug information

-g

-g

Linker: Enable dynamic loading

-ldl

-ldl

Build Target in Release Mode

In a terminal session:

  1. Change directory to the nqueens_Advisor/ directory (where the zipped sample files were extracted to).

  2. Type make 1_nqueens_serial to build the target in release mode.

Test Target

In the terminal session:

  1. Type ./1_nqueens_serial.

  2. Check for output similar to the following.
    Target output

  3. Notice the application output window displays a board size of 14 and the total time it took to run the target.

Open Intel Advisor GUI

In the terminal session:

  1. Type one of the following source commands to set up your environment:

    • source <install-dir>/advixe-vars.sh (using the bash shell)

    • source <install-dir>/advixe-vars.csh (using the C shell)

    Note

    The default installation directory <install-dir> is below opt/intel/.

  2. Type advixe-gui & to run the Intel Advisor GUI in the background.

Create New Intel Advisor Project

  1. In the Intel Advisor GUI, 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 ~/intel/advixe/projects/nqueens_Advisor/ directory (default location) and display a dialog box similar to the following.
    Project Properties dialog box

  3. In the Analysis Target tab, ensure the Target type drop-down is set to Survey/Suitability Analysis.

  4. Click the Browse... button next to the Application field and choose the nqueens_Advisor/1_nqueens_serial file. Notice the Intel Advisor autofills the project Working directory field for you.

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

    • Click the Browse button button in the Add new search location line.

    • Navigate to and select the nqueens_Advisor/ directory.

    • Verify the Search recursively box is deselected.

  6. Click the OK button to add the changes. Notice that the project name appears in the Intel Advisor GUI title bar and the Advisor Workflow.

Key Terms

target

Next Step

Discover Parallel Opportunities


Submit feedback on this help topic