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 GUI

Steps to run the Threading perspective.

In the Analysis Workflow pane, select the Threading perspective. The perspective can be executed at the following collection accuracy levels:
  • Low - Find candidates for parallelizing.
  • Medium - Model parallel design options and determine whether there are dependencies limiting parallelizing.
  • Custom - Customize the perspective flow and properties.

In the Threading perspective, collection accuracy levels match the steps you should take. By default, accuracy is set to Low.

NOTE:
The higher accuracy value you choose, the higher runtime overhead is added to your application. The Overhead indicator shows the overhead for the selected configuration.

Prerequisites: In the graphical-user interface (GUI): Create a project and specify an analysis target and target options.

To configure and run the Threading perspective from GUI, do the following:

  1. Select Low accuracy level to enable the Survey analysis and run the perspective by clicking button.
    You will get a Survey report that shows the execution times of your functions and loops.
  2. Sort the report data by Total Time to identify functions and loops with the longest execution time. These loops/functions are the best candidates to apply parallelization for.
  3. In your source code, annotate sites and tasks to model threading for and re-build your application. For more information on annotations and how to apply them, see Annotate Code for Deeper Analysis section.
  4. Select Medium accuracy level and run the Threading perspective by clicking button.

    While the perspective is running, you can do the following in the Analysis Workflow tab:

    • Control the perspective execution:
      • Stop data collection and see the already collected data: Click the button.
      • Pause data collection: Click the button.
      • Cancel data collection and discard the collected data: Click the button.
    • Expand an analysis with to control the analysis execution:
      • Pause the analysis: Click the button.
      • Stop the currently running analysis and start the next analysis selected: Click the button.
      • Interrupt execution of all selected analyses and see the already collected data: Click the button.

    NOTE:
    To generate command lines for selected perspective configuration, click the Command Line button.

To run the Threading perspective with the Medium accuracy from the command line interface:

  1. Run the Survey analysis:

    advisor --collect=survey --project-dir=./advi_results -- ./myApplication
  2. Collect trip count data:

    advisor --collect=tripcounts --project-dir=./advi_results -- ./myApplication
  3. Run the Suitability analysis for annotated loops:

    advisor --collect=suitability --project-dir=./advi_results -- ./myApplication
  4. Run the Dependencies analysis:

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

See Run Threading Perspective from Command Line for details.

After running the perspective as describes above, you get a Suitability report showing predicted options for parallelizing and a Dependencies report showing whether you can implement parallel design without disrupting your code.