Launch Intel® Advisor

Once you have downloaded Intel Advisor and set environment variables, choose an option to launch the product:

Launch Intel Advisor in Visual Studio* IDE

You can simplify the process of debugging code and tuning your application when both your application and tuning tools are available in the same interface. By default, Intel Advisor integrates into Microsoft Visual Studio environment installed on your system and enables you to create and tune your application within a single environment.

In the Visual Studio, use any of these options to launch Intel Advisor:

Limited Integration to Visual Studio 2022

Intel Advisor provides lightweight integration into Visual Studio 2022. You can launch a standalone Intel Advisor for your Visual Studio project as follows:

  • Select the Tools > Open Intel Advisor menu item

  • Click the Open Intel Advisor toolbar icon

  • Right-click the project entry in the Solution Explorer and select Intel Inspector > Open Intel Advisor from the context menu.

The standalone Intel Advisor graphical version opens inheriting the project properties of the target selected in Visual Studio.

In Visual Studio 2022, you can also open the documentation resources for Intel Advisor as follows:

  • Select the Help > Intel Advisor menu item and choose a required documentation format from the sub-menu.

  • Click the drop-down control at the toolbar icon and choose a documentation format.

Launch Intel Advisor Standalone Interface

To launch the standalone version, do one of the following:

Launch Intel Advisor Command Line Interface

To run the advisorcommand-line interface, use the following syntax:

advisor <--action> [--action-options] [--global-options] -- <target-application> [target_options]

where:

The advisor command line interface supports all Intel Advisor perspective and is the recommended method to run the Intel Advisor from command line.

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.

Launch Intel Advisor with Python* Scripts

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:

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

Containers enable you to set up and configure environments and distribute them using images:

  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"

    Note

    • 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

    Note

    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.

See Also