Get Started

  • 2023.0
  • 12/16/2022
  • Public Content

Configure Your

Intel® oneAPI Base Toolkit
If you are working with an FPGA system, see Configure Your FPGA System.

Install CMake*, pkg-config, and GNU* Dev Tools to Build Samples

Although the CMake and pkg-config build tools are not required by the oneAPI tools and toolkits, many oneAPI samples are provided as CMake projects and require CMake to build them. In some cases pkg-config is necessary to locate libraries needed to complete a build of the application.
The Intel compilers utilize the existing GNU build toolchains to provide a complete C/C++ development environment. If your distribution of Linux does not include the complete suite of GNU development tools, you need to install these tools.
To install CMake, pkg-config, and the GNU development tools on your Linux system, open a terminal session and enter the following commands:
sudo apt update sudo apt -y install cmake pkg-config build-essential
Red Hat* and Fedora*
sudo yum update sudo yum -y install cmake pkgconfig sudo yum groupinstall "Development Tools"
sudo zypper update sudo zypper --non-interactive install cmake pkg-config sudo zypper --non-interactive install pattern devel_C_C++
Verify the installation by displaying the installation location with this command:
which cmake pkg-config make gcc g++
One or more of these locations will display:
For more information about CMake, refer to
If you are unable to install CMake using your Linux distribution's standard package manager, see the downloads page for additional installation options.

Set Environment Variables for CLI Development

For working at a Command Line Interface (CLI), the tools in the oneAPI toolkits are configured via environment variables. Set up your CLI environment by
Option 1: Source once per session
every time you open a new terminal window:
You can find the
script in the root folder of your oneAPI installation, which is typically
for system wide installation and
when installed as a private installation. Note that system wide installation requires root or sudo privileges.
For system wide installations:
. /opt/intel/oneapi/
For private installations:
. ~/intel/oneapi/
Option 2: One time setup for
Environment variables can be set up to automatically set using one of the methods below:
To have the environment automatically set up for your projects, include the command
source <install_dir>/
in a startup script where it will be invoked automatically (replace
with the path to your oneAPI install location). The default installation locations are
for system wide installations and
for private installations.
For example, you can add the
source <install_dir>/
command to your
file. To make the settings permanent for all accounts on your system, create a one-line
script in your system's
folder that sources
(for more details, see Ubuntu documentation on Environment Variables).
script can be managed using a configuration file, which is especially helpful if you need to initialize specific versions of libraries or the compiler, rather than defaulting to the "latest" version. For more details, see Using a Configuration File to Manage
If you need to setup the environment in a non-POSIX shell, see
oneAPI Development Environment Setup for more configuration options.

GPU: Disable Hangcheck

This section applies only to applications with long-running GPU compute workloads in native environments. It is not recommended for virtualizations or other standard usages of GPU, such as gaming.
A workload that takes more than four seconds for GPU hardware to execute is a long running workload. By default, individual threads that qualify as long-running workloads are considered hung and are terminated. By disabling the hangcheck timeout period, you can avoid this problem.
If the system is rebooted, hangcheck is automatically enabled. You must disable hangcheck again after every reboot or follow the directions to disable hangcheck persistently (across multiple reboots).
If the kernel is updated, hangcheck is automatically enabled. Run the procedure below after every kernel update to ensure hangcheck is disabled.
  1. Open a terminal.
  2. Open the
    file in
  3. In the grub file, find the line
  4. Enter this text between the quotes (""):
  5. Run this command:
    sudo update-grub
  6. Reboot the system. Hangcheck remains disabled.

For GPU Users, Install GPU Drivers

If you followed the instructions in the Installation Guide to install GPU Drivers, you may skip this step. If you have not installed the drivers, follow the directions in the Installation Guide.

GPU: Add User to Video Group

For GPU compute workloads, non-root (normal) users do not typically have access to the GPU device.
  1. To give a user access, first determine which group name is assigned ownership of the render nodes:
    stat -c "%G" /dev/dri/render* groups
    In this example, the
    group is assigned ownership of the render nodes:
  2. Determine if the current user is a member of that render node group:
    groups ${USER}
    In this example the current user is not included in the
  3. Add the user to the group using
    sudo gpasswd -a ${USER} video
  4. Activate the
    newgrp video

Next Step

Run a sample project using one of these methods:

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at