From 6e168e8fb709be12e83050fc20a43f86b461d77c Mon Sep 17 00:00:00 2001 From: Sean Bryan Date: Mon, 12 Jan 2026 14:35:19 +1100 Subject: [PATCH] Remove OPAL_PREFIX from build environment Recent changes to the xp65 environment [ACCESS-NRI/ACCESS-Analysis-Conda#352](https://github.com/ACCESS-NRI/ACCESS-Analysis-Conda/pull/352) is causing CMake to pick up the wrong MPI library (/g/data/xp65/public/apps/openmpi/4.1.6 instead of /apps/openmpi/4.1.0/). The OPAL_PREFIX environment variable causes the xp65 MPI library to take precedence over any MPI libraries loaded via module load - as a workaround, this change unsets this variable from the build environment to fix this issue. --- src/benchcab/model.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/benchcab/model.py b/src/benchcab/model.py index 5c3786c..58e8a75 100644 --- a/src/benchcab/model.py +++ b/src/benchcab/model.py @@ -175,6 +175,10 @@ def build(self, modules: list[str], mpi: bool, coverage: bool): "-DCMAKE_VERBOSE_MAKEFILE=ON", ] + # This is required to prevent CMake from finding openmpi + # libraries installed under xp65: + env.pop("OPAL_PREFIX", None) + # This is required to prevent CMake from finding the conda # installation of netcdf-fortran (#279): env.pop("LDFLAGS", None)