This directory contains Perlmutter benchmark image recipes, Slurm job scripts, and a result parser for standard OSU, NCCL, and NVSHMEM communication benchmarks.
The benchmark image stages use the main repository images as base images and add only benchmark suites. MPI benchmark images build OSU Micro-Benchmarks 7.5.2 by default.
| Benchmark image tag | Base image | Added benchmark suite |
|---|---|---|
bench-mpich-cpu |
mpich-cpu |
OSU Micro-Benchmarks |
bench-mpich-gpu |
mpich-gpu |
OSU Micro-Benchmarks with CUDA buffers |
bench-openmpi-cpu |
openmpi-cpu |
OSU Micro-Benchmarks |
bench-openmpi-gpu |
openmpi-gpu |
OSU Micro-Benchmarks with CUDA buffers |
bench-openmpi-ofi-ucx-cpu |
openmpi-ofi-ucx-cpu |
OSU Micro-Benchmarks |
bench-openmpi-ofi-ucx-gpu |
openmpi-ofi-ucx-gpu |
OSU Micro-Benchmarks with CUDA buffers |
bench-nccl-gpu |
openmpi-ofi-ucx-gpu |
MPI-enabled nccl-tests for distributed all_reduce_perf |
bench-nccl-mpich-gpu |
mpich-gpu |
MPI-enabled nccl-tests for distributed all_reduce_perf, with aws-ofi-nccl 1.19.0, PHB GDRCopy, and DMA-BUF disabled by default |
bench-nvshmem-gpu |
nvshmem-gpu |
Packaged NVSHMEM performance tests |
The production nccl-gpu image remains MPI-free. The benchmark-only NCCL targets include MPI because the distributed all_reduce_perf test uses MPI for rank wire-up. Use bench-nccl-gpu for the OpenMPI-backed launcher path and bench-nccl-mpich-gpu for the MPICH-backed launcher path.
Build one benchmark image locally:
benchmarks/scripts/build.sh bench-openmpi-ofi-ucx-gpuBuild all benchmark images:
benchmarks/scripts/build.sh allUse local base images instead of the published GHCR images:
BASE_IMAGE_REPO=localhost/communication-libraries-image benchmarks/scripts/build.sh allOverride the OSU Micro-Benchmarks version when needed:
OSU_VERSION=7.5.2 benchmarks/scripts/build.sh bench-openmpi-gpuOverride the NCCL package when validating a different CUDA 13.2 NCCL build:
NCCL_PACKAGE_VERSION=2.30.4-1+cuda13.2 benchmarks/scripts/build.sh bench-nccl-gpuBuild the MPICH-backed NCCL benchmark image:
benchmarks/scripts/build.sh bench-nccl-mpich-gpuOverride the aws-ofi-nccl version for that MPICH-backed benchmark image:
NCCL_MPICH_AWS_OFI_NCCL_VERSION=1.19.0 benchmarks/scripts/build.sh bench-nccl-mpich-gpuEach script writes Slurm stdout/stderr under $SCRATCH/communication-libraries-image/slurm and one log file per benchmark case under $SCRATCH/communication-libraries-image/benchmarks/results/$SLURM_JOB_ID.
Override JOB_OUTPUT_DIR or RESULT_ROOT if you want a different scratch location.
Before submitting, replace #SBATCH --account=YOUR_NERSC_ACCOUNT with your allocation account.
The benchmark jobs launch with srun --mpi=pmix and podman-hpc shared-run.
Until the site podman-hpc stack handles --userns=keep-id reliably with PMIx, these scripts default to the older Podman backend:
PODMANHPC_PODMAN_BIN=/global/common/shared/das/podman-4.7.0/bin/podmanSet PODMANHPC_PODMAN_BIN before sbatch if you need to test a different backend.
Run MPICH OSU osu_bw host-buffer tests on CPU nodes:
MPI_IMPL=mpich sbatch --export=ALL benchmarks/scripts/perlmutter/run-mpi-osu-cpu.sbatchRun MPICH OSU osu_bw host- and CUDA-buffer tests on GPU nodes:
MPI_IMPL=mpich sbatch --export=ALL benchmarks/scripts/perlmutter/run-mpi-osu-gpu.sbatchThe GPU OSU script uses -d cuda for point-to-point CUDA-buffer tests. This is required for MPICH on Perlmutter; the older positional D D OSU syntax fails in MPICH's Waitall path.
Run OpenMPI or OpenMPI+OFI+UCX OSU benchmarks:
MPI_IMPL=openmpi sbatch --export=ALL benchmarks/scripts/perlmutter/run-mpi-osu-gpu.sbatch
MPI_IMPL=openmpi-ofi-ucx sbatch --export=ALL benchmarks/scripts/perlmutter/run-mpi-osu-gpu.sbatchThe OpenMPI scripts run the standard benchmark types: osu_bw inter-node and intra-node, osu_alltoall across two nodes, and host plus CUDA-buffer variants on GPU nodes. TCP/no-CXI comparison cases are optional with RUN_DEGRADED=1; they are treated as diagnostic comparisons and do not fail the batch job if they fail.
The OpenMPI CPU script also has an experimental LINKx diagnostic:
MPI_IMPL=openmpi RUN_LNX=1 sbatch --export=ALL benchmarks/scripts/perlmutter/run-mpi-osu-cpu.sbatchThis adds an optional intra-node osu_bw case with FI_PROVIDER=lnx, FI_LNX_PROV_LINKS=shm+cxi:<cxi device>, FI_SHM_USE_XPMEM=1, and OMPI_MCA_mtl_ofi_av=table.
It is not part of the default benchmark matrix because the current Perlmutter container stack does not produce usable LNX fi_info entries for shm+cxi with the tested libfabric 2.1.0 or 2.3.1 images.
The default OpenMPI benchmark path therefore stays on CXI while LINKx remains an opt-in diagnostic.
Run NCCL all_reduce_perf on two GPU nodes:
sbatch benchmarks/scripts/perlmutter/run-nccl-all-reduce-gpu.sbatchThe NCCL benchmark script launches four ranks per GPU node by default and maps local ranks to the four Perlmutter CXI devices by PCI locality:
local_rank: 0 1 2 3
GPU: 0 1 2 3
CXI: cxi3 cxi2 cxi1 cxi0
The default can be changed with CXI_DEVICE_MAP. The script also defaults NCCL_NET_GDR_LEVEL=LOC and NCCL_GDRCOPY_ENABLE=0 because the direct net-GDR path currently returns FI_ENOSPC in this containerized Perlmutter setup. This was reproduced with NCCL 2.29.7-1+cuda13.2 and 2.30.4-1+cuda13.2 when using aws-ofi-nccl 1.19.0. Set NCCL_NET_GDR_LEVEL=PHB NCCL_GDRCOPY_ENABLE=1 before sbatch when testing direct GPU-memory transport. Set RUN_DEGRADED=1 to add the optional socket comparison; it is treated as diagnostic and does not fail the batch job if it fails.
Run the MPICH-backed NCCL benchmark. This selects bench-nccl-mpich-gpu and defaults to NCCL_NET_GDR_LEVEL=PHB, NCCL_GDRCOPY_ENABLE=1, and OFI_NCCL_DISABLE_DMABUF=1:
NCCL_MPI_IMPL=mpich sbatch --export=ALL benchmarks/scripts/perlmutter/run-nccl-all-reduce-gpu.sbatchThe no-DMA-BUF default is intentional for aws-ofi-nccl 1.19.0 on the tested Perlmutter stack. Both host and container runs with libfabric 2.1.0 selected CXI and SENDRECV, but the default DMA-BUF path failed with NO_SPACE completions on small receive requests. With OFI_NCCL_DISABLE_DMABUF=1, the same 2-node, 8-rank all_reduce_perf -b 8 -e 4G -f 2 container run completed and reached about 72 GB/s bus bandwidth at 4 GiB.
Run NVSHMEM device all-to-all latency on two GPU nodes:
sbatch benchmarks/scripts/perlmutter/run-nvshmem-alltoall-latency-gpu.sbatchOverride an image tag when testing a local build:
IMAGE=localhost/communication-libraries-image:bench-openmpi-ofi-ucx-gpu \
MPI_IMPL=openmpi-ofi-ucx \
sbatch --export=ALL benchmarks/scripts/perlmutter/run-mpi-osu-gpu.sbatchGenerate a Markdown report from a result directory:
benchmarks/scripts/process-results.py "$SCRATCH/communication-libraries-image/benchmarks/results/<jobid>" \
-o "$SCRATCH/communication-libraries-image/benchmarks/results/<jobid>/report.md"The parser recognizes:
| Suite | Parsed output |
|---|---|
| OSU | osu_bw bandwidth tables and osu_alltoall latency tables |
| NCCL | all_reduce_perf out-of-place and in-place bandwidth tables |
| NVSHMEM | alltoall_latency device latency and bandwidth tables |
Committed benchmark snapshots:
reports/perlmutter-20260426T072155Z.md: baseline MPICH, OpenMPI, NCCL, and NVSHMEM results.reports/nccl-host-aws-ofi-1.19.0-libfabric-2.1.0-20260508.md: host-side NCCL plus aws-ofi-nccl 1.19.0 validation with scratch-built libfabric 2.1.0.reports/nccl-podman-hpc-8node-aws-ofi-1.19.0-libfabric-2.1.0-20260508.md: 8-nodepodman-hpcNCCLall_reduce_perfresult with the MPICH-backed benchmark image.reports/perlmutter-openmpi-ob1-btl-20260426.md: focused OpenMPIob1/BTL shared-memory experiment.