Visible to Intel only — GUID: GUID-9352EFEA-BAED-433C-82AA-27E21C8559A7
Visible to Intel only — GUID: GUID-9352EFEA-BAED-433C-82AA-27E21C8559A7
oneAPI Development Environment Setup
The Intel® oneAPI tools are available in several convenient forms, as detailed in oneAPI Toolkit Distribution earlier in this guide. Follow the instructions in the Intel oneAPI Toolkit Installation Guide to obtain and install the tools.
Install Directories
On a Windows* system, the Intel oneAPI development toolkits (Base, HPC, Rendering, etc.) are typically installed in the C:\Program Files (x86)\Intel\oneAPI\ directory which is known as the Component Directory Layout. When installing a toolkit, a Unified Directory Layout is also created and linked to the Component Directory Layout in the C:\Program Files (x86)\Intel\oneAPI\<toolkit-version> folder.
On a Linux* system, the Intel oneAPI development toolkits (Base, HPC, Rendering, etc.) are typically installed in the /opt/intel/oneapi/ directory which is known as the Component Directory Layout. When installing a toolkit, a Unified Directory Layout is also created and linked to the Component Directory Layout in the /opt/intel/oneapi/<toolkit-version>/ folder.
To learn more about the differences between the Component Directory Layout and Unified Directory Layout, see Use the setvars and oneapi-vars scripts with Windows or Use the setvars and oneapi-vars scripts with Linux
These are the default locations; the precise location can be changed during installation.
Within the oneAPI installation directory are a collection of folders that contain the compilers, libraries, analyzers, and other tools installed on the development system. The precise list depends on the toolkit(s) installed and the options selected during installation. Most of the folders within the oneAPI installation directory have obvious names. For example, the mkl folder contains the Intel® oneAPI Math Kernel Library (oneMKL), the ipp folder contains the Intel® Integrated Performance Primitives (Intel® IPP) library, and so on.
Environment Variables
Some of the tools in the Intel oneAPI toolkits depend on environment variables to:
Assist the compilation and link process (e.g., PATH, CPATH, INCLUDE, etc.)
Locate debuggers, analyzers, and local help files (e.g., PATH, MANPATH)
Identify tool-specific parameters and dynamic (shared) link libraries (e.g., LD_LIBRARY_PATH, CONDA_*, etc.)
setvars, oneapi-vars, and vars Files
Every installation of the Intel oneAPI toolkits includes a single top-level “setvars” script and multiple tool-specific “vars” scripts (setvars.sh and env/vars.sh on Linux; setvars.bat and env\vars.bat on Windows). When executed (sourced), these scripts configure the local environment variables to reflect the needs of the installed Intel oneAPI development tools.
The Unified Directory Layout was implemented in 2024.0. It utilizes a top-level oneapi-vars script to initialize the common environment variables and relies on optional etc/*/vars.sh (on Linux) and etc\*\vars.bat (on Windows) scripts to initialize component-specific environment variables that are not addressed by the oneapi-vars script.
The following sections provide detailed instructions on how to use the setvars, oneapi-vars, and vars scripts to initialize the oneAPI development environment:
Install GPU Drivers or Plug-ins (Optional)
You can develop oneAPI applications using C++ and SYCL* that will run on Intel, AMD*, or NVIDIA* GPUs.
To develop and run applications for specific GPUs you must first install the corresponding drivers or plug-ins:
To use an Intel GPU, install the latest Intel GPU drivers.
To use an AMD* GPU with the Intel® oneAPI DPC++ Compiler, install the oneAPI for AMD GPUs plugin from Codeplay (Linux only).
To use an NVIDIA* GPU with the Intel® oneAPI DPC++ Compiler, install the oneAPI for NVIDIA GPUs plugin from Codeplay (Linux only).
Modulefiles (Linux only)
Users of Environment Modules and Lmod can use the modulefiles included with the oneAPI toolkit installation to initialize their development environment variables. The oneAPI modulefile scripts are only supported on Linux and are provided as an alternative to using the setvars, oneapi-vars, and vars scripts referenced above. In general, users should not mix modulefiles with the setvars or oneapi-vars environment scripts.
See Use Modulefiles with Linux* for detailed instructions on how to use the oneAPI modulefiles to initialize the oneAPI development environment.