Model Threading Parallelism
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
![]() |
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
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
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
![]() ![]() To show or hide the side command toolbar, click the
![]() ![]() |
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 Modeling . Later, you can use other Analyzer tools like
to measure
actual performance of your parallel program.
|
Lower-middle
| Use the
Loop Iterations (Tasks) Modeling (or
Tasks Modeling )
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 Modeling 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
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 selectView Sourcefrom the context menu) to display theSuitability Sourcewindow. Later, to return to theSuitability Reportwindow, clickSuitability Report.
- Right-click a row and selectEdit Sourcefrom the context menu to display the corresponding source file in a code editor. When using theGUI on Linux* OS, the editor defined by theIntel® Advisorappears with the file open at the corresponding location. When using theOptions > Editor dialog boxGUI on Windows* OS, the file type association (orIntel® AdvisorOpen Withdialog 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 theSuitability ReportorSuitability Sourcewindow:
- Click theResulttab.
- Click eitherSuitability ReportorSuitability Source.
Use the Suitability Source Window
Within the
Suitability Source
window, you can:
- Use theCall Stackpane to view different source locations in the call stack.
- Double-click a line (or right-click and selectEdit Source) to open the corresponding source file in a code editor. When using theGUI on Linux* OS, the editor defined by theIntel® Advisorappears with the file open at the corresponding location. When using theOptions > Editor dialog boxIntel AdvisorGUI on Windows* OS, the file type association (orOpen Withdialog 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 theResulttab, clickResult.
- Return to theSuitability Reportwindow by clickingSuitability 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 theSite Gainvalues 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 theSite Gainvalues for the selected site shows a performance gain greater than 1.0, look at the site's contribution to theMaximum Program Gain for All Sites, which applies to all parallel sites. For sites that do not contribute significantly to theMaximum 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 theMaximum 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 theMaximum Program Gain for All Sitesfor all sites and theSite Gainvalues 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.