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.
Version | NHR Modules (nhr-lmod) | SCC Modules (scc-lmod) | HLRN Modules (hlrn-tmod) |
---|---|---|---|
OneAPI | intel-oneapi-compilers | intel-oneapi-compilers | intel/2022 and newer |
classic | intel | intel/19.x.y and older |
The OneAPI compilers currently come with the last version of the classic compilers.
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.
Language | OneAPI Program | Classic Program |
---|---|---|
C | icx | icc |
C++ | icx | icc |
Fortran | ifx | ifort |
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 Option | Default Value | Meaning |
---|---|---|
-march=ARCH | generic | Generate instructions targeting ARCH |
-mtune=ARCH | generic | Tune 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 CPU | off |
haswell | haswell (use core-avx2 for classic before 19) |
broadwell | broadwell (use core-avx2 for classic before 19) |
skylake_avx512 | skylake-avx512 (use core-avx2 for classic before 19) |
cascadelake | cascadelake (use skylake-avx512 for classic 18 and core-avx2 for classic before 18) |
sapphirerapids | sapphirerapids (use icelake-client for classic 18) and core-avx2 for classic before 18) |
zen2 | DON’T, but if you must, use core-avx2 and see warning below |
zen3 | DON’T, but if you must, use core-avx2 and see warning below |
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).