Intel® Advisor Help
Where should I consider adding parallelism? Locate the loops and functions where your program spends its time, and functions that call them.
To locate the code regions that would benefit your application program the most, focus your attention on where your program spends its time. This means identifying and focusing on the loops or functions in the call tree that use the most time. To reduce your program's run-time, identify the code regions that can run in parallel. Locations closer to the main entry point in the call tree are often better candidates and often provide better scalability.
The
Intel®
Advisor Survey tool
runs your serial program's executable and measures (profiles) the time it spends in various code regions. This tool displays the collected data in an expanded top-down call tree that includes loops (referred to as a call tree). If you recently used a different profile tool and already know where your program spend its time, use Survey tool's report to quickly verify the results from the other profile tool and help you identify the hot part(s) of the call tree.
If you have not used Intel Advisor previously, considering reading its getting started Tutorial while using the C/C++ or Fortran nqueens sample. If you are not familiar with parallel concepts such as a data race, please read the help sections in Key Concepts.
The Survey tool profiles your running serial program's executable (target) to help you choose likely places to add parallelism.
For best results, use a Release build target executable with debug information and moderate optimization (limited inlining). Run the Survey tool to examine this target executable.
Once data collection and analysis completes, data appears in the
Survey Report window. As you examine the top-down call tree with loops, focus your efforts on the parts of your program (usually loops) that use the most time as well as function calls leading into these code regions. To quickly identify the most time-consuming loops, look for
checkmark in the
Hot Loops column. Each function or loop appears on a separate line. Loops are identified with an
icon, the word
[loop, followed by the source location and the function or procedure name that executes it.
To view details about a specific function or loop, double-click its line in the top-down tree (or right click a line and select View Source from the context menu). This action displays the corresponding sources in the Survey Source window. To return to the Survey Report window, click the Survey Report button.
To display and edit sources in the code editor, right-click a line and select Edit Source from the context menu. When using the Intel Advisor GUI, the editor defined by the Options > Editor dialog box appears with the file open at the corresponding location. Later, to return to the Survey Report or Survey Source window, click the Result tab.
The Survey Report, Survey Source, and other Intel Advisor windows appear within the Result tab. There is one Result tab for each project.
For help using the Survey Report and Survey Source windows, see Viewing Data from the Survey Tool.
After you examine the data in the Survey Report and Survey Source windows, choose at least one code region where you would consider adding parallelism. Proceed to 2. Add Annotations to mark each possible parallel code region with Intel Advisor parallel site and task annotations.