Skip to content

Compilers, libraries and MPI

Hydra has three compiler families, each with its own numerical libraries and MPI builds. When you need the module name for a compiler or an MPI, or the flag that turns on OpenMP, look it up here. Once the program is built, Submit a parallel job shows you how to run it.

Compilers

Family Module Compilers Versions Default
GNU gcc gcc, g++, gfortran 4.9.1 to 15.2.0 8.5.0
Intel oneAPI intel icx, icpx, ifx; classic icc, icpc, ifort in older versions 2021.3 to 2025.3 2024.0
NVIDIA HPC SDK nvidia nvc, nvc++, nvfortran, nvcc 21.9 to 25.9 23.9

module load gcc loads the default. module load gcc/13.2.0 loads a specific version. module -t avail 2>&1 | grep '^gcc/' lists every version of a family (intel/, nvidia/ likewise). Compile, link and run a program with the same family and version, because libraries and runtimes from different compilers do not mix.

Intel renamed its compilers with oneAPI in 2021 (icx, icpx, ifx). The classic names remain in the versions that ship them. The NVIDIA compilers are the former PGI compilers. There is no separate PGI module. nvcc, the CUDA compiler, is part of the NVIDIA module. See GPUs.

Libraries

Library Provides Examples
BLAS and LAPACK linear algebra, one build per compiler family ~hpc/examples/lapack
Intel MKL BLAS, LAPACK, FFT and more, with the Intel compilers ~hpc/examples/lapack/intel
GSL GNU Scientific Library ~hpc/examples/gsl

The NVIDIA LAPACK build hangs or crashes in some cases. ~hpc/examples/lapack/nvidia/README describes them.

MPI

Every MPI implementation has a build for each compiler family. Load the module that matches the compiler the program was built with and the implementation it was linked against. The module also defines mpirun for that build.

Module Implementation Parallel environment
gcc/V.R/openmpi, intel/YY/openmpi, nvidia/YY/openmpi OpenMPI, default version; openmpi4 and openmpi5 select a major version, openmpi4.1.6-13.2.0 an exact build -pe orte N
gcc/V.R/mvapich, intel/YY/mvapich, nvidia/YY/mvapich MVAPICH 2, over InfiniBand -pe mpich N
intel/YY/mpi Intel MPI -pe orte N
nvidia/YY/mpi NVIDIA's bundled OpenMPI -pe ompi N

V.R is the GCC major and minor version (gcc/13.2/openmpi), and YY is the Intel or NVIDIA release year (intel/24/openmpi, nvidia/24/mvapich). The current module names are on the Job script reference.

Build with the module loaded:

$ module load gcc/13.2/openmpi
$ mpicc -O2 -o hello hello.c        # mpif90 for Fortran, mpicxx for C++

In a job, the slot count comes from $NSLOTS and the node list from $PE_HOSTFILE (OpenMPI) or $TMPDIR/machines (MVAPICH). See Submit an MPI job. ~hpc/examples/mpi has a hello-world build for every compiler and implementation, described in its README.

OpenMP

Compiler Flag
GNU -fopenmp
Intel -qopenmp
NVIDIA -mp

An OpenMP program reads its thread count from OMP_NUM_THREADS. In a job, set it from the slots requested with -pe mthread N:

export OMP_NUM_THREADS=$NSLOTS

A multi-threaded program runs on one node, so its threads and memory are bounded by the largest node. An MPI program spans nodes. ~hpc/examples/openmp has an OpenMP build for each compiler. NVIDIA's compilers also accept OpenACC directives and CUDA Fortran for GPU code. See GPUs.

Further reading


Last updated 2026-10-03