Intel® Advisor User Guide

ID 766448
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Run Threading Perspective from Command Line

Threading perspective includes several steps that you are recommended to run one by one:

  1. Collect performance metrics and find candidates for parallelizing using a Survey analysis.

  2. Annotate manually loops/functions to model parallelization for.

  3. Model parallel design options and estimate speedup for the annotated loops using a Suitability analysis.

  4. Check for loop-carried dependencies to make sure the loops/functions are safe to parallelize.

TIP:
See Intel Advisor cheat sheet for quick reference on command line interface.

Prerequisites

Set Intel Advisor environment variables with an automated script to enable the advisor command line interface (CLI).

Run Threading Perspective

Note: In the commands below, make sure to replace the myApplication with your application executable path and name before executing a command. If your application requires additional command line options, add them after the executable name.

  1. Run the Survey analysis.
    advisor --collect=survey --project-dir=./advi_results -- ./myApplication
  2. Run the Characterization analysis to collect trip counts and FLOP data.
    advisor --collect=tripcounts --project-dir=./advi_results --flop -- ./myApplication
  3. View the Survey report to identify candidates for parallelization. For example, run the following command to print the report in command line:

    advisor --report=survey --project-dir=<project-dir>

    Consider analyzing loops/functions with high total time.

  4. In the application source code, annotate loops/functions of interest to model parallelization for.

    Rebuild the application as usual to make the annotations available for the Intel Advisor.

  5. Run the Suitability analysis to model threading for the annotated loops/functions:

    advisor --collect=suitability --project-dir=./advi_results -- ./myApplication
  6. Run the Dependencies analysis to check for loop-carried dependencies in the annotated loops:

    advisor --collect=dependencies --project-dir=./advi_results -- ./myApplication

You can view the results in the Intel Advisor graphical user interface (GUI), print a summary to a command prompt/terminal, or save to a file. See View the Results below for details.

Analysis Details

Each analysis in the Threading perspective has a set of additional options that modify its behavior and collect additional performance data.

Consider the following options:

Characterization Options

To run the Characterization analysis, use the following command line action: --collect=tripcounts.

Recommended action options:

Options

Description

--flop

Collect data about floating-point and integer operations, memory traffic, and mask utilization metrics for AVX-512 platforms.

--stacks

Enable advanced collection of call stack data.

Dependencies Options

To run the Dependencies analysis, use the following command line action: --collect=dependencies.

Recommended action options:

Options

Description

--filter-reductions

Mark all potential reductions with a specific diagnostic.

See advisor Command Option Reference for more options.

Next Steps

Continue to explore threading results. For details about the metrics reported, see CPU and Memory Metrics.

See Also