Intel Advisor

Intel Advisor, a tool for the validation of the parallelization potential with multithreading, can be available in the system B and C.

Table of Contents

Environment Settings

Software Version and System Requirements

Version System A System B System C
Intel Advisor XE 2013 Update 2 + +

Key: + = Available for use, – = Not available for use.

Setting Up System

Version Modulefile Name
2013 Update 2 iutils/xe2013

In the Intel compiler environment, execute the module command as shown below.

$ module load iutils/xe2013

For details on the module command, see Modules.

How to Use

Using Commands

Command Description
advixe-gui Starts the Intel Advisor GUI.
advixe-cl Starts the Intel Advisor command-line version.

Compile Option

When using the Intel Advisor, please specify an appropriate compile option for each tool to analyze.

Tool Compile Option
Survey and Suitability -g -O2
Correctness -g

For details, please refer to “Build Settings for C/C++ Applications” and “Build Settings for Fortran Applications” under “Choosing and Building a Target” in “Intel Advisor Help” that you can find in the Intel® Advisor 2013 Documentation.

Options

Options of the advixe-cl command
Option Description
-collect=string Specifies the analysis type.
-help Displays the help information of the command.

For details of options, refer to the output of advixe-cl -help.

Specifiable types of the -collect option of the advixe-cl command
Type Description
survey Measures the elapsed time.
suitability Estimates the progress rate of processing.
correctness Detects the parallelization problems.

How to Use in GUI

1. Compiling

The Survey tool is required to be used at first. Therefore, please compile with the -g -O2 option.

Example of Compiling with the Survey tool

$ icc -g -O2 test.c

2. Starting Intel Advisor

To start the Intel Advisor, execute the advixu-gui command on the Exceed onDemand.
For details on the xrun command, see Interactive Processing.

$ xrun advixe-gui 

Intel Advisor Starting Window

3. Creating projects

Select File > New > Project, the window below appears. Enter the appropriate Project name, then click Create Project.

Project Creating Window

4. Setting projects

The Project Properties window appears, specify the target program in the Application text box, then click OK. If an argument is required, specify it here.

Project Setting Window

5. Starting the Analysis

Advisor XE Workflow appears at the left of the window when the settings of project properties is completed. You can use the Intel Advisor by following the procedures of the Workflow.

Advisor XE Workflow Window

6. Locating the target for parallelism

At first, click Collect Survey Data under 1. Survey Target in the Advisor XE Workflow. This executes the application, and locates the loops and functions targeted for parallelism. When the application finishes, the Survey Report window will be displayed. Also, you can find the survey summary by clicking the Summary tab on the top of the window.

Survay Target Result Window

7. Adding the annotation

Based on the result of Survey Target, add Intel Advisor XE annotations to the processing targeted for parallelism. You can check the predicted parallel performance by executing the application that is added annotations and is re-compiled.

How to add annotations (C/C++)
  1. Include the headerfile (advisor-annotate.h) for annotations.
  2. Enclose the entire loops targeted for parallelism with ANNOTATE_SITE_BEGIN(sitename) and ANNOTATE_SITE_END().
  3. Enclose the processing for parallelism in the loop with ANNOTATE_TASK_BEGIN(taskname) and ANNOTATE_TASK_END().
Example of adding annotations (C/C++)
#include "advisor-annotate.h"
.....
    ANNOTATE_SITE_BEGIN(sitename1);
    for ( .... 
    {
        ANNOTATE_TASK_BEGIN(taskname1);
        ...
        ANNOTATE_TASK_END();
    }
    ANNOTATE_SITE_END();
How to add annotations (Fortran)
  1. Add an use statement (advisor_annotate) of a module for annotations.
  2. Enclose the entire loops targeted for parallelism with call annotate_site_begin(sitename) and call annotate_site_end().
  3. Enclose the processing for parallelism in the loop with call annotate_task_begin(taskname) and call annotate_task_end().
Example of adding annotations (Fortran)
use advisor_annotate
.....
call annotate_site_begin(sitename1)
do .....
    call annotate_task_begin(taskname1)
    ....
    call annotate_task_end()
enddo
call annotate_site_end()

8. Checking the parallel performance

Compile a program added anotations to check the parallel performance. When compiling, you need to specify the -g -O2 option, and also specify the include file path for annotation by -I option.

Examples of Compiling
$ icc -g -O2 test.c -I${ADVISOR_XE_2013_DIR}/include
$ ifort -g -O2 test.f90  -I${ADVISOR_XE_2013_DIR}/include/intel64

Execute Collect Suitability Data under 3. Check Suitability in the Advisor XE Workflow to the re-compiled application, to check the parallel performance.

9. Predicting problems in parallelism

To predict problems that can occur when parallelized, execute 4. Check Correctness in the Advisor XE Workflow. When executing Check Correctness, you need to use the application compiled by the -g debug option, not the optimization options.

 $ icc -g test.c

Specify the re-compiled application, then execute Collect Correctness Data under 4. Check Correctness in the Advisor XE Workflow.

10. Implementing the parallelism

Based on the result so far, implement the parallelism.

How to Use in CUI

1. Compiling

The Survey tool is required to be used at first. Therefore, please compile with the -g -O2 option.

Example of Compiling with the Survey tool
$ icc -g -O2 test.c

2. Locating the target for parallelism

Specify survey to the -collect option, then start the Intel Advisor CUI by advixe-cl. For details on the tssrun command, see Interactive Processing.

$ tssrun advixe-cl -collect=survey ./a.out

To check the results, execute the advixe-gui command in the X-Windows(GUI) environment(e.g., Exceed onDemand) with Intel Advisor GUI.

3. Adding the annotation

Based on the result of the check with -collect-survey, add Intel Advisor XE annotations to the processing targeted for parallelism. You can check the predicted parallel performance by executing the application that is added annotations and is re-compiled.

How to add annotations (C/C++)
  1. Include the headerfile (advisor-annotate.h) for annotations.
  2. Enclose the entire loops targeted for parallelism with ANNOTATE_SITE_BEGIN(sitename) and ANNOTATE_SITE_END().
  3. Enclose the processing for parallelism in the loop with ANNOTATE_TASK_BEGIN(taskname) and ANNOTATE_TASK_END().
Example of adding annotations (C/C++)
#include "advisor-annotate.h"
.....
    ANNOTATE_SITE_BEGIN(sitename1);
    for ( .... 
    {
        ANNOTATE_TASK_BEGIN(taskname1);
        ...
        ANNOTATE_TASK_END();
    }
    ANNOTATE_SITE_END();
How to add annotations (Fortran)
  1. Add an use statement (advisor_annotate) of a module for annotations.
  2. Enclose the entire loops targeted for parallelism with call annotate_site_begin(sitename) and call annotate_site_end().
  3. Enclose the processing for parallelism in the loop with call annotate_task_begin(taskname) and call annotate_task_end().
Example of adding annotations (Fortran)
use advisor_annotate
.....
call annotate_site_begin(sitename1)
do .....
    call annotate_task_begin(taskname1)
    ....
    call annotate_task_end()
enddo
call annotate_site_end()

4. Checking the parallel performance

Compile a program added anotations to check the parallel performance. When compiling, you need to specify the -g -O2 option, and also specify the include file path for annotation by -I option.

Examples of Compiling
$ icc -g -O2 test.c -I${ADVISOR_XE_2013_DIR}/include
$ ifort -g -O2 test.f90  -I${ADVISOR_XE_2013_DIR}/include/intel64

To check the parallel performance, specify suitability with the -survey option to the re-compiled application, and execute the Intel Advisor CUI by advixe-cl.

$ tssrun advixe-cl -collect=suitability ./a.out

To check the results, execute the advixe-gui command in the X-Windows(GUI) environment(e.g., Exceed onDemand) with Intel Advisor GUI.

5. Predicting problems in parallelism

Next, predict problems that can occur when parallelized. At this time, you need to use the application compiled by the -g debug option, not the optimization options.

 $ icc -g test.c

Specify correctness with the -survey option to the re-compiled application, and execute the Intel Advisor CUI by advixe-cl.

$ tssrun advixe-cl -collect=correctness ./a.out

To check the results, execute the advixe-gui command in the X-Windows(GUI) environment(e.g., Exceed onDemand) with Intel Advisor GUI.

6. Implementing the parallelism

Based on the result so far, implement the parallelism.

Manuals