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.

HDF5

Guidance last updated: 16 October 2026

“HDF5 is a data model, library, and file format for storing and managing data. It supports an unlimited variety of datatypes, and is designed for flexible and efficient I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and applications for managing, manipulating, viewing, and analyzing data in the HDF5 format.”

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. This also loads its matching gompi or iimpi toolchain and dependencies, including zlib and libaec:

module load HDF5/1.14.6-gompi-2025b
module load HDF5/1.14.6-iimpi-2025b
module load HDF5/1.14.5-gompi-2024a
module load HDF5/1.14.3-gompi-2023b
module load HDF5/1.14.0-gompi-2023a
module load HDF5/1.14.0-gompi-2022b

Use an HDF5 build that matches your application’s compiler and MPI toolchain. The modules provide parallel HDF5; h5pcc is the C compiler wrapper and h5dump displays the contents of an HDF5 file.

Parallel C example

Download hdf5-example.c into your job directory. Each MPI process writes one integer to a shared dataset, closes the file, then reopens it and checks its value.

The following example batch submission script compiles and runs the program with two 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
module load HDF5/1.14.6-gompi-2025b
h5pcc hdf5-example.c -o hdf5-example
srun ./hdf5-example
h5dump example.h5

For HDF5/1.14.6-iimpi-2025b, replace the module load and compilation lines with:

module load HDF5/1.14.6-iimpi-2025b
I_MPI_CC=icx h5pcc hdf5-example.c -o hdf5-example

I_MPI_CC=icx selects Intel’s current C compiler; without it, this HDF5 wrapper requests the unavailable icc compiler.

Save the script as hdf5.slurm and submit it with sbatch hdf5.slurm. The program should print PASS: 2 processes wrote and read back their values; h5dump should show the values dataset containing 10, 11.

Installation notes

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

Direct dependencies for latest version of HDF5