Set Up Environment Variables
Use this topic to get guidance on setting up environment variables for
Intel® Advisor
.
Set the environment variables if you want to:
- RunIntel Advisorcommand line interface
- RunIntel Advisorgraphical user interface from command line (for example, on Linux OS)
- Compile your application withusing additional include directories, so the compiler can find the include file that defines annotationsIntel Advisorannotations
You can set the variables using
one
of the following methods:
- Recommended: Set up variables using a script.
- Set up variables manually. Use this method to set up variables for a customIntel Advisorlocation or to set the variables permanently.
Default Installation Paths
In the instructions below, be sure to replace any values in brackets, such as
<version>
or
<install-dir>
.
<version>
is the
Intel Advisor
year and update version (for example,
2021.1
).The default installation path for the application,
<install-dir>
, can be one the following:
- OnLinux* OS:
- /opt/intel/oneapifor root users
- $HOME/intel/oneapifor non-root users
- OnWindows* OS:C:\Program Files (x86)\Intel\oneAPIFor 32-bit systems, theProgram Files (x86)folder isProgram Files.
- OnmacOS*:/opt/intel/oneapi
Set Up Environment Variables via Script
This is the recommended method to set up the
Intel Advisor
environment variables. In particular, use it if you want to run the Offload Modeling using the dedicated Python* scripts. The script automatically sets up all the required variables pointing to the
Intel Advisor
installation directory.
Linux OS and macOS
Run
one
of the following shell scripts:
source <install-dir>/setvars.sh
source <install-dir>/setvars.csh
The scripts set up the environment for the
latest
Intel Advisor
version installed on your system.
If you want to set up environment for a lower version of the
Intel Advisor
installed on your system, also run one of the following
Intel Advisor
-specific scripts:
source <install-dir>/advisor/<version>/env/vars.sh
source <install-dir>/advisor/<version>/env/vars.csh
where
<version>
is the
Intel Advisor
version you want to use.
Windows OS
Run the following batch script:
<install-dir>\setvars.bat
The script sets up the environment for the latest
Intel Advisor
version installed on your system.
If you want to set up environment for a lower version of the
Intel Advisor
installed on your system, also run one of the following
Intel Advisor
-specific scripts:
source <install-dir>/advisor/<version>/env/vars.sh
source <install-dir>/advisor/<version>/env/vars.csh
where
<version>
is the
Intel Advisor
version you want to use.
Set Up Environment Variables Manually
Linux OS and macOS
- Open a terminal.
- Check the current definition of the environment variable. For example, with thebashshell, type:env | grep ADVISOR_<version-year>_DIRwhere<version-year> is a majorIntel Advisorversion installed on your system. For example, 2021.If the variable is defined and points to the correct Intel Advisor installation directory, skip the steps below and continue to launch theIntel Advisor.
- Set the environment variable using theexportcommand. Enter:export ADVISOR_<version-year>_DIR="<install-dir>"For example, for the Intel Advisor 2022 in the default installation directory:export ADVISOR_2022_DIR="/opt/intel/oneapi/advisor/latest"
- To set this variable permanently on the current system, add this definition to your.loginor a similar shell initialization file.
- Check the definition of the environment variable set:env | grep ADVISOR_<version-year>_DIRYou should see the environment variable with its value printed to the terminal.
Windows OS
- Open a command prompt.
- Check the current definition of the environment variable. For example, type:set ADVISOR_<version-year>_DIRwhere<version-year> is a majorIntel Advisorversion installed on your system. For example, 2021.If the variable is defined and points to the correct Intel Advisor installation directory, skip the steps below and continue to launch theIntel Advisor.
- Use asetcommand to set the environment variable. Type:set ADVISOR_<version-year>_DIR="<install-dir>"For example, for the Intel Advisor 2022:set ADVISOR_2022_DIR="C:\Program Files (x86)\Intel\oneAPI\advisor\latest"
- To set this variable permanently on the current system, add this definition to your system or user environment variables using.
Additional Variables
Consider setting the following environment variables:
- To determine whether evaluation features have been activated, set theADVISOR_EXPERIMENTALenvironment variable.
- To locate theIntel® oneAPI Threading Building Blocks (oneTBB)include directory when working with programs that useoneTBB, set theTBBROOTenvironment variable. See Defining the TBBROOT Environment Variable.
- On Linux OS and macOS:set theBROWSERenvironment variable to locate an installed HTML browser. This enables the display of Get Started, Tutorials or Help from theIntel® AdvisorGUIHelpmenu.
- On Linux OS and macOS:set theVISUALorEDITORenvironment variable to specify an external editor to launch when you double-click a line in aSourcewindow.VISUALtakes precedence overEDITOR.
Next Steps
Launch
Intel Advisor
from GUI or from command line interface.