Intel® Advisor User Guide

ID 766448
Date 6/24/2024
Public

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

Document Table of Contents

Model Threading Parallelism

The Suitability analysis examines your running serial program to provide approximate estimated performance characteristics of your annotated parallel sites. This shows you both the performance gain from running your parallel program on multiple CPUs and the likely impact of parallel overhead.

To choose the best places to add parallelism, locate the parallel sites that contribute the most to the overall program's gain. Because of the overhead of parallel execution - such as starting threads - certain parallel sites and tasks may not contribute to the overall program's gain, or may slow down its performance. After you identify such parallel sites or tasks that do not improve performance, either modify or eliminate their annotations.

Use the Suitability Report Window

After you run the Suitability tool, view its data in the Suitability Report window. This window contains multiple areas:

Location in Window Description

Upper

Any annotation-related error the Suitability tool detects appears at the top of the Suitability Report window. If you see such errors, the displayed Suitability data may not be reliable. To view the source location associated with an error, click the button. To fix the error, read the displayed error message, modify your source code to fix the problem, rebuild your target executable, and run Suitability tool analysis again.

Upper-left

The upper-left area shows the Maximum Program Gain for All Sites in the program. Your overall goal of adding parallelism is to increase the Maximum Program Gain for All Sites so the parallel program will execute as fast as possible. The measured serial execution runtime, predicted parallel runtime, and any measured paused time are displayed below Maximum Program Gain for All Sites. Use the predicted Suitability gain values to help you make informed decisions about where to add parallelism.

Upper-right

Use the upper-right row of modeling parameters to model performance. Choose a hardware configuration and threading model (parallel framework) values from the drop-down lists. If you select a Target System for Intel® Xeon Phi™ processors, an additional value for total Coprocessor Threads appears.

Below this row is a grid of data that shows the estimated performance of each parallel site detected during program execution. The Site Label shows the argument to the site annotation. Examine the predicted Site Gain and Impact to Program Gain (higher values are better) to estimate how much each site contributes to the Maximum Program Gain for All Sites for all sites (described above). To expand the data under Combined Site Metrics or Site Instance Metrics, click the icon to the right of that heading; to collapse data, click to the right of that heading.

To show or hide the side command toolbar, click the Survey tool or Survey tool icon.

Middle-left

If you choose a Target System of CPU, to view detailed characteristics of the selected site as well as its tasks and locks, click the Site Details tab.

The Scalability of Maximum Site Gain graph summarizes performance for the selected site. The number of CPU processors or total number of coprocessor threads appears on the horizontal X axis and the target's predicted performance gain appears on the Y axis. To change the default CPU Count and the Maximum CPU Count, set the Options value.

Lower-left

Below the graph is a list of issues that might be preventing better predicted performance gains as well as a summary of serial and predicted parallel time. To expand a line, click the down arrow to the right of the item's name. Most issues are related to the Runtime Modelingmodeling parameters. Later, you can use other Analyzer tools like Intel® VTune™ Profiler to measure actual performance of your parallel program.

Lower-middle

Use the Loop Iterations (Tasks) Modeling (or Tasks Modeling) modeling parameters to experiment with different loop structures, iteration counts, and instance durations that might improve the predicted parallel performance.

Click Apply to view the impact on the predicted performance.

Lower-right

Use the Runtime Modelingmodeling parameters to learn which parallel overhead categories might have an impact on parallel overhead. If you agree to address a category later by using the chosen parallel framework's capabilities or by tuning the parallel code after you have implemented parallelism, check that category.

Bottom-right

If the chosen Target System is Intel Xeon Phi or Offload to Intel Xeon Phi, additional Intel® Xeon Phi™ Advanced Modeling options appear below the Runtime Modeling area. To expand this area, click the down arrow to the right of Intel Xeon Phi Advanced Modeling.

Lower, after clicking Site Details tab

If you chose a Target System of CPU, the Site Details tab shows details about the selected parallel site, as well as details for each task and lock executed in that site.

When using an active result (not a read-only result), you can change the modeling parameters. Changing modeling parameters updates the displayed data, except for Loop Iterations (Tasks) Modeling or Tasks Modeling (click Apply). These modeling parameters help you understand the sensitivity of your annotation choices so you can choose the best places to add parallelism, but the displayed data summary is not an accurate estimate of final execution time on any specific parallel hardware (general processor characteristics are used).

Later, before you add parallel code, you must choose one parallel framework (threading model) for your application.

To view the source code associated with a site, locate the list of sites (upper-right area ) and either:

  • Double-click a row (or right-click and select View Source from the context menu) to display the Suitability Source window. Later, to return to the Suitability Report window, click Suitability Report.

  • Right-click a row and select Edit Source from the context menu to display the corresponding source file in a code editor. When using the Intel® Advisor GUI on Linux* OS, the editor defined by the Options > Editor dialog boxOptions > Editor dialog box appears with the file open at the corresponding location. When using the Intel® Advisor GUI on Windows* OS, the file type association (or Open With dialog box) determines the editor used. When using Microsoft Visual Studio*, the Visual Studio code editor appears with the file open at the corresponding location. Later, to return to the Suitability Report or Suitability Source window:

    1. Click the Result tab.

    2. Click either Suitability Report or Suitability Source.

Use the Suitability Source Window

Within the Suitability Source window, you can:

  • Use the Call Stack pane to view different source locations in the call stack.

  • Double-click a line (or right-click and select Edit Source) to open the corresponding source file in a code editor. When using the Intel® Advisor GUI on Linux* OS, the editor defined by the Options > Editor dialog boxOptions > Editor dialog box appears with the file open at the corresponding location. When using the Intel Advisor GUI on Windows* OS, the file type association (or Open With dialog box) determines the editor used. When using Microsoft Visual Studio*, the Visual Studio code editor appears with the file open at the corresponding location. Later, to return to the Result tab, click Result.

  • Return to the Suitability Report window by clicking Suitability Report.

The Suitability Report, Suitability Source, and other Intel Advisor windows appear within the Result tab. There is one Result tab for each project.

Understand the Scalability Graph in the Suitability Report

One of two different graphs appear depending on the chosen Target System. For an explanation of the Scalability Graph, see Suitability Report Overview.

Tips on Understanding the Performance Data

In the Suitability Report window, you start at the top, select a site, look at its details in the Suitability Report window, and examine its source code. You repeat this process to investigate each annotated site. View this information, and if needed, modify the annotations by using your code editor.

Use the following guidelines to evaluate the feasibility of each site:

  • If the Site Gain values for the selected site shows an estimated performance gain of 1.0 or less, the overhead of parallel thread execution exceeds the potential performance gains. Modify or remove the annotations for the task(s) and its enclosing site. Repeat this for each parallel site.

  • If the Site Gain values for the selected site shows a performance gain greater than 1.0, look at the site's contribution to the Maximum Program Gain for All Sites, which applies to all parallel sites. For sites that do not contribute significantly to the Maximum Program Gain for All Sites, modify or remove the annotations for the task(s) and its enclosing site. For sites that only contribute slightly to the Maximum Program Gain for All Sites, examine more closely the annotations and the assumptions about fixing the various overhead costs of parallel thread execution. In some cases, you may be able to adjust the annotations to improve the performance gain or reduce the overhead. Repeat this for each parallel site.

  • When the Maximum Program Gain for All Sites for all sites and the Site Gain values for all the sites show a moderate or significant performance gain, proceed to the next workflow step that uses the Dependencies tool to check your remaining annotated sites for data sharing problems.