Intel Compilers

The Intel Compilers are a set of compilers populare in HPC optmized for Intel processors. There are two families of the Intel Compilers, the classic compilers and the OneAPI compilers. The module name is not the same in all software stacks. The module names can be found in the table below.

VersionNHR Modules (nhr-lmod)SCC Modules (scc-lmod)HLRN Modules (hlrn-tmod)
OneAPIintel-oneapi-compilersintel-oneapi-compilersintel/2022 and newer
classicintelintel/19.x.y and older
Info

The OneAPI compilers currently come with the last version of the classic compilers.

Warning

While the compilers can compile code that will run on AMD CPUs, the code performs poorly. We strongly recommend that you use a different set of compilers for nodes with AMD CPUs such as GCC or LLVM (Clang).

To load a specific version, run

module load NAME/VERSION

where NAME comes from the table above. To load the default version, run

module load NAME

Languages

The supported languages and the names of their compiler programs are in the table below.

LanguageOneAPI ProgramClassic Program
Cicxicc
C++icxicc
Fortranifxifort

OpenMP

The Intel Compilers support the OpenMP (Open Multi-Processing) extension for C, C++, and Fortran. Enable it by adding the -qopenmp option to the compiler. Additionally, the -qopenmp-simd option enables using the OpenMP simd directive.

Targeting CPU Architecture

By default, the Intel Compilers will compile code targeting the generic version of the CPU the compilers are run on. On an x86-64 node, this means being compatible with the very earliest 64-bit Intel processors from 2003 and thus no AVX/AVX2/AVX-512 without SSE fallback. The compilers use the following options to control the target architecture:

Compiler OptionDefault ValueMeaning
-march=ARCHgenericGenerate instructions targeting ARCH
-mtune=ARCHgenericTune performance for ARCH but don’t generate instructions not supported by -march=ARCH

The ARCH values for the different CPU architectures (Spack naming) we provide are

Architecture/Target (Spack naming)ARCH value for Intel Compilers
Generic x86-64 Intel CPUoff
haswellhaswell (use core-avx2 for classic before 19)
broadwellbroadwell (use core-avx2 for classic before 19)
skylake_avx512skylake-avx512 (use core-avx2 for classic before 19)
cascadelakecascadelake (use skylake-avx512 for classic 18 and core-avx2 for classic before 18)
sapphirerapidssapphirerapids (use icelake-client for classic 18) and core-avx2 for classic before 18)
zen2DON’T, but if you must, use core-avx2 and see warning below
zen3DON’T, but if you must, use core-avx2 and see warning below
Warning

While the compilers can compile code that will run on AMD CPUs, the code performs poorly. We strongly recommend that you use a different set of compilers for nodes with AMD CPUs such as GCC or LLVM (Clang).