Installation Guide

  • 2022.3
  • 09/08/2022
  • Public Content

Spack

This page provides general instructions on installing the Intel® oneAPI component packages via Spack. After installation, you can use the tools directly or use Spack to build packages with the tools.
To install a package, execute the following command:
spack install <package_name>

Example

The example below demonstrates how to set up Intel oneAPI compilers with Spack. For the full list of oneAPI packages available via Spack, refer to the Package List.
  1. Install the compilers package with the following command:
    spack install intel-oneapi-compilers
  2. Add the oneAPI compilers to the set of compilers that Spack can use:
    spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin/intel64 spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin
    This adds the compilers to your
    compilers.yaml
    .
  3. Verify that the compilers are available:
    spack compiler add
The
intel-oneapi-compilers
package includes two families of compilers:
  • Intel:
    icc
    ,
    iccpc
    ,
    ifort
    - Intel’s classic compilers
  • oneAPI:
    icx
    ,
    icpx
    ,
    ifx
    - Intel’s new generation of compilers based on LLVM
To build the
patchelf
Spack package with
icc
, use:
spack install patchelf%intel
To build with
icx
, use:
spack install patchelf%oneapi
In addition to compilers, oneAPI contains many libraries. The
hdf5
package works with any compatible MPI implementation. To build
hdf5
with Intel oneAPI MPI, use:
spack install hdf5 +mpi ^intel-oneapi-mpi
For more information, see Spack documentation.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.