User Guide

Contents

Launch
Intel® Advisor

This topic provides overview and simple steps for running
Intel® Advisor
graphical user interface (GUI) and command line interface (CLI).

Launch the
Intel® Advisor
GUI

The
Intel® Advisor
GUI is available:
  • On the Microsoft Windows* OS: From the
    Start
    menu, choose
    All Programs
    Intel oneAPI [version]
    Intel Advisor [version]
  • In the Microsoft Visual Studio*:
    • From the
      Tools
      menu, choose
      Intel Advisor [version]
      >
      Vectorization and Threading Advisor Analysis
      .
    • From the top toolbar: Click
      Intel Advisor
      icon.
      If you do not see the icon, right-click the toolbar and select
      Intel Advisor
      from the context menu.
  • From a command line on Windows* or Linux* OS systems.
    1. Set up the environment variables to be able to launch the GUI from the command line.
    2. Run the
      advisor-gui
      command to open the
      Intel Advisor
      GUI.
      To open a specific project or result, enter:
      advisor-gui
      <path>
      where
      <path>
      is one of the following:
      • Full (absolute) path to a result file (
        *.advixe
        )
      • Full path to a project file (
        config.advixeproj
        )
      • Full path to a project directory. If there is no project file in the directory, the
        Create a Project
        dialog box opens and prompts you to create a project in the specified directory.
      On Windows systems, if the path contains embedded spaces, enclose it in quotation marks.
By default,
Intel Advisor
opens a new graphical user interface (GUI). To switch back to an old GUI, set
ADVISOR_EXPERIMENTAL=advixe-gui
variable and re-open the
Intel Advisor
.
After opening the
Intel Advisor
, continue to create a project or run a perspective and view the results if you already have a project.

Launch the
Intel Advisor
CLI

Prerequisite
: Set up environment variables to enable the command line interface.
To run the
advisor
command line interface, use the following syntax:
advisor <--action> [--action-options] [--global-options] -- <target-application> [target options]
where:
  • <--action>
    is an
    Intel Advisor
    action to do, such as
    collect
    or
    report
    .
  • [--action-options]
    and
    [--global-options]
    are options to modify action behavior.
  • <target-application>
    is an application executable to analyze with optional
    [target-options]
    to apply to the target.
The
advisor
command line interface supports all
Intel Advisor
perspective and is the recommended method to run the
Intel Advisor
from command line.
You can also run the
Offload Modeling
perspective using Python* scripts as follows:
advisor-python <APM>/<offload-script>.py <project-dir> [--options] [-- <target-application> [target-options]]
where:
  • <APM>
    is the environment variable that points to the directory with the
    Intel Advisor
    scripts. It is
    $APM
    for Linux* OS and
    %APM%
    for Windows* OS.
  • <offload-script>
    is a script to run:
    run_oa
    ,
    collect
    , or
    analyze
    .
  • <project-dir>
    is a path to a project directory.
  • [--options]
    is options to modify script behavior.
  • <target-фзздшсфешщт>
    is an application executable to analyze with optional
    [target-options]
    to apply to the target.
When you run the first
Intel Advisor
analysis to a target application from the command line, it also creates a new project for the target.
Review the typical workflows for the
Intel Advisor
CLI in the dedicated topics for each perspective.
For details about the
Intel Advisor
command line syntax and options, see the advisor Command Line Interface Reference.

Launch the
Intel Advisor
from a Docker* Container on Linux* OS

This section contains steps to run
Intel® Advisor
in a Docker* container. Containers allow you to set up and configure environments and distribute them using images:
  • You can install an image containing an environment pre-configured with all the tools you need, then develop within that environment.
  • You can save an environment and use the image to move that environment to another system without additional setup.
  • You can prepare containers with different sets of compilers, tools, libraries, or other components, as needed.
Set up the Docker container
  1. Pull the Docker image from the oneAPI Containers Repository with the following commands:
    image=amr-registry.caas.intel.com/oneapi/oneapi:base-dev-ubuntu18.04 docker pull "$image"
  2. Run the Docker container using the following command:
    docker run --cap-add=SYS_PTRACE -it "$image"
    • The
      --device=/dev/dri option
      enables the gpu (if available).
    • You can specify proxy information using options as follows:
      -e http_proxy="$http_proxy" -e https_proxy="$https_proxy"
  3. For the rest of the steps in this section, run any commands from the command line prompt inside the Docker container.
    For example, to set up the Mandelbrot sample, you can run:
    cd /one-api-code-samples/HPC/mandelbrot make ./main -d1 ./main -t gpu # run on gpu ./main -t cpu # run on cpu make clean
  4. Run the following commands to source Intel Advisor variables:
    source /opt/intel/oneapi/setvars.sh
    This step is not required, but allows you to run tools from any directory, rather than using absolute file paths.
  5. Now that your Docker container is running, you can run Advisor from the command line as you would without a container. For example:
    advisor --collect=survey /bin/ls
When you run the first
Intel Advisor
analysis to a target application from the command line, it also creates a new project for the target.
For details about the
Intel Advisor
command line syntax and options, see the advisor Command Line Interface Reference. Review the typical workflows for the
Intel Advisor
CLI in the dedicated topics for each perspective.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.