From 982c77bd6713701eb78abe810504b4d38162d94f Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 13:59:30 +0100 Subject: [PATCH 01/31] firedrake-configure options for Ubuntu 2026.04 --- scripts/firedrake-configure | 135 ++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 865dd8eed6..51344b1247 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -213,6 +213,9 @@ def detect_os() -> "OS": return OS.UBUNTU_2404_X86_64 elif platform.machine() == "aarch64": return OS.UBUNTU_2404_AARCH64 + if os_info["VERSION_ID"] == "26.04": + if platform.machine() == "x86_64": + return OS.UBUNTU_2604_X86_64 elif platform.system() == "Darwin": if platform.machine() == "arm64": @@ -227,6 +230,7 @@ def detect_os() -> "OS": class OS(enum.Enum): UBUNTU_2404_X86_64 = "ubuntu24.04-x86_64" UBUNTU_2404_AARCH64 = "ubuntu24.04-aarch64" + UBUNTU_2604_X86_64 = "ubuntu26.04-x86_64" MACOS_ARM64 = "macos-arm64" UNKNOWN = "unknown" @@ -680,6 +684,137 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { ], ), + # Ubuntu 26.04 x86 + + (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( + name="default", + system_packages=[ + "bison", + "build-essential", + "cmake", + "flex", + "gfortran", + "git", + "ninja-build", + "pkg-config", + "python3-dev", + "python3-pip", + + # PETSc external packages + "libfftw3-dev", + "libfftw3-mpi-dev", + "libhwloc-dev", + "libhdf5-mpi-dev", + "libhypre-dev", + "libmumps-ptscotch-dev", + "libmetis-dev", + "libnetcdf-dev", + "libopenblas-dev", + "libopenmpi-dev", + "libpnetcdf-dev", + "libptscotch-dev", + "libscalapack-openmpi-dev", + "libsuitesparse-dev", + "libsuperlu-dev", + "libsuperlu-dist-dev", + ], + extra_petsc_configure_options=[ + "--with-bison", + "--with-fftw", + "--with-hdf5", + "--with-hwloc", + "--with-hypre", + "--with-metis", + "--with-mumps", + "--with-netcdf", + "--with-pnetcdf", + "--with-ptscotch", + "--with-ptscotch-lib=-l:libptesmumps.so.7.0 -l:libptscotch.so.7.0 -libptscotcherr.so.7.0 -l:libesmumps.so.7.0 -l:libscotch.so.7.0 -l:libscotcherr.so.7.0", + "--with-ptscotch-include=/usr/include/scotch", + "--with-scalapack-lib=-lscalapack-openmpi", + "--with-suitesparse", + "--with-superlu_dist", + "--with-zlib", + "--download-hypre", + ], + cflags=["-O3", "-march=native", "-mtune=native"], + cxxflags=["-O3", "-march=native", "-mtune=native"], + fflags=["-O3", "-march=native", "-mtune=native"], + include_dirs=[ + "/usr/include/hdf5/openmpi", + "/usr/include/hypre", + "/usr/include/superlu", + "/usr/include/superlu-dist", + ], + library_dirs=[ + "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", + ], + ), + + (OS.UBUNTU_2604_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( + name="complex", + system_packages=[ + "bison", + "build-essential", + "cmake", + "flex", + "gfortran", + "git", + "ninja-build", + "pkg-config", + "python3-dev", + "python3-pip", + + # PETSc external packages + "libfftw3-dev", + "libfftw3-mpi-dev", + "libhwloc-dev", + "libhdf5-mpi-dev", + "libmumps-ptscotch-dev", + "libmetis-dev", + "libnetcdf-dev", + "libopenblas-dev", + "libopenmpi-dev", + "libpnetcdf-dev", + "libptscotch-dev", + "libscalapack-openmpi-dev", + "libsuitesparse-dev", + "libsuperlu-dev", + "libsuperlu-dist-dev", + ], + extra_petsc_configure_options=[ + "--with-scalar-type=complex", + "--with-bison", + "--with-fftw", + "--with-hdf5", + "--with-hwloc", + "--with-metis", + "--with-mumps", + "--with-netcdf", + "--with-pnetcdf", + "--with-ptscotch", + "--with-ptscotch-lib=-l:libptesmumps.so.7.0 -l:libptscotch.so.7.0 -libptscotcherr.so.7.0 -l:libesmumps.so.7.0 -l:libscotch.so.7.0 -l:libscotcherr.so.7.0", + "--with-ptscotch-include=/usr/include/scotch", + "--with-scalapack-lib=-lscalapack-openmpi", + "--with-suitesparse", + "--with-superlu_dist", + "--with-zlib", + "--download-hypre", + ], + cflags=["-O3", "-march=native", "-mtune=native"], + cxxflags=["-O3", "-march=native", "-mtune=native"], + fflags=["-O3", "-march=native", "-mtune=native"], + include_dirs=[ + "/usr/include/hdf5/openmpi", + "/usr/include/hypre", + "/usr/include/superlu", + "/usr/include/superlu-dist", + ], + library_dirs=[ + "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", + ], + ), + # macOS arm64 (OS.MACOS_ARM64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( From 586b1a8095a32fda0c8e880a11cbe3c99068a283 Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 13:59:47 +0100 Subject: [PATCH 02/31] test Ubuntu 26.04 on CI --- .github/workflows/core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 516cd386dc..896e0fc529 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -90,7 +90,7 @@ jobs: runs-on: [self-hosted, Linux] container: # TODO: set to 'ubuntu:latest' - image: ubuntu:noble + image: ubuntu:resolute outputs: sdist_conclusion: ${{ steps.report_sdist.outputs.conclusion }} env: From 5e46bf0ef6810235573ecb7116bb02907b3be10d Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 14:05:58 +0100 Subject: [PATCH 03/31] proper string for multiple petsc configure args --- scripts/firedrake-configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 51344b1247..0f2f8731ef 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -729,7 +729,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-netcdf", "--with-pnetcdf", "--with-ptscotch", - "--with-ptscotch-lib=-l:libptesmumps.so.7.0 -l:libptscotch.so.7.0 -libptscotcherr.so.7.0 -l:libesmumps.so.7.0 -l:libscotch.so.7.0 -l:libscotcherr.so.7.0", + "--with-ptscotch-lib='-l:libptesmumps.so.7.0 -l:libptscotch.so.7.0 -libptscotcherr.so.7.0 -l:libesmumps.so.7.0 -l:libscotch.so.7.0 -l:libscotcherr.so.7.0'", "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", "--with-suitesparse", @@ -793,7 +793,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-netcdf", "--with-pnetcdf", "--with-ptscotch", - "--with-ptscotch-lib=-l:libptesmumps.so.7.0 -l:libptscotch.so.7.0 -libptscotcherr.so.7.0 -l:libesmumps.so.7.0 -l:libscotch.so.7.0 -l:libscotcherr.so.7.0", + "--with-ptscotch-lib='-l:libptesmumps.so.7.0 -l:libptscotch.so.7.0 -libptscotcherr.so.7.0 -l:libesmumps.so.7.0 -l:libscotch.so.7.0 -l:libscotcherr.so.7.0'", "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", "--with-suitesparse", From 431b57b28236e369969e43f45fe1f5f46e033fee Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 14:13:01 +0100 Subject: [PATCH 04/31] CI: print petsc configure.log on failure --- .github/workflows/core.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 896e0fc529..8253512fb3 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -172,7 +172,8 @@ jobs: cd petsc python3 ../firedrake-repo/scripts/firedrake-configure \ --arch ${{ matrix.arch }} --show-petsc-configure-options | \ - xargs -L1 ./configure --with-make-np=8 --download-slepc + xargs -L1 ./configure --with-make-np=8 --download-slepc \ + || cat configure.log && exit make PETSC_DIR=/__w/firedrake/firedrake/petsc PETSC_ARCH=arch-firedrake-${{ matrix.arch }} make check { From 50c88df100b1e27d8bc127aa0a03a1955a1efe6c Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 16:20:24 +0100 Subject: [PATCH 05/31] restore ubuntu:latest in CI --- .github/workflows/core.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 8253512fb3..982e4422df 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -89,8 +89,7 @@ jobs: arch: [default, complex] runs-on: [self-hosted, Linux] container: - # TODO: set to 'ubuntu:latest' - image: ubuntu:resolute + image: ubuntu:latest outputs: sdist_conclusion: ${{ steps.report_sdist.outputs.conclusion }} env: @@ -479,8 +478,7 @@ jobs: name: Build and test Firedrake (Linux CUDA) runs-on: [self-hosted, Linux, gpu] container: - # TODO: set to 'ubuntu:latest' - image: ubuntu:noble + image: ubuntu:latest options: --gpus all if: inputs.test_gpu env: From 006bb6b61187aed592445fe3af9677a55567b31f Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 16:21:08 +0100 Subject: [PATCH 06/31] firedrake-configure ubuntu:26.04 do not set ptscotch version --- scripts/firedrake-configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 0f2f8731ef..aafa90475c 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -729,7 +729,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-netcdf", "--with-pnetcdf", "--with-ptscotch", - "--with-ptscotch-lib='-l:libptesmumps.so.7.0 -l:libptscotch.so.7.0 -libptscotcherr.so.7.0 -l:libesmumps.so.7.0 -l:libscotch.so.7.0 -l:libscotcherr.so.7.0'", + "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", "--with-suitesparse", @@ -793,7 +793,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-netcdf", "--with-pnetcdf", "--with-ptscotch", - "--with-ptscotch-lib='-l:libptesmumps.so.7.0 -l:libptscotch.so.7.0 -libptscotcherr.so.7.0 -l:libesmumps.so.7.0 -l:libscotch.so.7.0 -l:libscotcherr.so.7.0'", + "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", "--with-suitesparse", From edac843aea0ee0bbe9659c416dce4eaede36a6a0 Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 16:29:39 +0100 Subject: [PATCH 07/31] firedrake-configure: no download-hypre for Ubuntu 26.04 and 24.04 is now community arch --- scripts/firedrake-configure | 254 ++++++++++++++++++------------------ 1 file changed, 128 insertions(+), 126 deletions(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index aafa90475c..5142cefc06 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -358,67 +358,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { # Ubuntu 24.04 x86 - (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( - name="default", - system_packages=[ - "bison", - "build-essential", - "cmake", - "flex", - "gfortran", - "git", - "ninja-build", - "pkg-config", - "python3-dev", - "python3-pip", - - # PETSc external packages - "libfftw3-dev", - "libfftw3-mpi-dev", - "libhwloc-dev", - "libhdf5-mpi-dev", - "libmumps-ptscotch-dev", - "libmetis-dev", - "libnetcdf-dev", - "libopenblas-dev", - "libopenmpi-dev", - "libpnetcdf-dev", - "libptscotch-dev", - "libscalapack-openmpi-dev", - "libsuitesparse-dev", - "libsuperlu-dev", - "libsuperlu-dist-dev", - ], - extra_petsc_configure_options=[ - "--with-bison", - "--with-fftw", - "--with-hdf5", - "--with-hwloc", - "--with-metis", - "--with-mumps", - "--with-netcdf", - "--with-pnetcdf", - "--with-ptscotch", - "--with-scalapack-lib=-lscalapack-openmpi", - "--with-suitesparse", - "--with-superlu_dist", - "--with-zlib", - "--download-hypre", - ], - cflags=["-O3", "-march=native", "-mtune=native"], - cxxflags=["-O3", "-march=native", "-mtune=native"], - fflags=["-O3", "-march=native", "-mtune=native"], - include_dirs=[ - "/usr/include/hdf5/openmpi", - "/usr/include/scotch", - "/usr/include/superlu", - "/usr/include/superlu-dist", - ], - library_dirs=[ - "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", - ], - ), - (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( name="default-cuda", system_packages=[ @@ -499,67 +438,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb", ), - (OS.UBUNTU_2404_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( - name="complex", - system_packages=[ - "bison", - "build-essential", - "cmake", - "flex", - "gfortran", - "git", - "ninja-build", - "pkg-config", - "python3-dev", - "python3-pip", - - # PETSc external packages - "libfftw3-dev", - "libfftw3-mpi-dev", - "libhwloc-dev", - "libhdf5-mpi-dev", - "libmumps-ptscotch-dev", - "libmetis-dev", - "libnetcdf-dev", - "libopenblas-dev", - "libopenmpi-dev", - "libpnetcdf-dev", - "libptscotch-dev", - "libscalapack-openmpi-dev", - "libsuitesparse-dev", - "libsuperlu-dev", - "libsuperlu-dist-dev", - ], - extra_petsc_configure_options=[ - "--with-scalar-type=complex", - "--with-bison", - "--with-fftw", - "--with-hdf5", - "--with-hwloc", - "--with-metis", - "--with-mumps", - "--with-netcdf", - "--with-pnetcdf", - "--with-ptscotch", - "--with-scalapack-lib=-lscalapack-openmpi", - "--with-suitesparse", - "--with-superlu_dist", - "--with-zlib", - ], - cflags=["-O3", "-march=native", "-mtune=native"], - cxxflags=["-O3", "-march=native", "-mtune=native"], - fflags=["-O3", "-march=native", "-mtune=native"], - include_dirs=[ - "/usr/include/hdf5/openmpi", - "/usr/include/scotch", - "/usr/include/superlu", - "/usr/include/superlu-dist", - ], - library_dirs=[ - "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", - ], - ), - # Ubuntu 24.04 aarch64 (OS.UBUNTU_2404_AARCH64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( @@ -735,7 +613,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-suitesparse", "--with-superlu_dist", "--with-zlib", - "--download-hypre", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], @@ -799,14 +676,12 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-suitesparse", "--with-superlu_dist", "--with-zlib", - "--download-hypre", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ "/usr/include/hdf5/openmpi", - "/usr/include/hypre", "/usr/include/superlu", "/usr/include/superlu-dist", ], @@ -978,7 +853,134 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { # 'Best effort' configurations that are not tested in CI -COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = {} +COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { + + # Ubuntu 24.04 x86 + + (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): CommunityArch( + maintainer="Firedrake team", + last_modified="2026/05/07", + name="default", + system_packages=[ + "bison", + "build-essential", + "cmake", + "flex", + "gfortran", + "git", + "ninja-build", + "pkg-config", + "python3-dev", + "python3-pip", + + # PETSc external packages + "libfftw3-dev", + "libfftw3-mpi-dev", + "libhwloc-dev", + "libhdf5-mpi-dev", + "libmumps-ptscotch-dev", + "libmetis-dev", + "libnetcdf-dev", + "libopenblas-dev", + "libopenmpi-dev", + "libpnetcdf-dev", + "libptscotch-dev", + "libscalapack-openmpi-dev", + "libsuitesparse-dev", + "libsuperlu-dev", + "libsuperlu-dist-dev", + ], + extra_petsc_configure_options=[ + "--with-bison", + "--with-fftw", + "--with-hdf5", + "--with-hwloc", + "--with-metis", + "--with-mumps", + "--with-netcdf", + "--with-pnetcdf", + "--with-ptscotch", + "--with-scalapack-lib=-lscalapack-openmpi", + "--with-suitesparse", + "--with-superlu_dist", + "--with-zlib", + "--download-hypre", + ], + cflags=["-O3", "-march=native", "-mtune=native"], + cxxflags=["-O3", "-march=native", "-mtune=native"], + fflags=["-O3", "-march=native", "-mtune=native"], + include_dirs=[ + "/usr/include/hdf5/openmpi", + "/usr/include/scotch", + "/usr/include/superlu", + "/usr/include/superlu-dist", + ], + library_dirs=[ + "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", + ], + ), + + (OS.UBUNTU_2404_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( + name="complex", + system_packages=[ + "bison", + "build-essential", + "cmake", + "flex", + "gfortran", + "git", + "ninja-build", + "pkg-config", + "python3-dev", + "python3-pip", + + # PETSc external packages + "libfftw3-dev", + "libfftw3-mpi-dev", + "libhwloc-dev", + "libhdf5-mpi-dev", + "libmumps-ptscotch-dev", + "libmetis-dev", + "libnetcdf-dev", + "libopenblas-dev", + "libopenmpi-dev", + "libpnetcdf-dev", + "libptscotch-dev", + "libscalapack-openmpi-dev", + "libsuitesparse-dev", + "libsuperlu-dev", + "libsuperlu-dist-dev", + ], + extra_petsc_configure_options=[ + "--with-scalar-type=complex", + "--with-bison", + "--with-fftw", + "--with-hdf5", + "--with-hwloc", + "--with-metis", + "--with-mumps", + "--with-netcdf", + "--with-pnetcdf", + "--with-ptscotch", + "--with-scalapack-lib=-lscalapack-openmpi", + "--with-suitesparse", + "--with-superlu_dist", + "--with-zlib", + ], + cflags=["-O3", "-march=native", "-mtune=native"], + cxxflags=["-O3", "-march=native", "-mtune=native"], + fflags=["-O3", "-march=native", "-mtune=native"], + include_dirs=[ + "/usr/include/hdf5/openmpi", + "/usr/include/scotch", + "/usr/include/superlu", + "/usr/include/superlu-dist", + ], + library_dirs=[ + "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", + ], + ), +} if __name__ == "__main__": From bfc827723e8f332e7ec6cf7df39fd8b5168924ab Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 16:40:28 +0100 Subject: [PATCH 08/31] firedrake-configure ubuntu26.04 gpu config?? --- scripts/firedrake-configure | 195 +++++++++++++++++++++++++----------- 1 file changed, 139 insertions(+), 56 deletions(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 5142cefc06..407a1a8710 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -356,10 +356,10 @@ ArchKey = tuple[OS, ScalarType, GPUPlatform] # Configurations with official support that are tested in CI OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { - # Ubuntu 24.04 x86 + # Ubuntu 24.04 aarch64 - (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( - name="default-cuda", + (OS.UBUNTU_2404_AARCH64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( + name="default", system_packages=[ "bison", "build-essential", @@ -385,18 +385,9 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libpnetcdf-dev", "libptscotch-dev", "libscalapack-openmpi-dev", - - # CUDA packages - f"cuda-compat-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-nvtx-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-cudart-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-command-line-tools-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-minimal-build-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-libraries-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-nvml-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libnpp-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libcusparse-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libcublas-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + "libsuitesparse-dev", + "libsuperlu-dev", + "libsuperlu-dist-dev", ], extra_petsc_configure_options=[ "--with-bison", @@ -409,16 +400,10 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-pnetcdf", "--with-ptscotch", "--with-scalapack-lib=-lscalapack-openmpi", + "--with-suitesparse", + "--with-superlu_dist", "--with-zlib", "--download-hypre", - "--download-suitesparse", - "--download-superlu_dist", - - # CUDA options - "--with-cuda=1", - "--with-openmp=1", - "--with-cxx-dialect=c++17", - "--download-umpire", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], @@ -430,18 +415,12 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "/usr/include/superlu-dist", ], library_dirs=[ - "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", + "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", ], - extra_env_vars={ - "PATH": "/usr/local/cuda/bin:$PATH", - }, - extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb", ), - # Ubuntu 24.04 aarch64 - - (OS.UBUNTU_2404_AARCH64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( - name="default", + (OS.UBUNTU_2404_AARCH64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( + name="complex", system_packages=[ "bison", "build-essential", @@ -472,6 +451,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libsuperlu-dist-dev", ], extra_petsc_configure_options=[ + "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", @@ -485,7 +465,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-suitesparse", "--with-superlu_dist", "--with-zlib", - "--download-hypre", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], @@ -501,8 +480,10 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { ], ), - (OS.UBUNTU_2404_AARCH64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( - name="complex", + # Ubuntu 26.04 x86 + + (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( + name="default", system_packages=[ "bison", "build-essential", @@ -520,6 +501,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libfftw3-mpi-dev", "libhwloc-dev", "libhdf5-mpi-dev", + "libhypre-dev", "libmumps-ptscotch-dev", "libmetis-dev", "libnetcdf-dev", @@ -533,16 +515,18 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libsuperlu-dist-dev", ], extra_petsc_configure_options=[ - "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", "--with-hwloc", + "--with-hypre", "--with-metis", "--with-mumps", "--with-netcdf", "--with-pnetcdf", "--with-ptscotch", + "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", + "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", "--with-suitesparse", "--with-superlu_dist", @@ -553,19 +537,17 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ "/usr/include/hdf5/openmpi", - "/usr/include/scotch", + "/usr/include/hypre", "/usr/include/superlu", "/usr/include/superlu-dist", ], library_dirs=[ - "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", + "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], ), - # Ubuntu 26.04 x86 - - (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( - name="default", + (OS.UBUNTU_2604_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( + name="complex", system_packages=[ "bison", "build-essential", @@ -583,7 +565,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libfftw3-mpi-dev", "libhwloc-dev", "libhdf5-mpi-dev", - "libhypre-dev", "libmumps-ptscotch-dev", "libmetis-dev", "libnetcdf-dev", @@ -597,11 +578,11 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libsuperlu-dist-dev", ], extra_petsc_configure_options=[ + "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", "--with-hwloc", - "--with-hypre", "--with-metis", "--with-mumps", "--with-netcdf", @@ -619,7 +600,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ "/usr/include/hdf5/openmpi", - "/usr/include/hypre", "/usr/include/superlu", "/usr/include/superlu-dist", ], @@ -628,8 +608,8 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { ], ), - (OS.UBUNTU_2604_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( - name="complex", + (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( + name="default-cuda", system_packages=[ "bison", "build-essential", @@ -655,12 +635,20 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libpnetcdf-dev", "libptscotch-dev", "libscalapack-openmpi-dev", - "libsuitesparse-dev", - "libsuperlu-dev", - "libsuperlu-dist-dev", + + # CUDA packages + f"cuda-compat-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-nvtx-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-cudart-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-command-line-tools-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-minimal-build-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-libraries-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-nvml-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"libnpp-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"libcusparse-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"libcublas-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", ], extra_petsc_configure_options=[ - "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", @@ -673,9 +661,16 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", - "--with-suitesparse", - "--with-superlu_dist", "--with-zlib", + "--download-hypre", + "--download-suitesparse", + "--download-superlu_dist", + + # CUDA options + "--with-cuda=1", + "--with-openmp=1", + "--with-cxx-dialect=c++17", + "--download-umpire", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], @@ -688,6 +683,10 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { library_dirs=[ "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], + extra_env_vars={ + "PATH": "/usr/local/cuda/bin:$PATH", + }, + extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb", ), # macOS arm64 @@ -858,9 +857,9 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { # Ubuntu 24.04 x86 (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): CommunityArch( - maintainer="Firedrake team", - last_modified="2026/05/07", name="default", + maintainer="Firedrake team", + last_modified="2026-05-07", system_packages=[ "bison", "build-essential", @@ -920,8 +919,10 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { ], ), - (OS.UBUNTU_2404_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( + (OS.UBUNTU_2404_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): CommunityArch( name="complex", + maintainer="Firedrake team", + last_modified="2026-05-07", system_packages=[ "bison", "build-essential", @@ -980,6 +981,88 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], ), + + (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): CommunityArch( + name="default-cuda", + maintainer="Firedrake team", + last_modified="2026-05-07", + system_packages=[ + "bison", + "build-essential", + "cmake", + "flex", + "gfortran", + "git", + "ninja-build", + "pkg-config", + "python3-dev", + "python3-pip", + + # PETSc external packages + "libfftw3-dev", + "libfftw3-mpi-dev", + "libhwloc-dev", + "libhdf5-mpi-dev", + "libmumps-ptscotch-dev", + "libmetis-dev", + "libnetcdf-dev", + "libopenblas-dev", + "libopenmpi-dev", + "libpnetcdf-dev", + "libptscotch-dev", + "libscalapack-openmpi-dev", + + # CUDA packages + f"cuda-compat-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-nvtx-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-cudart-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-command-line-tools-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-minimal-build-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-libraries-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-nvml-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"libnpp-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"libcusparse-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"libcublas-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + ], + extra_petsc_configure_options=[ + "--with-bison", + "--with-fftw", + "--with-hdf5", + "--with-hwloc", + "--with-metis", + "--with-mumps", + "--with-netcdf", + "--with-pnetcdf", + "--with-ptscotch", + "--with-scalapack-lib=-lscalapack-openmpi", + "--with-zlib", + "--download-hypre", + "--download-suitesparse", + "--download-superlu_dist", + + # CUDA options + "--with-cuda=1", + "--with-openmp=1", + "--with-cxx-dialect=c++17", + "--download-umpire", + ], + cflags=["-O3", "-march=native", "-mtune=native"], + cxxflags=["-O3", "-march=native", "-mtune=native"], + fflags=["-O3", "-march=native", "-mtune=native"], + include_dirs=[ + "/usr/include/hdf5/openmpi", + "/usr/include/scotch", + "/usr/include/superlu", + "/usr/include/superlu-dist", + ], + library_dirs=[ + "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", + ], + extra_env_vars={ + "PATH": "/usr/local/cuda/bin:$PATH", + }, + extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb", + ), } From 90155e590feb0b537303fac67dc4eb1386ed4bd9 Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 16:40:48 +0100 Subject: [PATCH 09/31] messed up printing configure.log on build failure --- .github/workflows/core.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 982e4422df..245e1d1afb 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -171,8 +171,7 @@ jobs: cd petsc python3 ../firedrake-repo/scripts/firedrake-configure \ --arch ${{ matrix.arch }} --show-petsc-configure-options | \ - xargs -L1 ./configure --with-make-np=8 --download-slepc \ - || cat configure.log && exit + xargs -L1 ./configure --with-make-np=8 --download-slepc make PETSC_DIR=/__w/firedrake/firedrake/petsc PETSC_ARCH=arch-firedrake-${{ matrix.arch }} make check { From e1b4141ea63b858571b9d70317949301f9d130d6 Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 17:10:31 +0100 Subject: [PATCH 10/31] ubuntu:26.04 aarch configuration --- scripts/firedrake-configure | 243 ++++++++++++++++++++++++++++-------- 1 file changed, 189 insertions(+), 54 deletions(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 407a1a8710..d21bc01602 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -216,6 +216,8 @@ def detect_os() -> "OS": if os_info["VERSION_ID"] == "26.04": if platform.machine() == "x86_64": return OS.UBUNTU_2604_X86_64 + elif platform.machine() == "aarch64": + return OS.UBUNTU_2604_AARCH64 elif platform.system() == "Darwin": if platform.machine() == "arm64": @@ -231,6 +233,7 @@ class OS(enum.Enum): UBUNTU_2404_X86_64 = "ubuntu24.04-x86_64" UBUNTU_2404_AARCH64 = "ubuntu24.04-aarch64" UBUNTU_2604_X86_64 = "ubuntu26.04-x86_64" + UBUNTU_2604_AARCH64 = "ubuntu26.04-aarch64" MACOS_ARM64 = "macos-arm64" UNKNOWN = "unknown" @@ -356,9 +359,9 @@ ArchKey = tuple[OS, ScalarType, GPUPlatform] # Configurations with official support that are tested in CI OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { - # Ubuntu 24.04 aarch64 + # Ubuntu 26.04 x86 - (OS.UBUNTU_2404_AARCH64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( + (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( name="default", system_packages=[ "bison", @@ -377,6 +380,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libfftw3-mpi-dev", "libhwloc-dev", "libhdf5-mpi-dev", + "libhypre-dev", "libmumps-ptscotch-dev", "libmetis-dev", "libnetcdf-dev", @@ -394,33 +398,35 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-fftw", "--with-hdf5", "--with-hwloc", + "--with-hypre", "--with-metis", "--with-mumps", "--with-netcdf", "--with-pnetcdf", "--with-ptscotch", + "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", + "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", "--with-suitesparse", "--with-superlu_dist", "--with-zlib", - "--download-hypre", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ "/usr/include/hdf5/openmpi", - "/usr/include/scotch", + "/usr/include/hypre", "/usr/include/superlu", "/usr/include/superlu-dist", ], library_dirs=[ - "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", + "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], ), - (OS.UBUNTU_2404_AARCH64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( - name="complex", + (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( + name="default-cuda", system_packages=[ "bison", "build-essential", @@ -446,12 +452,20 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libpnetcdf-dev", "libptscotch-dev", "libscalapack-openmpi-dev", - "libsuitesparse-dev", - "libsuperlu-dev", - "libsuperlu-dist-dev", + + # CUDA packages + f"cuda-compat-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-nvtx-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-cudart-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-command-line-tools-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-minimal-build-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-libraries-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"cuda-nvml-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"libnpp-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"libcusparse-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + f"libcublas-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", ], extra_petsc_configure_options=[ - "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", @@ -461,29 +475,39 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-netcdf", "--with-pnetcdf", "--with-ptscotch", + "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", + "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", - "--with-suitesparse", - "--with-superlu_dist", "--with-zlib", + "--download-hypre", + "--download-suitesparse", + "--download-superlu_dist", + + # CUDA options + "--with-cuda=1", + "--with-openmp=1", + "--with-cxx-dialect=c++17", + "--download-umpire", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ "/usr/include/hdf5/openmpi", - "/usr/include/scotch", "/usr/include/superlu", "/usr/include/superlu-dist", ], library_dirs=[ - "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", + "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], + extra_env_vars={ + "PATH": "/usr/local/cuda/bin:$PATH", + }, + extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb", ), - # Ubuntu 26.04 x86 - - (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( - name="default", + (OS.UBUNTU_2604_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( + name="complex", system_packages=[ "bison", "build-essential", @@ -501,7 +525,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libfftw3-mpi-dev", "libhwloc-dev", "libhdf5-mpi-dev", - "libhypre-dev", "libmumps-ptscotch-dev", "libmetis-dev", "libnetcdf-dev", @@ -515,11 +538,11 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libsuperlu-dist-dev", ], extra_petsc_configure_options=[ + "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", "--with-hwloc", - "--with-hypre", "--with-metis", "--with-mumps", "--with-netcdf", @@ -537,7 +560,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ "/usr/include/hdf5/openmpi", - "/usr/include/hypre", "/usr/include/superlu", "/usr/include/superlu-dist", ], @@ -546,8 +568,10 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { ], ), - (OS.UBUNTU_2604_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( - name="complex", + # Ubuntu 26.04 aarch64 + + (OS.UBUNTU_2604_AARCH64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( + name="default", system_packages=[ "bison", "build-essential", @@ -565,6 +589,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libfftw3-mpi-dev", "libhwloc-dev", "libhdf5-mpi-dev", + "libhypre-dev", "libmumps-ptscotch-dev", "libmetis-dev", "libnetcdf-dev", @@ -578,7 +603,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libsuperlu-dist-dev", ], extra_petsc_configure_options=[ - "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", @@ -594,22 +618,24 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-suitesparse", "--with-superlu_dist", "--with-zlib", + "--download-hypre", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ "/usr/include/hdf5/openmpi", + "/usr/include/hypre", "/usr/include/superlu", "/usr/include/superlu-dist", ], library_dirs=[ - "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", + "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", ], ), - (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( - name="default-cuda", + (OS.UBUNTU_2604_AARCH64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( + name="complex", system_packages=[ "bison", "build-essential", @@ -635,20 +661,12 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libpnetcdf-dev", "libptscotch-dev", "libscalapack-openmpi-dev", - - # CUDA packages - f"cuda-compat-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-nvtx-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-cudart-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-command-line-tools-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-minimal-build-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-libraries-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-nvml-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libnpp-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libcusparse-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libcublas-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + "libsuitesparse-dev", + "libsuperlu-dev", + "libsuperlu-dist-dev", ], extra_petsc_configure_options=[ + "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", @@ -661,16 +679,9 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", + "--with-suitesparse", + "--with-superlu_dist", "--with-zlib", - "--download-hypre", - "--download-suitesparse", - "--download-superlu_dist", - - # CUDA options - "--with-cuda=1", - "--with-openmp=1", - "--with-cxx-dialect=c++17", - "--download-umpire", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], @@ -681,12 +692,8 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "/usr/include/superlu-dist", ], library_dirs=[ - "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", + "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", ], - extra_env_vars={ - "PATH": "/usr/local/cuda/bin:$PATH", - }, - extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb", ), # macOS arm64 @@ -1063,6 +1070,134 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { }, extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb", ), + + # Ubuntu 24.04 aarch64 + + (OS.UBUNTU_2404_AARCH64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): CommunityArch( + name="default", + maintainer="Firedrake team", + last_modified="2026-05-07", + system_packages=[ + "bison", + "build-essential", + "cmake", + "flex", + "gfortran", + "git", + "ninja-build", + "pkg-config", + "python3-dev", + "python3-pip", + + # PETSc external packages + "libfftw3-dev", + "libfftw3-mpi-dev", + "libhwloc-dev", + "libhdf5-mpi-dev", + "libmumps-ptscotch-dev", + "libmetis-dev", + "libnetcdf-dev", + "libopenblas-dev", + "libopenmpi-dev", + "libpnetcdf-dev", + "libptscotch-dev", + "libscalapack-openmpi-dev", + "libsuitesparse-dev", + "libsuperlu-dev", + "libsuperlu-dist-dev", + ], + extra_petsc_configure_options=[ + "--with-bison", + "--with-fftw", + "--with-hdf5", + "--with-hwloc", + "--with-metis", + "--with-mumps", + "--with-netcdf", + "--with-pnetcdf", + "--with-ptscotch", + "--with-scalapack-lib=-lscalapack-openmpi", + "--with-suitesparse", + "--with-superlu_dist", + "--with-zlib", + "--download-hypre", + ], + cflags=["-O3", "-march=native", "-mtune=native"], + cxxflags=["-O3", "-march=native", "-mtune=native"], + fflags=["-O3", "-march=native", "-mtune=native"], + include_dirs=[ + "/usr/include/hdf5/openmpi", + "/usr/include/scotch", + "/usr/include/superlu", + "/usr/include/superlu-dist", + ], + library_dirs=[ + "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", + ], + ), + + (OS.UBUNTU_2404_AARCH64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): CommunityArch( + name="complex", + maintainer="Firedrake team", + last_modified="2026-05-07", + system_packages=[ + "bison", + "build-essential", + "cmake", + "flex", + "gfortran", + "git", + "ninja-build", + "pkg-config", + "python3-dev", + "python3-pip", + + # PETSc external packages + "libfftw3-dev", + "libfftw3-mpi-dev", + "libhwloc-dev", + "libhdf5-mpi-dev", + "libmumps-ptscotch-dev", + "libmetis-dev", + "libnetcdf-dev", + "libopenblas-dev", + "libopenmpi-dev", + "libpnetcdf-dev", + "libptscotch-dev", + "libscalapack-openmpi-dev", + "libsuitesparse-dev", + "libsuperlu-dev", + "libsuperlu-dist-dev", + ], + extra_petsc_configure_options=[ + "--with-scalar-type=complex", + "--with-bison", + "--with-fftw", + "--with-hdf5", + "--with-hwloc", + "--with-metis", + "--with-mumps", + "--with-netcdf", + "--with-pnetcdf", + "--with-ptscotch", + "--with-scalapack-lib=-lscalapack-openmpi", + "--with-suitesparse", + "--with-superlu_dist", + "--with-zlib", + ], + cflags=["-O3", "-march=native", "-mtune=native"], + cxxflags=["-O3", "-march=native", "-mtune=native"], + fflags=["-O3", "-march=native", "-mtune=native"], + include_dirs=[ + "/usr/include/hdf5/openmpi", + "/usr/include/scotch", + "/usr/include/superlu", + "/usr/include/superlu-dist", + ], + library_dirs=[ + "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", + ], + ), } From 566b8024a59fd264dd0e92ea0241308f7beecfaf Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 17:13:49 +0100 Subject: [PATCH 11/31] ubuntu26.04 configuration: ignore incompatible pointer types for pygraphviz build --- scripts/firedrake-configure | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index d21bc01602..ff2d25a105 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -423,6 +423,9 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { library_dirs=[ "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], + extra_env_vars={ + "CFLAGS": "-Wnoincompatible-pointer-types", + }, ), (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( @@ -501,6 +504,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], extra_env_vars={ + "CFLAGS": "-Wnoincompatible-pointer-types", "PATH": "/usr/local/cuda/bin:$PATH", }, extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb", @@ -566,6 +570,9 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { library_dirs=[ "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], + extra_env_vars={ + "CFLAGS": "-Wnoincompatible-pointer-types", + }, ), # Ubuntu 26.04 aarch64 From 9c9c74f52fb3a23ee44807297c3c2c9bcedfb29f Mon Sep 17 00:00:00 2001 From: Josh Hope-Collins Date: Thu, 7 May 2026 17:17:23 +0100 Subject: [PATCH 12/31] typo and comment explaining CFLAGS in ubuntu26.04 configuration --- scripts/firedrake-configure | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index ff2d25a105..630e684141 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -424,7 +424,8 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], extra_env_vars={ - "CFLAGS": "-Wnoincompatible-pointer-types", + # Ignore mismatch in apt graphviz and pypi pygraphviz signatures + "CFLAGS": "-Wno-incompatible-pointer-types", }, ), @@ -504,8 +505,9 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], extra_env_vars={ - "CFLAGS": "-Wnoincompatible-pointer-types", "PATH": "/usr/local/cuda/bin:$PATH", + # Ignore mismatch in apt graphviz and pypi pygraphviz signatures + "CFLAGS": "-Wno-incompatible-pointer-types", }, extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb", ), @@ -571,7 +573,8 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], extra_env_vars={ - "CFLAGS": "-Wnoincompatible-pointer-types", + # Ignore mismatch in apt graphviz and pypi pygraphviz signatures + "CFLAGS": "-Wno-incompatible-pointer-types", }, ), From f2e8ed71bd16a9b251a4d6180433a44219402acd Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Mon, 11 May 2026 10:55:57 +0100 Subject: [PATCH 13/31] Just avoid pygraphviz in tests to avoid passing dodgy CFLAG --- docs/notebooks/11-extract-adjoint-solutions.ipynb | 1 + pyproject.toml | 4 ++-- scripts/firedrake-configure | 10 ---------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/docs/notebooks/11-extract-adjoint-solutions.ipynb b/docs/notebooks/11-extract-adjoint-solutions.ipynb index b0b34a64f7..ab487b4506 100644 --- a/docs/notebooks/11-extract-adjoint-solutions.ipynb +++ b/docs/notebooks/11-extract-adjoint-solutions.ipynb @@ -54826,6 +54826,7 @@ "metadata": {}, "outputs": [], "source": [ + "# NBVAL_SKIP\n", "tape.visualise(\"tape.pdf\")" ] }, diff --git a/pyproject.toml b/pyproject.toml index c153ecfb06..1fd677efc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -109,7 +109,7 @@ ci = [ "networkx", "ngsPETSc>=0.2.0", "pdf2image", - "pygraphviz", + # "pygraphviz", "pylit", "pytest", "pytest-order", @@ -127,7 +127,7 @@ docker = [ # Used in firedrake-vanilla container "nbval", "networkx", "pdf2image", - "pygraphviz", + # "pygraphviz", "pylit", "pytest", "pytest-order", diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 630e684141..d21bc01602 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -423,10 +423,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { library_dirs=[ "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], - extra_env_vars={ - # Ignore mismatch in apt graphviz and pypi pygraphviz signatures - "CFLAGS": "-Wno-incompatible-pointer-types", - }, ), (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( @@ -506,8 +502,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { ], extra_env_vars={ "PATH": "/usr/local/cuda/bin:$PATH", - # Ignore mismatch in apt graphviz and pypi pygraphviz signatures - "CFLAGS": "-Wno-incompatible-pointer-types", }, extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb", ), @@ -572,10 +566,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { library_dirs=[ "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], - extra_env_vars={ - # Ignore mismatch in apt graphviz and pypi pygraphviz signatures - "CFLAGS": "-Wno-incompatible-pointer-types", - }, ), # Ubuntu 26.04 aarch64 From 268da63a7ce792b479c66dc8022aad1633329a04 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Mon, 11 May 2026 14:39:18 +0100 Subject: [PATCH 14/31] Try downloading hdf5 --- docs/notebooks/11-extract-adjoint-solutions.ipynb | 1 + firedrake/checkpointing.py | 2 +- scripts/firedrake-configure | 8 ++------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/notebooks/11-extract-adjoint-solutions.ipynb b/docs/notebooks/11-extract-adjoint-solutions.ipynb index ab487b4506..a463923a00 100644 --- a/docs/notebooks/11-extract-adjoint-solutions.ipynb +++ b/docs/notebooks/11-extract-adjoint-solutions.ipynb @@ -54850,6 +54850,7 @@ } ], "source": [ + "# NBVAL_SKIP\n", "from pdf2image import convert_from_path\n", "\n", "images = convert_from_path(\"tape.pdf\")\n", diff --git a/firedrake/checkpointing.py b/firedrake/checkpointing.py index d09538bb00..5e6b5c497e 100644 --- a/firedrake/checkpointing.py +++ b/firedrake/checkpointing.py @@ -1547,7 +1547,7 @@ def _load_function_topology(self, tmesh, element, tf_name, idx=None): if timestepping: assert idx is not None, "In timestepping mode: idx parameter must be set" else: - assert idx is None, "In non-timestepping mode: idx parameter msut not be set" + assert idx is None, "In non-timestepping mode: idx parameter must not be set" else: raise RuntimeError(f"Function {path} not found in {self.filename}") with tf.dat.vec_wo as vec: diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index d21bc01602..c7db62b880 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -379,7 +379,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libfftw3-dev", "libfftw3-mpi-dev", "libhwloc-dev", - "libhdf5-mpi-dev", "libhypre-dev", "libmumps-ptscotch-dev", "libmetis-dev", @@ -396,7 +395,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { extra_petsc_configure_options=[ "--with-bison", "--with-fftw", - "--with-hdf5", + "--download-hdf5", "--with-hwloc", "--with-hypre", "--with-metis", @@ -415,14 +414,11 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { cxxflags=["-O3", "-march=native", "-mtune=native"], fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ - "/usr/include/hdf5/openmpi", "/usr/include/hypre", "/usr/include/superlu", "/usr/include/superlu-dist", ], - library_dirs=[ - "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", - ], + extra_env_vars={"HDF5_DIR": "$PETSC_DIR/$PETSC_ARCH"}, ), (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( From e59a58cbb2875d31b4c99da56d70fbb68ec91c16 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Mon, 11 May 2026 15:08:06 +0100 Subject: [PATCH 15/31] Also set CC --- scripts/firedrake-configure | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index c7db62b880..4e7676fabb 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -418,7 +418,10 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "/usr/include/superlu", "/usr/include/superlu-dist", ], - extra_env_vars={"HDF5_DIR": "$PETSC_DIR/$PETSC_ARCH"}, + extra_env_vars={ + "CC": "mpicc", + "HDF5_DIR": "$PETSC_DIR/$PETSC_ARCH", + }, ), (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( From a5bdd6e2f165020b3ea0f100572aee3a3131adfb Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Mon, 11 May 2026 15:18:00 +0100 Subject: [PATCH 16/31] try another thing --- scripts/firedrake-configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 4e7676fabb..db60d63d92 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -419,8 +419,8 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "/usr/include/superlu-dist", ], extra_env_vars={ - "CC": "mpicc", "HDF5_DIR": "$PETSC_DIR/$PETSC_ARCH", + "C_INCLUDE_PATH": "/usr/lib/x86_64-linux-gnu/openmpi/include", }, ), From fff9f3726f99b6867919c94f3add83c1fe657bc3 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Mon, 11 May 2026 15:22:30 +0100 Subject: [PATCH 17/31] fixup --- .github/workflows/core.yml | 4 ++++ scripts/firedrake-configure | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 245e1d1afb..2660001eaa 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -438,6 +438,8 @@ jobs: id: install run: | export $(python3 ./firedrake-repo/scripts/firedrake-configure --arch default --show-env) + env + python3 -m venv venv . venv/bin/activate @@ -569,6 +571,8 @@ jobs: id: install run: | export $(python3 ./firedrake-repo/scripts/firedrake-configure --arch default --gpu-arch cuda --show-env) + env + python3 -m venv venv . venv/bin/activate diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index db60d63d92..c84798d67e 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -420,7 +420,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { ], extra_env_vars={ "HDF5_DIR": "$PETSC_DIR/$PETSC_ARCH", - "C_INCLUDE_PATH": "/usr/lib/x86_64-linux-gnu/openmpi/include", + "CC": "mpicc", }, ), From 2e9b21012ed98a655f210f7c778a0193e173fc28 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Mon, 11 May 2026 15:31:08 +0100 Subject: [PATCH 18/31] improve messaging --- scripts/firedrake-configure | 45 ++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index c84798d67e..061e98917e 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -82,9 +82,10 @@ def main(): arch = OFFICIAL_ARCHS[arch_key] elif arch_key in COMMUNITY_ARCHS: arch = COMMUNITY_ARCHS[arch_key] - warn( - "You have selected a community-maintained Firedrake configuration, " - f"if you encounter issues please contact {arch.maintainer}" + warn(f"""\ +You have selected an untested, community-maintained Firedrake configuration +(last modified {arch.last_modified}), if you encounter issues please +contact {arch.maintainer} {arch.contact}""" ) else: error( @@ -351,7 +352,30 @@ class Arch: class CommunityArch(Arch): maintainer: str """Name of the person or team maintaining a particular arch.""" + contact: str + """Contact details for the maintainer. + + The 'maintainer' and 'contact' fields are concatenated together into the + message: + + "...if you encounter issues please contact {maintainer} {contact}" + + so make sure the grammar is right! For example: + + "...if you encounter issues please contact the Firedrake team on Slack" + + or: + + "...if you encounter issues please contact My Name at email@email.com" + + """ last_modified: str + """Date the configuration was last modified (YYYY-MM-DD). + + This is useful for judging the age, and hence likelihood to work, of + submitted configurations. + + """ ArchKey = tuple[OS, ScalarType, GPUPlatform] @@ -864,7 +888,8 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): CommunityArch( name="default", - maintainer="Firedrake team", + maintainer="the Firedrake team", + contact="on Slack", last_modified="2026-05-07", system_packages=[ "bison", @@ -927,7 +952,8 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { (OS.UBUNTU_2404_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): CommunityArch( name="complex", - maintainer="Firedrake team", + maintainer="the Firedrake team", + contact="on Slack", last_modified="2026-05-07", system_packages=[ "bison", @@ -990,7 +1016,8 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): CommunityArch( name="default-cuda", - maintainer="Firedrake team", + maintainer="the Firedrake team", + contact="on Slack", last_modified="2026-05-07", system_packages=[ "bison", @@ -1074,7 +1101,8 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { (OS.UBUNTU_2404_AARCH64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): CommunityArch( name="default", - maintainer="Firedrake team", + maintainer="the Firedrake team", + contact="on Slack", last_modified="2026-05-07", system_packages=[ "bison", @@ -1137,7 +1165,8 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { (OS.UBUNTU_2404_AARCH64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): CommunityArch( name="complex", - maintainer="Firedrake team", + maintainer="the Firedrake team", + contact="on Slack", last_modified="2026-05-07", system_packages=[ "bison", From 7c0e758572c735180d0ddcf56e53aaa0b8470894 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 10:47:05 +0100 Subject: [PATCH 19/31] Disable -O3 for GCC 15 We found out that -O3 was leading to garbage values in tricky interpolation kernels with GCC 15 on both Ubuntu 26.04 and Arch. This will allow us to support Ubuntu 26.04. --- pyop2/compilation.py | 75 ++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 44 deletions(-) diff --git a/pyop2/compilation.py b/pyop2/compilation.py index f37599382b..947820fa44 100644 --- a/pyop2/compilation.py +++ b/pyop2/compilation.py @@ -278,33 +278,35 @@ def ld(self): return self._ld @property - def cflags(self): - cflags = self._cflags + self._extra_compiler_flags + self.bugfix_cflags - if self._debug: - cflags += self._debugflags - else: - cflags += self._optflags - cflags += tuple(shlex.split(configuration["cflags"])) - return cflags + def cflags(self) -> tuple[str, ...]: + return ( + *self._cflags, + *(self._debugflags if self._debug else self._optflags), + *self.bugfix_cflags, + *self._extra_compiler_flags, + *shlex.split(configuration["cflags"]), + ) @property - def cxxflags(self): - cxxflags = self._cxxflags + self._extra_compiler_flags + self.bugfix_cflags - if self._debug: - cxxflags += self._debugflags - else: - cxxflags += self._optflags - cxxflags += tuple(shlex.split(configuration["cxxflags"])) - return cxxflags + def cxxflags(self) -> tuple[str, ...]: + return ( + *self._cxxflags, + *(self._debugflags if self._debug else self._optflags), + *self.bugfix_cflags, + *self._extra_compiler_flags, + *shlex.split(configuration["cxxflags"]), + ) @property - def ldflags(self): - ldflags = self._ldflags + self._extra_linker_flags - ldflags += tuple(shlex.split(configuration["ldflags"])) - return ldflags + def ldflags(self) -> tuple[str, ...]: + return ( + *self._ldflags, + *self._extra_linker_flags, + *shlex.split(configuration["ldflags"]), + ) @property - def bugfix_cflags(self): + def bugfix_cflags(self) -> tuple[str, ...]: return () @@ -348,30 +350,15 @@ class LinuxGnuCompiler(Compiler): _debugflags = ("-O0", "-g") @property - def bugfix_cflags(self): + def bugfix_cflags(self) -> tuple[str, ...]: """Flags to work around bugs in compilers.""" - ver = self._version - cflags = () - if Version("4.8.0") <= ver < Version("4.9.0"): - # GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61068 - cflags = ("-fno-ivopts",) - if Version("5.0") <= ver <= Version("5.4.0"): - cflags = ("-fno-tree-loop-vectorize",) - if Version("6.0.0") <= ver < Version("6.5.0"): - # GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79920 - cflags = ("-fno-tree-loop-vectorize",) - if Version("7.1.0") <= ver < Version("7.1.2"): - # GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81633 - cflags = ("-fno-tree-loop-vectorize",) - if Version("7.3") <= ver <= Version("7.5"): - # GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90055 - # See also https://github.com/firedrakeproject/firedrake/issues/1442 - # And https://github.com/firedrakeproject/firedrake/issues/1717 - # Bug also on skylake with the vectoriser in this - # combination (disappears without - # -fno-tree-loop-vectorize!) - cflags = ("-fno-tree-loop-vectorize", "-mno-avx512f") - return cflags + cflags = [] + if not self._debug and self._version >= Version("15"): + # Disable '-O3' for GCC versions >=15 because it causes issues with + # complex interpolation kernels + # TODO: revisit this in later GCC releases to see if the issue is fixed + cflags.append("-O2") + return tuple(cflags) class LinuxClangCompiler(Compiler): From 456a49f28f8583fbb5dca506700448b6395dea2b Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 11:23:03 +0100 Subject: [PATCH 20/31] fixup --- pyproject.toml | 2 ++ scripts/firedrake-configure | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 40979b6656..5333954875 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,6 +111,7 @@ ci = [ "networkx", "ngsPETSc>=0.2.0", "pdf2image", + # TODO: restore this (see https://github.com/firedrakeproject/firedrake/issues/5106) # "pygraphviz", "pylit", "pytest", @@ -129,6 +130,7 @@ docker = [ # Used in firedrake-vanilla container "nbval", "networkx", "pdf2image", + # TODO: restore this (see https://github.com/firedrakeproject/firedrake/issues/5106) # "pygraphviz", "pylit", "pytest", diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 758ed866ae..9220a6406d 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -365,7 +365,7 @@ class CommunityArch(Arch): or: - "...if you encounter issues please contact My Name at email@email.com" + "...if you encounter issues please contact Your Name at email@address.com" """ last_modified: str From a1b428758c5f7dc5ffa2d6a32b69356be04dabf4 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 10:47:05 +0100 Subject: [PATCH 21/31] Disable -O3 for GCC 15 We found out that -O3 was leading to garbage values in tricky interpolation kernels with GCC 15 on both Ubuntu 26.04 and Arch. This will allow us to support Ubuntu 26.04. --- pyop2/compilation.py | 75 ++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 44 deletions(-) diff --git a/pyop2/compilation.py b/pyop2/compilation.py index f37599382b..947820fa44 100644 --- a/pyop2/compilation.py +++ b/pyop2/compilation.py @@ -278,33 +278,35 @@ def ld(self): return self._ld @property - def cflags(self): - cflags = self._cflags + self._extra_compiler_flags + self.bugfix_cflags - if self._debug: - cflags += self._debugflags - else: - cflags += self._optflags - cflags += tuple(shlex.split(configuration["cflags"])) - return cflags + def cflags(self) -> tuple[str, ...]: + return ( + *self._cflags, + *(self._debugflags if self._debug else self._optflags), + *self.bugfix_cflags, + *self._extra_compiler_flags, + *shlex.split(configuration["cflags"]), + ) @property - def cxxflags(self): - cxxflags = self._cxxflags + self._extra_compiler_flags + self.bugfix_cflags - if self._debug: - cxxflags += self._debugflags - else: - cxxflags += self._optflags - cxxflags += tuple(shlex.split(configuration["cxxflags"])) - return cxxflags + def cxxflags(self) -> tuple[str, ...]: + return ( + *self._cxxflags, + *(self._debugflags if self._debug else self._optflags), + *self.bugfix_cflags, + *self._extra_compiler_flags, + *shlex.split(configuration["cxxflags"]), + ) @property - def ldflags(self): - ldflags = self._ldflags + self._extra_linker_flags - ldflags += tuple(shlex.split(configuration["ldflags"])) - return ldflags + def ldflags(self) -> tuple[str, ...]: + return ( + *self._ldflags, + *self._extra_linker_flags, + *shlex.split(configuration["ldflags"]), + ) @property - def bugfix_cflags(self): + def bugfix_cflags(self) -> tuple[str, ...]: return () @@ -348,30 +350,15 @@ class LinuxGnuCompiler(Compiler): _debugflags = ("-O0", "-g") @property - def bugfix_cflags(self): + def bugfix_cflags(self) -> tuple[str, ...]: """Flags to work around bugs in compilers.""" - ver = self._version - cflags = () - if Version("4.8.0") <= ver < Version("4.9.0"): - # GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61068 - cflags = ("-fno-ivopts",) - if Version("5.0") <= ver <= Version("5.4.0"): - cflags = ("-fno-tree-loop-vectorize",) - if Version("6.0.0") <= ver < Version("6.5.0"): - # GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79920 - cflags = ("-fno-tree-loop-vectorize",) - if Version("7.1.0") <= ver < Version("7.1.2"): - # GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81633 - cflags = ("-fno-tree-loop-vectorize",) - if Version("7.3") <= ver <= Version("7.5"): - # GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90055 - # See also https://github.com/firedrakeproject/firedrake/issues/1442 - # And https://github.com/firedrakeproject/firedrake/issues/1717 - # Bug also on skylake with the vectoriser in this - # combination (disappears without - # -fno-tree-loop-vectorize!) - cflags = ("-fno-tree-loop-vectorize", "-mno-avx512f") - return cflags + cflags = [] + if not self._debug and self._version >= Version("15"): + # Disable '-O3' for GCC versions >=15 because it causes issues with + # complex interpolation kernels + # TODO: revisit this in later GCC releases to see if the issue is fixed + cflags.append("-O2") + return tuple(cflags) class LinuxClangCompiler(Compiler): From 0cf0ed202c0afb94d9edd8d94075f73842abcdf7 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 11:29:13 +0100 Subject: [PATCH 22/31] Add ref to issue about max version --- pyop2/compilation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyop2/compilation.py b/pyop2/compilation.py index 947820fa44..4b0aa5f6cc 100644 --- a/pyop2/compilation.py +++ b/pyop2/compilation.py @@ -356,7 +356,9 @@ def bugfix_cflags(self) -> tuple[str, ...]: if not self._debug and self._version >= Version("15"): # Disable '-O3' for GCC versions >=15 because it causes issues with # complex interpolation kernels - # TODO: revisit this in later GCC releases to see if the issue is fixed + # TODO: revisit this in later GCC releases to see if we can set a + # maximum version constraint + # (see https://github.com/firedrakeproject/firedrake/issues/5107) cflags.append("-O2") return tuple(cflags) From 7fa73a7b51f9f42293c2068f0dd5dc95620c0aa2 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 11:34:35 +0100 Subject: [PATCH 23/31] fixup --- scripts/firedrake-configure | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 9220a6406d..81bd61a38c 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -88,8 +88,7 @@ def main(): warn(f"""\ You have selected an untested, community-maintained Firedrake configuration (last modified {arch.last_modified}), if you encounter issues please -contact {arch.maintainer} {arch.contact}""" - ) +contact {arch.maintainer} {arch.contact}""") else: error(f"""\ Firedrake configuration not found for option set '{arch_key_str}', @@ -401,6 +400,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { # PETSc external packages "libfftw3-dev", "libfftw3-mpi-dev", + "libhdf5-mpi-dev", "libhwloc-dev", "libhypre-dev", "libmumps-ptscotch-dev", @@ -418,7 +418,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { extra_petsc_configure_options=[ "--with-bison", "--with-fftw", - "--download-hdf5", + "--with-hdf5", "--with-hwloc", "--with-hypre", "--with-metis", @@ -437,14 +437,14 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { cxxflags=["-O3", "-march=native", "-mtune=native"], fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ + "/usr/include/hdf5/openmpi", "/usr/include/hypre", "/usr/include/superlu", "/usr/include/superlu-dist", ], - extra_env_vars={ - "HDF5_DIR": "$PETSC_DIR/$PETSC_ARCH", - "CC": "mpicc", - }, + library_dirs=[ + "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", + ], ), (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( @@ -889,7 +889,7 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { name="default", maintainer="the Firedrake team", contact="on Slack", - last_modified="2026-05-07", + last_modified="2026-05-13", system_packages=[ "bison", "build-essential", @@ -953,7 +953,7 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { name="complex", maintainer="the Firedrake team", contact="on Slack", - last_modified="2026-05-07", + last_modified="2026-05-13", system_packages=[ "bison", "build-essential", @@ -1017,7 +1017,7 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { name="default-cuda", maintainer="the Firedrake team", contact="on Slack", - last_modified="2026-05-07", + last_modified="2026-05-13", system_packages=[ "bison", "build-essential", @@ -1102,7 +1102,7 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { name="default", maintainer="the Firedrake team", contact="on Slack", - last_modified="2026-05-07", + last_modified="2026-05-13", system_packages=[ "bison", "build-essential", @@ -1166,7 +1166,7 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { name="complex", maintainer="the Firedrake team", contact="on Slack", - last_modified="2026-05-07", + last_modified="2026-05-13", system_packages=[ "bison", "build-essential", From 9d50d414fe352efac6394cb3b882bd76dd3b1db0 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 11:45:14 +0100 Subject: [PATCH 24/31] Try CUDA 13.2 --- scripts/firedrake-configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 81bd61a38c..27e068dec6 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -61,8 +61,7 @@ from collections.abc import Mapping, Sequence # Attributes that we expect to change occasionally SUPPORTED_PETSC_VERSION = "v3.25.0" -# CUDA 13.1 is currently not supported by GPU drivers on Firedrake CI systems. -SUPPORTED_CUDA_VERSION = "13.0" +SUPPORTED_CUDA_VERSION = "13.2" def main(): From 6d424ffef16571f5e895366252541f24b678f6e9 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 12:43:37 +0100 Subject: [PATCH 25/31] Redo GPU CI --- scripts/firedrake-configure | 45 +++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 27e068dec6..9fbcbda03c 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -61,7 +61,6 @@ from collections.abc import Mapping, Sequence # Attributes that we expect to change occasionally SUPPORTED_PETSC_VERSION = "v3.25.0" -SUPPORTED_CUDA_VERSION = "13.2" def main(): @@ -474,17 +473,19 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libptscotch-dev", "libscalapack-openmpi-dev", - # CUDA packages - f"cuda-compat-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-nvtx-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-cudart-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-command-line-tools-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-minimal-build-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-libraries-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-nvml-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libnpp-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libcusparse-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libcublas-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + # CUDA packages on apt + "cuda-command-line-tools-13-1", + "cuda-cudart-dev-13-1", + "cuda-libraries-dev-13-1", + "cuda-minimal-build-13-1", + "cuda-nvml-dev-13-1", + "cuda-nvtx-13-1", + "libcublas-dev-13-1", + "libcusparse-dev-13-1", + "libnpp-dev-13-1", + + # CUDA packages from extra repo + # "cuda-compat-13-2", needed? ], extra_petsc_configure_options=[ "--with-bison", @@ -1044,16 +1045,16 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { "libscalapack-openmpi-dev", # CUDA packages - f"cuda-compat-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-nvtx-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-cudart-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-command-line-tools-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-minimal-build-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-libraries-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"cuda-nvml-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libnpp-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libcusparse-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", - f"libcublas-dev-{SUPPORTED_CUDA_VERSION.replace('.', '-')}", + "cuda-compat-13-0", + "cuda-nvtx-13-0", + "cuda-cudart-dev-13-0", + "cuda-command-line-tools-13-0", + "cuda-minimal-build-13-0", + "cuda-libraries-dev-13-0", + "cuda-nvml-dev-13-0", + "libnpp-dev-13-0", + "libcusparse-dev-13-0", + "libcublas-dev-13-0", ], extra_petsc_configure_options=[ "--with-bison", From 88673694cb039af4bc590c83d9962b8af2f951fd Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 14:26:57 +0100 Subject: [PATCH 26/31] fixup --- scripts/firedrake-configure | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 9fbcbda03c..45a123e1d0 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -523,6 +523,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], extra_env_vars={ + # Needed? "PATH": "/usr/local/cuda/bin:$PATH", }, extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb", From bd940e6db275236d7c0acab290b84f9f67f62537 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 14:43:30 +0100 Subject: [PATCH 27/31] fixup --- scripts/firedrake-configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 45a123e1d0..a129a3e9cf 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -485,7 +485,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libnpp-dev-13-1", # CUDA packages from extra repo - # "cuda-compat-13-2", needed? + "cuda-compat-13-2", ], extra_petsc_configure_options=[ "--with-bison", From 075a6de0c618600b2f2f05973d8fbb967c7ac48f Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 15:04:14 +0100 Subject: [PATCH 28/31] Add extra cuda package --- scripts/firedrake-configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index a129a3e9cf..f4a4621844 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -475,6 +475,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { # CUDA packages on apt "cuda-command-line-tools-13-1", + "cuda-compiler-13-1", "cuda-cudart-dev-13-1", "cuda-libraries-dev-13-1", "cuda-minimal-build-13-1", @@ -485,7 +486,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libnpp-dev-13-1", # CUDA packages from extra repo - "cuda-compat-13-2", + # "cuda-compat-13-2", # needed? ], extra_petsc_configure_options=[ "--with-bison", From 69faa5f03f33d8b22870c80001166a14710ff012 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Wed, 13 May 2026 15:24:37 +0100 Subject: [PATCH 29/31] Set env in PETSc step too --- .github/actions/install/action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml index 0d17a0e017..dea61a963a 100644 --- a/.github/actions/install/action.yml +++ b/.github/actions/install/action.yml @@ -77,6 +77,13 @@ runs: env: EXTRA_OPTIONS: -use_gpu_aware_mpi 0 run: | + export $(python3 ./firedrake-repo/scripts/firedrake-configure \ + --scalar-type ${{ inputs.scalar_type }} \ + --gpu-arch ${{ inputs.gpu }} \ + --show-env) + export SLEPC_DIR=$PETSC_DIR/$PETSC_ARCH + env + : # Clone PETSc if [ ${{ inputs.base_ref }} = 'main' ]; then git clone --depth 1 https://gitlab.com/petsc/petsc.git From 8b62735546c7f37ff46bfe4ec3d9d389a7c38f17 Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Thu, 14 May 2026 10:11:08 +0100 Subject: [PATCH 30/31] Set O1 on Linux runners because O2 causes failures in complex mode --- .github/actions/install/action.yml | 7 -- .github/workflows/core.yml | 7 +- scripts/firedrake-configure | 186 ++++++++--------------------- 3 files changed, 54 insertions(+), 146 deletions(-) diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml index dea61a963a..0d17a0e017 100644 --- a/.github/actions/install/action.yml +++ b/.github/actions/install/action.yml @@ -77,13 +77,6 @@ runs: env: EXTRA_OPTIONS: -use_gpu_aware_mpi 0 run: | - export $(python3 ./firedrake-repo/scripts/firedrake-configure \ - --scalar-type ${{ inputs.scalar_type }} \ - --gpu-arch ${{ inputs.gpu }} \ - --show-env) - export SLEPC_DIR=$PETSC_DIR/$PETSC_ARCH - env - : # Clone PETSc if [ ${{ inputs.base_ref }} = 'main' ]; then git clone --depth 1 https://gitlab.com/petsc/petsc.git diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index b5f2a646d3..a86b8e0741 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -99,8 +99,8 @@ jobs: OPENBLAS_NUM_THREADS: 1 FIREDRAKE_CI: 1 PYOP2_SPMD_STRICT: 1 - # Disable fast math as it exposes compiler bugs - PYOP2_CFLAGS: -fno-fast-math + # Disable some compiler optimisations as they cause runner-specific bugs + PYOP2_CFLAGS: -O1 -fno-fast-math # NOTE: One should occasionally update test_durations.json by running # 'make test_durations' inside a 'firedrake:latest' Docker image. EXTRA_PYTEST_ARGS: --splitting-algorithm least_duration --timeout=600 --timeout-method=thread -o faulthandler_timeout=660 --durations-path=./firedrake-repo/tests/test_durations.json --durations=50 @@ -332,7 +332,8 @@ jobs: name: Build and test Firedrake (Linux CUDA) runs-on: [self-hosted, Linux, gpu] container: - image: ubuntu:latest + # TODO: set to 'ubuntu:latest' + image: ubuntu:noble options: --gpus all if: inputs.test_gpu env: diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index f4a4621844..cac8f723a7 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -445,8 +445,8 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { ], ), - (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( - name="default-cuda", + (OS.UBUNTU_2604_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( + name="complex", system_packages=[ "bison", "build-essential", @@ -472,23 +472,12 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libpnetcdf-dev", "libptscotch-dev", "libscalapack-openmpi-dev", - - # CUDA packages on apt - "cuda-command-line-tools-13-1", - "cuda-compiler-13-1", - "cuda-cudart-dev-13-1", - "cuda-libraries-dev-13-1", - "cuda-minimal-build-13-1", - "cuda-nvml-dev-13-1", - "cuda-nvtx-13-1", - "libcublas-dev-13-1", - "libcusparse-dev-13-1", - "libnpp-dev-13-1", - - # CUDA packages from extra repo - # "cuda-compat-13-2", # needed? + "libsuitesparse-dev", + "libsuperlu-dev", + "libsuperlu-dist-dev", ], extra_petsc_configure_options=[ + "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", @@ -501,16 +490,9 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", + "--with-suitesparse", + "--with-superlu_dist", "--with-zlib", - "--download-hypre", - "--download-suitesparse", - "--download-superlu_dist", - - # CUDA options - "--with-cuda=1", - "--with-openmp=1", - "--with-cxx-dialect=c++17", - "--download-umpire", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], @@ -523,15 +505,12 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { library_dirs=[ "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], - extra_env_vars={ - # Needed? - "PATH": "/usr/local/cuda/bin:$PATH", - }, - extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb", ), - (OS.UBUNTU_2604_X86_64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( - name="complex", + # Ubuntu 26.04 aarch64 + + (OS.UBUNTU_2604_AARCH64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( + name="default", system_packages=[ "bison", "build-essential", @@ -549,6 +528,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libfftw3-mpi-dev", "libhwloc-dev", "libhdf5-mpi-dev", + "libhypre-dev", "libmumps-ptscotch-dev", "libmetis-dev", "libnetcdf-dev", @@ -562,7 +542,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libsuperlu-dist-dev", ], extra_petsc_configure_options=[ - "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", @@ -578,24 +557,24 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-suitesparse", "--with-superlu_dist", "--with-zlib", + "--download-hypre", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ "/usr/include/hdf5/openmpi", + "/usr/include/hypre", "/usr/include/superlu", "/usr/include/superlu-dist", ], library_dirs=[ - "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", + "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", ], ), - # Ubuntu 26.04 aarch64 - - (OS.UBUNTU_2604_AARCH64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( - name="default", + (OS.UBUNTU_2604_AARCH64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( + name="complex", system_packages=[ "bison", "build-essential", @@ -613,7 +592,6 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libfftw3-mpi-dev", "libhwloc-dev", "libhdf5-mpi-dev", - "libhypre-dev", "libmumps-ptscotch-dev", "libmetis-dev", "libnetcdf-dev", @@ -627,6 +605,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libsuperlu-dist-dev", ], extra_petsc_configure_options=[ + "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", @@ -642,14 +621,12 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-suitesparse", "--with-superlu_dist", "--with-zlib", - "--download-hypre", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ "/usr/include/hdf5/openmpi", - "/usr/include/hypre", "/usr/include/superlu", "/usr/include/superlu-dist", ], @@ -658,8 +635,10 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { ], ), - (OS.UBUNTU_2604_AARCH64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( - name="complex", + # Ubuntu 26.04 x86 CUDA + + (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): CommunityArch( + name="default-cuda", system_packages=[ "bison", "build-essential", @@ -685,12 +664,20 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "libpnetcdf-dev", "libptscotch-dev", "libscalapack-openmpi-dev", - "libsuitesparse-dev", - "libsuperlu-dev", - "libsuperlu-dist-dev", + + # CUDA packages + "cuda-compat-13-0", + "cuda-nvtx-13-0", + "cuda-cudart-dev-13-0", + "cuda-command-line-tools-13-0", + "cuda-minimal-build-13-0", + "cuda-libraries-dev-13-0", + "cuda-nvml-dev-13-0", + "libnpp-dev-13-0", + "libcusparse-dev-13-0", + "libcublas-dev-13-0", ], extra_petsc_configure_options=[ - "--with-scalar-type=complex", "--with-bison", "--with-fftw", "--with-hdf5", @@ -700,24 +687,34 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "--with-netcdf", "--with-pnetcdf", "--with-ptscotch", - "--with-ptscotch-lib='-lptesmumps -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr'", - "--with-ptscotch-include=/usr/include/scotch", "--with-scalapack-lib=-lscalapack-openmpi", - "--with-suitesparse", - "--with-superlu_dist", "--with-zlib", + "--download-hypre", + "--download-suitesparse", + "--download-superlu_dist", + + # CUDA options + "--with-cuda=1", + "--with-openmp=1", + "--with-cxx-dialect=c++17", + "--download-umpire", ], cflags=["-O3", "-march=native", "-mtune=native"], cxxflags=["-O3", "-march=native", "-mtune=native"], fflags=["-O3", "-march=native", "-mtune=native"], include_dirs=[ "/usr/include/hdf5/openmpi", + "/usr/include/scotch", "/usr/include/superlu", "/usr/include/superlu-dist", ], library_dirs=[ - "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", + "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", ], + extra_env_vars={ + "PATH": "/usr/local/cuda/bin:$PATH", + }, + extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb", ), # macOS arm64 @@ -1015,89 +1012,6 @@ COMMUNITY_ARCHS: Mapping[ArchKey, CommunityArch] = { ], ), - (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): CommunityArch( - name="default-cuda", - maintainer="the Firedrake team", - contact="on Slack", - last_modified="2026-05-13", - system_packages=[ - "bison", - "build-essential", - "cmake", - "flex", - "gfortran", - "git", - "ninja-build", - "pkg-config", - "python3-dev", - "python3-pip", - - # PETSc external packages - "libfftw3-dev", - "libfftw3-mpi-dev", - "libhwloc-dev", - "libhdf5-mpi-dev", - "libmumps-ptscotch-dev", - "libmetis-dev", - "libnetcdf-dev", - "libopenblas-dev", - "libopenmpi-dev", - "libpnetcdf-dev", - "libptscotch-dev", - "libscalapack-openmpi-dev", - - # CUDA packages - "cuda-compat-13-0", - "cuda-nvtx-13-0", - "cuda-cudart-dev-13-0", - "cuda-command-line-tools-13-0", - "cuda-minimal-build-13-0", - "cuda-libraries-dev-13-0", - "cuda-nvml-dev-13-0", - "libnpp-dev-13-0", - "libcusparse-dev-13-0", - "libcublas-dev-13-0", - ], - extra_petsc_configure_options=[ - "--with-bison", - "--with-fftw", - "--with-hdf5", - "--with-hwloc", - "--with-metis", - "--with-mumps", - "--with-netcdf", - "--with-pnetcdf", - "--with-ptscotch", - "--with-scalapack-lib=-lscalapack-openmpi", - "--with-zlib", - "--download-hypre", - "--download-suitesparse", - "--download-superlu_dist", - - # CUDA options - "--with-cuda=1", - "--with-openmp=1", - "--with-cxx-dialect=c++17", - "--download-umpire", - ], - cflags=["-O3", "-march=native", "-mtune=native"], - cxxflags=["-O3", "-march=native", "-mtune=native"], - fflags=["-O3", "-march=native", "-mtune=native"], - include_dirs=[ - "/usr/include/hdf5/openmpi", - "/usr/include/scotch", - "/usr/include/superlu", - "/usr/include/superlu-dist", - ], - library_dirs=[ - "/usr/lib/x86_64-linux-gnu/hdf5/openmpi", - ], - extra_env_vars={ - "PATH": "/usr/local/cuda/bin:$PATH", - }, - extra_url="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb", - ), - # Ubuntu 24.04 aarch64 (OS.UBUNTU_2404_AARCH64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): CommunityArch( From 60181c890f5166528083448adb174cdd02ad56ef Mon Sep 17 00:00:00 2001 From: Connor Ward Date: Thu, 14 May 2026 10:52:00 +0100 Subject: [PATCH 31/31] fixup --- scripts/firedrake-configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index cac8f723a7..7593ddb97c 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -637,7 +637,7 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { # Ubuntu 26.04 x86 CUDA - (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): CommunityArch( + (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( name="default-cuda", system_packages=[ "bison",