4 Installing Intel oneAPI framework
Jakub Sykulski edited this page 2026-02-10 17:05:26 +01:00

Installing Intel oneAPI Framework

Intel provides a streamlined installation process for the oneAPI Base Toolkit, which includes the compiler and all necessary frameworks for high-performance computing, including oneMKL for optimized matrix operations.

Installation Steps

  1. Download the Installer Visit the Intel oneAPI Base Toolkit download page.

    • Select the appropriate settings for your system (Linux/macOS/Windows).
    • The website will generate a .sh installation script tailored to your configuration.
  2. Run the Installer Execute the downloaded script with sudo privileges to ensure a system-wide installation:

    sudo ./your-downloaded-script.sh
    
    • Note: Without sudo, the libraries will be installed locally (e.g., /usr/local). My CMake configuration assumes a global installation (typically /opt/intel/oneapi). If you prefer a local install, you'll need to adjust the CMake paths accordingly.
  3. Verify Installation After installation, confirm the toolkit is available by running:

    source /opt/intel/oneapi/setvars.sh
    icpx --version
    

You should see:

Intel(R) oneAPI DPC++/C++ Compiler <version>
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2025.3/bin/compiler
Configuration file: /opt/intel/oneapi/compiler/2025.3/bin/compiler/../icpx.cfg

Additional Step: Linux Only

The Intel oneAPI environment variables are not sourced automatically after installation. To simplify your workflow, you can add the following alias to your .bashrc or .zshrc file:

alias oneAPI='source /opt/intel/oneapi/setvars.sh --include-intel-llvm'

Usage

After adding the alias, reload your shell configuration:

source ~/.bashrc  # or source ~/.zshrc

Now, you can enable the oneAPI environment anytime by running:

oneAPI

Alternative: Auto-Source on Shell Startup

If you prefer to source the environment variables automatically for every new shell session, add this line to your .bashrc or .zshrc:

source /opt/intel/oneapi/setvars.sh --include-intel-llvm > /dev/null