HPC compiler modules

Linux modules are often used by HPC systems allow using more current versions of software than are in the default system repositories. A typical approach is to create an .sh file for a particular job type. To avoid unexpected conflicts or hidden state, load only the modules necessary for a particular project.

Many modules are typically available, listed by:

module avail

The currently loaded modules are listed by:

module list

Load recent GCC:

source gcc.sh

with gcc.sh like:

module load gcc

export CC=gcc CXX=g++ FC=gfortran

Determine available GCC versions:

module avail gcc

Load Intel oneAPI:

source oneapi.sh

with oneapi.sh like:

module load intel-oneapi

export CC=icx CXX=icpx FC=ifx
export MPI_ROOT=$I_MPI_ROOT

Determine available Intel oneAPI versions:

module avail intel-oneapi

Some HPC systems have a too-old GCC version defaulting for Intel oneAPI, which can be fixed by setting GCC toolchain.