Standalone GUI: Prepare the Sample Application

This topic is part of a tutorial that shows how to use the automated Roofline chart to make prioritized optimization decisions.

Follow these initial steps if you prefer to use the Intel Advisor standalone GUI to try out the plots floating-point performance training sample application.

Get Software Tools and Unpack the Sample Application

You need the following tools:

If you do not already have the Intel Advisor or the Intel® C++ Compiler Classic, download it with Intel oneAPI Base Toolkit.

To set up the roofline_demo_samples sample application:

  1. Download both the sample code and sample results to a writable directory or share on your system.

  2. Extract the sample code and sample results from the .zip files.

Prepare the Sample Application

To follow along with this tutorial:

  1. Set up the Intel® C++ Compiler Classic environment. For example, in a command prompt, type:

    "<compiler-install-dir>\bin\compilervars.bat" intel64

    This will set the environment for the highest Intel® C++ Compiler Classic version installed. The exact path of the compiler environment may vary depending on your installation directory.

    See Specifying the Location of Compiler Components with compilervars in the Intel® C++ Compiler Classic Developer Guide and Reference for more information about setting the compiler environment.

  2. In the command prompt window, change directory to the roofline_demo_samples\ directory in its unzipped location.

  3. Run build.bat, which creates a release subdirectory and builds the sample application in release mode.

To build your own applications to produce the most accurate and complete Vectorization Advisor analysis results, build an optimized binary in release mode using the following settings.

To Do This

Optimal C/C++ Settings

Request full debug information (compiler and linker).

Linux* OS command line: -g

Windows* OS command line:

  • /ZI

  • /DEBUG

Microsoft Visual Studio* IDE:

  • C/C++ > General > Debug Information Format > Program Database (/Zi)

  • Linker > Debugging > Generate Debug Info > Yes (/DEBUG)

Request moderate optimization.

Linux* OS command line: -O2 or higher

Windows* OS command line: /O2 or higher

Visual Studio* IDE: C/C++ > Optimization > Optimization > Maximum Optimization (Favor Speed) (/O2) or higher

Produce compiler diagnostics (necessary for version 15.0 of the Intel compiler; unnecessary for version 16.0 and higher).

Linux* OS command line: -qopt-report=5

Windows* OS command line: /Qopt-report:5

Visual Studio* IDE: C/C++ > Diagnostics [Intel C++] > Optimization Diagnostic Level > Level 5 (/Qopt-report:5)

Enable vectorization

Linux* OS command line: -vec

Windows* OS command line: /Qvec

Enable SIMD directives

Linux command line: -simd

Windows* OS command line: /Qsimd

Enable generation of multi-threaded code based on OpenMP* directives.

Linux* OS command line: -qopenmp

Windows* OS command line: /Qopenmp

Visual Studio* IDE: C/C++ > Language [Intel C++] > OpenMP Support > Generate Parallel Code (/Qopenmp)

Launch the Intel Advisor

Note

  • Setting up the Windows* OS environment is necessary only if you use the advixe-gui command to launch the Intel Advisor standalone GUI (or the advixe-cl command to run the command line interface). To set up your Intel Advisor environment, run the following:  

  • The default installation path <advisor-install-dir> is inside C:\Program Files (x86)\Intel\oneAPI\.

Do one of the following to launch the Intel Advisor:

Prepare the Project

  1. Choose File > New > Project... (or click New Project... in the Welcome page) to display a Create a Project dialog box.
  2. Type roofline in the Project name field, supply a location for the sample application project, then click the Create Project button to create a roofline.advixeproj file and open the Project Properties dialog box.
    Intel Advisor dialog box: Project Properties

  3. In the Analysis Target tab, ensure the Survey Hotspots Analysis type is selected.

  4. Click the Browse... button next to the Application field and choose the just-built roofline_demo binary file in the release subdirectory.

  5. For the Survey Trip Count Analysis type, make sure the Inherit settings from Survey Hotspots Analysis Type checkbox is selected.

  6. Click the OK button to close the Project Properties dialog box.