Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

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

Document Table of Contents

Optimization Reports

Enable in Microsoft Visual Studio*

Optimization reports can help you address vectorization and optimization issues.

When you build a solution or project, the compiler generates optimization diagnostics. You can view the optimization reports in the following windows:

  • The Compiler Optimization Report window, either grouped by loops or in a flat format.
  • The Compiler Inline Report window.
  • The optimization annotations, which are integrated within the source editor.

To enable viewing for the optimization reports:

  1. In your project's property pages, select Configuration Properties > Fortran > Diagnostics.

  2. Set a non-default value for any of the following options:

    • Optimization Diagnostics Level
    • Optimization Diagnostics Phase
    • Optimization Diagnostics Routine
  3. The Interprocedural Optimization (IPO) is turned off by default. To view the IPO diagnostics, set the property Fortran > Optimization > Interprocedural Optimization to Single-file or Multi-file.

  4. Build your project to generate an optimization report.

When the compiler generates optimization diagnostics, the Compiler Optimization Report and the Compiler Inline Report windows open. The optimization report annotations appear in the source editor.

NOTE:
You can specify how you want the optimization reporting to appear with the Optimization Reports dialog box. Access this dialog box by selecting Tools > Options > Intel Compilers and Libraries > Optimization Reports.

View Reports

When the compiler generates optimization diagnostics, the Compiler Optimization Report and the Compiler Inline Report windows open, and optimization report annotations appear in the editor.

The Compiler Optimization Report window displays diagnostics for the following phases of the optimization report:

  • PGO

  • LNO

  • PAR

  • VEC

  • Offload (Linux* only)

  • OpenMP*
  • CG

Information appears in this window grouped by loops, or in a flat format. To switch the presentation format, click the gear button on the toolbar of the window, and uncheck Group by loops.

In addition to sorting information by clicking column headers and resizing columns, you can use the windows described in the following table:

Do This

To Do This

Double-click a diagnostic.

Jump to the corresponding position in the editor.

Click a link in the Inlined into column.

Jump to the call site of the function where the loop is inlined.

Expand or collapse a diagnostic in Group by loops view.

View detailed information for the diagnostic.

Click on a column header.

Sort the information according to that column.

Click the filter button.

Select a scope by which to filter the diagnostics that appear in the window.

The title bar of the Compiler Optimization Report window shows the applied filter. Labels on optimization phase filter buttons show how many diagnostics of each phase are in the current scope.

Click a Compiler Optimization Report window toolbar button corresponding to an optimization report phase.

Turn filtering diagnostics on or off for an optimization phase.

Labels on optimization phase filter buttons show the total number of diagnostics for each phase.

By default all phases turned on.

Enter text in the search box in the Compiler Optimization Report window toolbar.

Filter diagnostics using the text pattern.

Diagnostics are filtered when you stop typing. Pressing Enter saves this pattern in the search history.

To disable filtering, clear the search box.

To use a pattern from the search history, click on the down arrow next to the search box.

The Compiler Inline Report window displays diagnostics for the IPO phase of the optimization report.

Information appears in this window in a tree. Each entry in the tree has corresponding information in the right-hand pane under the Properties tab and the Inlining options tab.

You can use the window as described in the following table:

Do This

To Do This

Double-click a diagnostic in the tree, or click on the source position link under the Properties tab.

Jump to the corresponding position in the editor.

Click Just My Code.

Only display functions from your code, filter all records from files that don't belong to the current solution file tree.

Right-click on a function body in the editor and select Intel Compiler > Show Inline report for function name.

View detailed information for the specified function.

Right-click on a function body in the editor and select Intel Compiler > Show where function name in inlined.

Show where the specified function is inlined.

Enter text in the search box in the Compiler Inline Report window toolbar.

Filter diagnostics using the text pattern.

Diagnostics are filtered when you stop typing. Pressing Enter saves this pattern in the search history.

To disable filtering, clear the search box.

To use a pattern from the search history, click on the down arrow next to the search box.

The Viewing Optimization Notes window in the editor provides context for the diagnostics that the compiler generates:

  • In Caller Site

  • In Callee Site

  • In Caller and Callee Site

You can use optimization notes as described in the following table:

Do This

To Do This

Right-click an optimization note

  • Expand or collapse the current optimization note, or all of them.

  • Open the Optimization Reports dialog box to adjust settings for optimization report viewing. You can view optimization notes in one of the following locations:

    • Caller Site

    • Callee Site

    • Caller Site and Callee Site

Double-click an optimization note heading.

Expand or collapse the current optimization note.

Double-click a diagnostic detail.

Jump to the corresponding position in the editor.

Click a hyperlink in the optimization note.

Show where the specified function is inlined.

Click the help (?) icon.

Get detailed help for the selected diagnostic. The default browser opens and, if you are connected to the internet, displays the help topic for this diagnostic.

Hover the mouse over a collapsed optimization note.

View a detailed tool tip about that optimization note.