Attention

Following the recent operating system upgrade, software listings and module load commands now reflect the upgraded system. Some examples and notices are still being updated and may contain outdated guidance.

ScaLAPACK

Guidance last updated: 15 October 2026

ScaLAPACK provides linear algebra routines for distributed-memory parallel computers, including linear systems, least squares, eigenvalue and singular value problems.

Documentation: https://www.netlib.org/scalapack/#_documentation

Usage

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

srun --pty bash -i

Load one of the following modules. The -fb builds load FlexiBLAS and the matching gompi toolchain (GCC and OpenMPI). Choose a build matching your application’s compiler and MPI:

module load ScaLAPACK/2.2.2-gompi-2026.1-fb
module load ScaLAPACK/2.2.2-gompi-2025b-fb
module load ScaLAPACK/2.2.0-gompi-2024a-fb
module load ScaLAPACK/2.2.0-gompi-2023a-fb
module load ScaLAPACK/2.2.0-gompi-2023b-fb
module load ScaLAPACK/2.2.0-gompi-2022b-fb

Use the MPI compiler wrappers when compiling ScaLAPACK applications and link against ScaLAPACK and FlexiBLAS rather than selecting an OpenBLAS library directly.

Distributed matrix example

Download scalapack-example.f90 into your job directory. It distributes two matrices across a one-row, two-column process grid, multiplies them with PDGEMM, and checks the result against known values.

The following example batch submission script compiles and runs it with two MPI processes on one CPU node:

#!/bin/bash
#SBATCH --partition=sheffield
#SBATCH --nodes=1
#SBATCH --ntasks=2
#SBATCH --cpus-per-task=1
#SBATCH --mem=2G
#SBATCH --time=00:05:00

set -euo pipefail
cd "$SLURM_SUBMIT_DIR"
export SLURM_EXPORT_ENV=ALL
export OMP_NUM_THREADS=1
module load ScaLAPACK/2.2.2-gompi-2026.1-fb
mpifort scalapack-example.f90 -o scalapack-example -lscalapack -lflexiblas
srun ./scalapack-example

Save the script as scalapack.slurm and submit with sbatch scalapack.slurm. The program requires exactly two processes and should report PASS with a maximum absolute error no greater than 1e-12. One BLAS thread per process matches the one CPU requested per task in this example.

Installation notes

ScaLAPACK was installed using Easybuild, build details can be found in $EBROOTSCALAPACK/easybuild with a given module loaded.

Direct dependencies for latest version of ScaLAPACK