Intel® Advisor User Guide

ID 766448
Date 12/16/2022
Public

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

Document Table of Contents

Problem: Unexpected Unmatched Annotations in the Dependencies Report

Symptoms

When running Intel® Advisor Dependencies tool analysis, you see unmatched problems reported that are caused by unmatched annotations execution that you did not expect.

Details

The Dependencies Report window lists the problems and messages reported by Dependencies tool analysis in the Problems and Messages pane. You may see some unexpected problems related to unmatched annotations, such as the following problem types: Dangling Lock, Missing Begin Site, Missing Begin Task, Missing End Site, Missing End Task, or Orphaned Task. For example, within a parallel site, there is no annotation to mark the end of the parallel site for all possible the code execution paths.

Cause

Possible causes:

  • You placed annotations inside macros.

  • For Linux* OS: You placed parallel sites and their related annotations outside the project.

  • For Windows* OS: You placed parallel sites and their related annotations outside a set of projects that the startup project depends on.

  • Your sources contain huge source files that contain annotations. As only the first 8 MB of each file are parsed for annotations (for performance reasons), this could possibly cause mismatched annotations messages.

Possible Solution

Do the following:

  1. Use the Dependencies tool to view the code region(s) causing the problem. Investigate whether some sites or tasks may have multiple exit points and whether end annotations cover all exit points. For example, code that returns or branches around an end annotation, or throws an exception. If you suspect the problem is caused by adding annotations inside macros, remove the annotations from the macros and add them to the final location in the sources - similar to the way breakpoints do not work in macros. Rebuild your target and run the Dependencies tool again.

  2. Windows* OS only: Use the Dependencies tool to investigate by viewing the code region(s) causing the problem. If you suspect that parallel sites and their related annotations that are placed outside the set of projects that the startup project depends on, consider using the Visual Studio* Project Dependencies context menu item to add appropriate dependencies to cause Intel® Advisor to scan sources in the additional project(s). Rebuild and run the Dependencies tool again.

    NOTE:
    In Visual Studio* 2022, Intel Advisor provides lightweight integration. You can configure and compile your application and open the standalone Intel Advisor interface from the Visual Studio for further analysis. All your settings will be inherited by the standalone Intel Advisor project.

  3. If your sources include huge source files that contain annotations (more than 8 MB per file), consider breaking each huge source file into several source files.