Intel® Advisor User Guide

ID 766448
Date 7/13/2023
Public

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

Document Table of Contents

Annotate Code for Deeper Analysis

Before you can mark the best parallel opportunities by adding Intel® Advisor annotations, you need to choose likely places to add parallelism. This section provides a series of topics that explain factors to consider as you examine the candidate code regions and their execution and choose candidate places.

NOTE:
In most cases, you do not need source annotations when using Intel® Advisor, except for the Suitability analysis of the Threading perspective. When analyzing your application with other perspectives, such as Vectorization and Code Insights or Offload Modeling, you can analyze all parts of your code automatically or use Intel Advisormark-up capabilities, which do not require you to recompile your application.

The operations of a serial program execute one after another in a well-defined order, starting at the beginning, continuing to the end, and then stopping. A parallel program, on the other hand, is made up of tasks - portions of the program that may execute independently on separate cores. Tasks can either be implemented in separate functions or in iterations of a loop.

You mark your proposed code regions by adding Intel® Advisor annotations that identify the:

  • Parallel site: A code region that contains one or more parallel tasks. Execution of a parallel site constrains the time during which the tasks that it contains can execute. Although execution of a parallel site begins when its execution reaches its beginning, tits execution terminates only after all tasks that started within it have completed. In parallel frameworks, this corresponds to the join location in the code where all tasks have completed.

  • Parallel tasks: Task code regions run independently, at the same time as other tasks within the parallel site and the enclosing parallel site itself. Also, each task can have multiple instances of its code executing. As shown in the table below, there are two forms of task annotations: