Before You Begin
Download and install Intel® Advisor:
Linux* OS
The following sections describe how to start working with Intel Advisor on Linux OS.
Default Installation Path
By default, the <install-dir> for all oneAPI components is as follows:
- /opt/intel/oneapi/ for root users
- $HOME/intel/oneapi/ for non-root users
Set Up Environment
If you plan to use Intel Advisor command line interface (CLI) or launch the graphical user interface (GUI) from the command line, you need to set up the environment variables first.
To set up the environment for Intel Advisor, run the setvars.sh script from a terminal as follows.
source $HOME/intel/oneapi/setvars.sh
If you installed Intel Advisor as a root user or to a different location, make sure to replace the path to the script appropriately.
Launch Intel Advisor
You can launch Intel Advisor with one of the following methods:
Intel Advisor GUI
Launch the Intel Advisor GUI from the terminal as follows:
advisor-gui
Intel Advisor CLI
Run the advisor command with appropriate actions and action options from the terminal. The general command syntax is:
advisor <--action> [--<action-options>] [--<global-options>] [[--] <target> [<target options>]]
For example, analyze a CPU application myApplication with the Survey analysis, which is the basic analysis for all Intel Advisor perspectives:
advisor --collect=survey --project-dir=./advi_results -- ./myApplication
Windows* OS
The following sections describe how to start working with Intel Advisor on Windows OS.
Default Installation Path
By default, the <install-dir> for all oneAPI components is C:\Program Files (x86)\Intel\oneAPI\ (on certain systems, instead of Program Files (x86), the directory name is Program Files).
Set Up Environment
If you plan to use Intel Advisor command line interface (CLI) or launch the graphical user interface (GUI) from the command line, you need to set up the environment variables first.
To set up the environment for Intel Advisor, run the setvars.bat script from a command prompt as follows.
"C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
If you installed Intel Advisor as to a different location, make sure to replace the path to the script appropriately.
Launch Intel Advisor
You can launch Intel Advisor with one of the following methods:
Intel Advisor GUI
To launch the Intel Advisor GUI:
- Run the Intel Advisor from the Start menu.
- Run the Intel Advisor from the command prompt:
advisor-gui
Intel Advisor Microsoft Visual Studio* Integration
- Open a solution in the Microsoft Visual Studio.
- Click the icon on the toolbar or go to Tools > Intel Advisor > Open Perspective Selector.
If you do not see the icon, right-click the toolbar and select Intel Advisor from the context menu.
Intel Advisor CLI
Run the advisor command with appropriate actions and action options from the command prompt. The general command syntax is:
advisor <--action> [--<action-options>] [--<global-options>] [[--] <target> [<target options>]]
For example, analyze a CPU application myApplication with the Survey analysis, which is the basic analysis for all Intel Advisor perspectives:
advisor --collect=survey --project-dir=.\advi_results -- myApplication.exe
macOS*
The following sections describe how to start working with Intel Advisor on macOS.
Explore a step-by step instruction how to view your Intel Advisor results on a macOS* machine in the Intel Advisor Cookbook: Analyze Performance Remotely and Visualize Results on a Local macOS* System.
Default Installation Path
By default, the <install-dir> for all oneAPI components is /opt/intel/oneapi/.
Set Up Environment
If you plan to run the Intel® Advisor graphical user interface (GUI) from the command line, you need to set up the environment variables first.
To set up the environment for Intel Advisor, run the setvars script from a terminal as one of the following.
/opt/intel/oneapi/setvars.sh
/opt/intel/oneapi/setvars.csh
If you installed Intel Advisor as a root user or to a different location, make sure to replace the path to the script appropriately.
Launch Intel Advisor
On macOS, you cannot profile your application with Intel Advisor, but you can view the results collected on a different OS using the GUI. You can launch Intel Advisor GUI to view the collected results with one of the following methods:
- Launch the Intel Advisor GUI, go to File > Open > Project..., and navigate to the result to open.
- Launch the Intel Advisor GUI from the terminal as follows:
advisor-gui <result-path>
where <result-path> is the path to a result project or a result snapshot.
Create a Project
Create a Project
A project is a reusable container that includes target executable location, sources, and binaries, collection properties, and collection results.
Prerequisite: Before creating a project, build your application in release mode. For more information on building applications, see Build Target Application.
To create a project in the standalone GUI:
- Choose File > New > Project… to open the Create a Project dialog box.
- Specify a name and location for your project.
- Click the Create Project button to open the Project Properties dialog box.
- In the Analysis Target tab, click Browse near the Application field and select the application executable file.
- Optional: In the Binary/Symbol Search and Source Search tabs, specify search directories.
- Click OK to create the project.
If you work in the Microsoft Visual Studio*, a project is created automatically for the built application when you open the Intel® Advisor.
If you work with the advisor command line interface, a project is created automatically when you run the first analysis for the specified application.