Spack

Install oneAPI for NVIDIA® GPUs using the Spack packaging tool.

Spack Logo

You can install oneAPI for NVIDIA® GPUs using Spack, a tool commonly used in supercomputing.

Usage Guide

To install the oneAPI for NVIDIA® GPUs using Spack, you can follow the below steps. Please note, some of the commands may not be needed depending on your setup.

Step 1 - Read The Docs

Before getting started, it may be worth reading the Spack documentation.

Read Spack Documentation

Step 2 - Install Spack

You will need a Spack install available on your system. Run the following commands to clone spack to your local machine and initialize it.

Install and Setup Spack

git clone --depth=2 https://github.com/spack/spack.git
. spack/share/spack/setup-env.sh
spack bootstrap now

Add Our Packages (temporary)

We currently have an open PR to add our packages to the official spack repo. Until this is merged, please add our packages manually using the commands below.

git clone --depth=2 --branch=spack-pr-50784 https://github.com/scottstraughan/spack-packages.git
spack repo add spack-packages/repos/spack_repo/builtin

Step 3 - Install the Plugin

You can run the following commands to install spack packages. If you wish to specify a driver version to target, you can use driver=VERSION when installing. If you do not specify a value, the latest driver will be used.

spack install codeplay-oneapi-nvidia
spack install codeplay-oneapi-nvidia driver=6.3
spack install codeplay-oneapi-nvidia driver=6.2
spack install codeplay-oneapi-nvidia driver=6.1
spack install codeplay-oneapi-nvidia driver=6.0
spack install codeplay-oneapi-nvidia driver=5.7
spack install codeplay-oneapi-nvidia driver=5.4

Step 4 - Setup the oneAPI Compiler

You can now load the Intel oneAPI compiler and setup some environment variables. The setvars.sh script will allow you to run sycl-ls and ensure everything needed to compile, is available on your PATH.

spack load intel-oneapi-compilers
spack compiler find
source spack/opt/spack/linux-*/intel-oneapi-compilers*/setvars.sh

Step 5 - Test

You can now check everything is working fine by running the following command.

sycl-ls

Select a Product

Please select a product

oneAPI

oneAPI is a cross-industry, open, standards-based unified programming model that delivers a common developer experience across accelerator architecture - for faster application performance, more productivity, and greater innovation.

Dark Mode
brightness_2

Dark Mode

Light text on a dark background.

Light Mode
lightbulb_outline

Light Mode

Dark text on a light background.

public

Also,

part of our network