Intel® Advisor User Guide

ID 766448
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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:

  • Run Intel Advisor command line interface
  • Run Intel Advisor graphical user interface from command line (for example, on Linux OS)
  • Compile your application with Intel Advisor annotations using additional include directories, so the compiler can find the include file that defines annotations

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 custom Intel Advisor location 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:

  • On Linux* OS:

    • /opt/intel/oneapi for root users

    • $HOME/intel/oneapi for non-root users

  • On Windows* OS: C:\Program Files (x86)\Intel\oneAPI

    For 32-bit systems, the Program Files (x86) folder is Program Files.

  • On macOS*: /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 latestIntel Advisor version installed on your system.

NOTE:
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.

NOTE:
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

  1. Open a terminal.
  2. Check the current definition of the environment variable. For example, with the bash shell, type:

    env | grep ADVISOR_<version-year>_DIR

    where <version-year> is a major Intel Advisor version 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 the Intel Advisor.

  3. Set the environment variable using the export command. 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"
  4. To set this variable permanently on the current system, add this definition to your .login or a similar shell initialization file.
  5. Check the definition of the environment variable set:

    env | grep ADVISOR_<version-year>_DIR

    You should see the environment variable with its value printed to the terminal.

Windows OS

  1. Open a command prompt.
  2. Check the current definition of the environment variable. For example, type:

    set ADVISOR_<version-year>_DIR

    where <version-year> is a major Intel Advisor version 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 the Intel Advisor.

  3. Use a set command 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"
  4. To set this variable permanently on the current system, add this definition to your system or user environment variables using Control Panel > System and Security > System > Advanced system settings > Environment Variables....

Additional Variables

Consider setting the following environment variables:

  • To determine whether evaluation features have been activated, set the ADVISOR_EXPERIMENTAL environment variable.
  • To locate the Intel® oneAPI Threading Building Blocks (oneTBB) include directory when working with programs that use oneTBB , set the TBBROOT environment variable. See Defining the TBBROOT Environment Variable.
  • On Linux OS and macOS: set the BROWSER environment variable to locate an installed HTML browser. This enables the display of Get Started, Tutorials or Help from the Intel® Advisor GUI Help menu.
  • On Linux OS and macOS: set the VISUAL or EDITOR environment variable to specify an external editor to launch when you double-click a line in a Source window. VISUAL takes precedence over EDITOR.

Next Steps

Launch Intel Advisor from GUI or from command line interface.