Intel® Advisor Help

Set Up Environment Variables

Use this topic to get guidance on setting up environment variables for Intel® Advisor.

Default Installation Paths

In the instructions below, be sure to replace any values in brackets, such as <version> or <install-dir>. <version> is the Advisor year and update version (for example, 2021.1).The default installation path for the application, <install-dir>, can be found inside the following:

Set Up Environment Variables via Script

On Windows OS

Run the following batch script:

<install-dir>/setvars.bat

Note

The script sets up the environment for the latest Intel® Advisor version installed on your system. If you have more than one version of the Intel Advisor installed want to set up environment for a lower version, also run the following batch script:
source <install-dir>/advisor/<version>/env/vars.bat

where <version> is an Intel Advisor version you want to use.

On Linux OS and macOS

Run one of the following shell scripts:

source <install-dir>/setvars.sh
source <install-dir>/setvars.csh

Note

The scripts set up the environment for the latest Intel Advisor version installed on your system. If you have more than one version of the Intel Advisor installed want to set up environment for a lower version, also run one of the following scripts:
source <install-dir>/advisor/<version>/env/vars.sh
source <install-dir>/advisor/<version>/env/vars.csh

where <version> is an Intel Advisor version you want to use.

Use this way to set the ADVISOR_<version>_DIR environment variable that you can use to specify additional include directories when compiling, so the compiler can find the Intel® Advisor include file that defines annotations.

Set Up Environment Variables Manually

On Windows OS

  1. Open a command line window.
  2. View the current definition of the environment variable. For example, type:

    set ADVISOR_<version>_DIR

  3. Use a set command to set the environment variable. Type:

    set ADVISOR_<version>_DIR="<install-dir>"

    For example, for the Intel Advisor 2021:

    set ADVISOR_2021_DIR="C:\Program Files (x86)\Intel\oneAPI\advisor\latest"

  4. To always set this variable 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....

On Linux OS and macOS

  1. View the current definition of the environment variable. For example, with the bash shell, type:
    env | grep ADVISOR_<version>_DIR
  2. Use an export command to set the environment variable. Type: export ADVISOR_<version>_DIR="<install-dir>"

    For example, for the Intel Advisor 2021:

    export ADVISOR_2021_DIR="/opt/intel/oneapi/advisor/latest"

  3. To always set this variable on the current system, add this definition to your .login or similar shell initialization file.
  4. To test the definition of an environment variable, type an export command.

Consider setting the following environment variables in addition to ADVISOR_<version>_DIR:

Next Steps

See Also