diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index def35258ba..f5eb9b1fac 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -73,8 +73,7 @@ jobs: arch: [default, complex] runs-on: [self-hosted, Linux] container: - # TODO: set to 'ubuntu:latest' - image: ubuntu:noble + image: ubuntu:latest env: OMPI_ALLOW_RUN_AS_ROOT: 1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 @@ -82,8 +81,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 @@ -300,7 +299,7 @@ jobs: name: Build and test Firedrake (Linux CUDA) runs-on: [self-hosted, Linux, gpu] container: - # TODO: set to 'ubuntu:latest' + # TODO: set to 'ubuntu:latest' image: ubuntu:noble options: --gpus all if: inputs.test_gpu diff --git a/docs/notebooks/11-extract-adjoint-solutions.ipynb b/docs/notebooks/11-extract-adjoint-solutions.ipynb index b0b34a64f7..a463923a00 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\")" ] }, @@ -54849,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/pyop2/compilation.py b/pyop2/compilation.py index f37599382b..4b0aa5f6cc 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,17 @@ 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 we can set a + # maximum version constraint + # (see https://github.com/firedrakeproject/firedrake/issues/5107) + cflags.append("-O2") + return tuple(cflags) class LinuxClangCompiler(Compiler): diff --git a/pyproject.toml b/pyproject.toml index c83b58fdf5..5333954875 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,7 +111,8 @@ ci = [ "networkx", "ngsPETSc>=0.2.0", "pdf2image", - "pygraphviz", + # TODO: restore this (see https://github.com/firedrakeproject/firedrake/issues/5106) + # "pygraphviz", "pylit", "pytest", "pytest-order", @@ -129,7 +130,8 @@ docker = [ # Used in firedrake-vanilla container "nbval", "networkx", "pdf2image", - "pygraphviz", + # TODO: restore this (see https://github.com/firedrakeproject/firedrake/issues/5106) + # "pygraphviz", "pylit", "pytest", "pytest-order", diff --git a/scripts/firedrake-configure b/scripts/firedrake-configure index 7ab392d617..7593ddb97c 100755 --- a/scripts/firedrake-configure +++ b/scripts/firedrake-configure @@ -61,8 +61,6 @@ 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" def main(): @@ -86,8 +84,9 @@ def main(): elif arch_key in COMMUNITY_ARCHS: arch = COMMUNITY_ARCHS[arch_key] warn(f"""\ -You have selected a community-maintained Firedrake configuration, -if you encounter issues please contact {arch.maintainer}""") +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(f"""\ Firedrake configuration not found for option set '{arch_key_str}', @@ -211,6 +210,11 @@ 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.machine() == "aarch64": + return OS.UBUNTU_2604_AARCH64 elif platform.system() == "Darwin": if platform.machine() == "arm64": @@ -225,6 +229,8 @@ the available options.""") 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" @@ -342,7 +348,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 Your Name at email@address.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] @@ -350,9 +379,9 @@ ArchKey = tuple[OS, ScalarType, GPUPlatform] # Configurations with official support that are tested in CI OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { - # Ubuntu 24.04 x86 + # Ubuntu 26.04 x86 - (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( + (OS.UBUNTU_2604_X86_64, ScalarType.DEFAULT, GPUPlatform.NO_GPU): Arch( name="default", system_packages=[ "bison", @@ -369,8 +398,9 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { # PETSc external packages "libfftw3-dev", "libfftw3-mpi-dev", - "libhwloc-dev", "libhdf5-mpi-dev", + "libhwloc-dev", + "libhypre-dev", "libmumps-ptscotch-dev", "libmetis-dev", "libnetcdf-dev", @@ -388,23 +418,25 @@ 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", ], @@ -413,8 +445,8 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { ], ), - (OS.UBUNTU_2404_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", @@ -440,20 +472,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", @@ -463,38 +487,30 @@ 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/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", ), - (OS.UBUNTU_2404_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", @@ -512,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", @@ -525,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", @@ -535,29 +551,30 @@ 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", ], 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/x86_64-linux-gnu/hdf5/openmpi", + "/usr/lib/aarch64-linux-gnu/hdf5/openmpi", ], ), - # Ubuntu 24.04 aarch64 - - (OS.UBUNTU_2404_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", @@ -588,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", @@ -597,18 +615,18 @@ 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", ], 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", ], @@ -617,8 +635,10 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { ], ), - (OS.UBUNTU_2404_AARCH64, ScalarType.COMPLEX, GPUPlatform.NO_GPU): Arch( - name="complex", + # Ubuntu 26.04 x86 CUDA + + (OS.UBUNTU_2404_X86_64, ScalarType.DEFAULT, GPUPlatform.CUDA): Arch( + name="default-cuda", system_packages=[ "bison", "build-essential", @@ -644,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", @@ -660,9 +688,16 @@ 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"], @@ -674,8 +709,12 @@ OFFICIAL_ARCHS: Mapping[ArchKey, Arch] = { "/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 @@ -841,7 +880,268 @@ 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( + name="default", + 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", + "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): CommunityArch( + name="complex", + 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", + "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): CommunityArch( + name="default", + 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", + "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="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", + "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", + ], + ), +} if __name__ == "__main__":