Visible to Intel only — GUID: GUID-2AF7847A-2645-4CF7-9512-59E97834CF61
Visible to Intel only — GUID: GUID-2AF7847A-2645-4CF7-9512-59E97834CF61
Launch Intel® Advisor
Once you have downloaded Intel Advisor and set environment variables, choose an option to launch the product:
- Launch Intel Advisor Standalone Interface
- Launch Intel Advisor Command Line Interface
- Launch Intel Advisor with Python* Scripts
- Launch Intel Advisor from a Docker* Container (Linux* OS)
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:
From the Tools menu, choose Intel Advisor [version] > Open Perspective Selector to choose a perspective for your first analysis.
From the top toolbar: Click Intel Advisor icon.
IMPORTANT:If you do not see the icon, right-click the toolbar and select Intel Advisor from the context menu.
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:
Use the Search menu or locate Intel Advisor from the system start menu.
Launch the product from the command line with the advisor-gui command.
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.
NOTE:On Windows systems, if the path contains embedded spaces, enclose it in quotation marks.
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:
- <--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.
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.
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:
- <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-application> is an application executable to analyze with optional [target-options] to apply to the target.
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:
- 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.
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"
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"
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
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.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.