Intel oneAPI compilers

Guidance last updated: 1 December 2026

The Intel oneAPI compilers provide C, C++ and Fortran compilers for use on Stanage.

Usage

After connecting to Stanage (see Establishing a SSH connection), start an interactive session:

salloc

You can load a specific version with one of the following commands:

module load intel-compilers/2025.3.3
module load intel-compilers/2025.2.0
module load intel-compilers/2024.2.0
module load intel-compilers/2023.0.0
module load intel-compilers/2022.2.1
module load intel-compilers/2022.2.0

The module loads its GCCcore and binutils dependencies automatically.

Compiler commands

The following commands invoke the oneAPI compilers:

Language

Command

C

icx

C++

icpx

Fortran

ifx

Some older versions also provide the classic compilers icc, icpc and ifort. Their availability depends on the module version.

Compiling a program

After loading the module, compile your source file using the appropriate compiler:

icx -O2 program.c -o program
icpx -O2 program.cpp -o program
ifx -O2 program.f90 -o program

Run compiled programs within a Slurm allocation.

Example batch submission

The following example batch submission script compiles and runs three C, C++ and Fortran source files, program.c, program.cpp and program.f90, located in the submission directory:

#!/bin/bash
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=2000
#SBATCH --time=00:05:00

# Stop if any compile step fails before launching the programs.
set -e
export SLURM_EXPORT_ENV=ALL
module load intel-compilers/2025.3.3

icx -O2 program.c -o program_c
icpx -O2 program.cpp -o program_cpp
ifx -O2 program.f90 -o program_fortran

srun ./program_c
srun ./program_cpp
srun ./program_fortran

Check whether Intel oneAPI vectorised a loop

Load the Intel compiler module and save the C example from the GCC vectorisation section as scale.c. Compile the same source at both optimisation levels and save a report for each:

icx -O2 -qopt-report=2 -qopt-report-file=scale-O2.optrpt -c scale.c -o scale-O2.o
icx -O3 -qopt-report=2 -qopt-report-file=scale-O3.optrpt -c scale.c -o scale-O3.o

Look for a vectorisation remark for the loop in each report. If the compiler skipped the loop, the report can explain why. See Intel’s optimisation report guide for examples of how to read these reports.

For this example, both reports may show the same result because -O2 already vectorises the loop.

To compare runtime, build your own program with -O2 and -O3, keeping the other compiler options the same. Time repeated runs with the same input and resources on the same type of compute node. Compare both results with your reference output using the numerical tolerance your workload requires.

Installation notes

intel-compilers was installed using Easybuild, build details can be found in $EBROOTINTELMINCOMPILERS/easybuild with a given module loaded.

Direct dependencies for latest version of intel-compilers