From 369eefec60f5ac5bbf5270247872746e36cc3236 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Sat, 30 May 2026 00:57:30 -0700 Subject: [PATCH 01/11] add adios2 --- scripts/spack_configs/macOS/spack.yaml | 2 +- .../packages/adios2/2.10-enable-rocm6.patch | 28 ++ .../2.7-fix-missing-cstdint-include.patch | 24 + ....1-fix-broken-endian-reverse-compile.patch | 24 + ...9.2-cmake-find-threads-package-first.patch | 36 ++ .../spack_packages/packages/adios2/package.py | 475 ++++++++++++++++++ .../spack_packages/packages/geosx/package.py | 10 + 7 files changed, 598 insertions(+), 1 deletion(-) create mode 100644 scripts/spack_packages/packages/adios2/2.10-enable-rocm6.patch create mode 100644 scripts/spack_packages/packages/adios2/2.7-fix-missing-cstdint-include.patch create mode 100644 scripts/spack_packages/packages/adios2/2.7.1-fix-broken-endian-reverse-compile.patch create mode 100644 scripts/spack_packages/packages/adios2/2.9.2-cmake-find-threads-package-first.patch create mode 100644 scripts/spack_packages/packages/adios2/package.py diff --git a/scripts/spack_configs/macOS/spack.yaml b/scripts/spack_configs/macOS/spack.yaml index 693e973b..bdbe36d1 100644 --- a/scripts/spack_configs/macOS/spack.yaml +++ b/scripts/spack_configs/macOS/spack.yaml @@ -110,7 +110,7 @@ spack: buildable: false externals: - spec: perl@5.34.1 - prefix: /opt/homebrew/opt/perl + prefix: /usr pkg-config: buildable: false externals: diff --git a/scripts/spack_packages/packages/adios2/2.10-enable-rocm6.patch b/scripts/spack_packages/packages/adios2/2.10-enable-rocm6.patch new file mode 100644 index 00000000..abd69a9d --- /dev/null +++ b/scripts/spack_packages/packages/adios2/2.10-enable-rocm6.patch @@ -0,0 +1,28 @@ +From c718e99a9e226b7327ab41396823873999206e38 Mon Sep 17 00:00:00 2001 +From: Vicente Adolfo Bolea Sanchez +Date: Thu, 27 Jun 2024 18:25:58 -0400 +Subject: [PATCH] kokkos: support ROCM >=6 + +--- + source/adios2/helper/kokkos/adiosKokkos.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/source/adios2/helper/kokkos/adiosKokkos.cpp b/source/adios2/helper/kokkos/adiosKokkos.cpp +index e0599944e..d2619f0d4 100644 +--- a/source/adios2/helper/kokkos/adiosKokkos.cpp ++++ b/source/adios2/helper/kokkos/adiosKokkos.cpp +@@ -85,7 +85,11 @@ bool IsGPUbuffer(const void *ptr) + hipError_t ret; + hipPointerAttribute_t attr; + ret = hipPointerGetAttributes(&attr, ptr); ++#if defined(ROCM_VERSION_MAJOR) && ROCM_VERSION_MAJOR < 6 + if (ret == hipSuccess && attr.memoryType == hipMemoryTypeDevice) ++#else ++ if (ret == hipSuccess && attr.type == hipMemoryTypeDevice) ++#endif + { + return true; + } +-- +2.35.3 + diff --git a/scripts/spack_packages/packages/adios2/2.7-fix-missing-cstdint-include.patch b/scripts/spack_packages/packages/adios2/2.7-fix-missing-cstdint-include.patch new file mode 100644 index 00000000..6b90d210 --- /dev/null +++ b/scripts/spack_packages/packages/adios2/2.7-fix-missing-cstdint-include.patch @@ -0,0 +1,24 @@ +From abbe0f81d78403a62444b1a76222b9a226fd17c6 Mon Sep 17 00:00:00 2001 +From: Vicente Adolfo Bolea Sanchez +Date: Mon, 22 Apr 2024 20:52:49 -0700 +Subject: [PATCH] fix py11bind stdint dep + +--- + thirdparty/pybind11/pybind11/include/pybind11/pybind11.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h b/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h +index fa98f7c18..6992c3d55 100644 +--- a/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h ++++ b/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h +@@ -47,6 +47,7 @@ + #include "detail/class.h" + #include "detail/init.h" + ++#include + #include + #include + #include +-- +2.35.3 + diff --git a/scripts/spack_packages/packages/adios2/2.7.1-fix-broken-endian-reverse-compile.patch b/scripts/spack_packages/packages/adios2/2.7.1-fix-broken-endian-reverse-compile.patch new file mode 100644 index 00000000..669eb1b2 --- /dev/null +++ b/scripts/spack_packages/packages/adios2/2.7.1-fix-broken-endian-reverse-compile.patch @@ -0,0 +1,24 @@ +From 5aed0d5c3ecb7afbd56a786243b2bc8811e0fbdd Mon Sep 17 00:00:00 2001 +From: Axel Huebl +Date: Fri, 14 May 2021 18:22:19 -0700 +Subject: [PATCH] Fix Broken Endinage Reverse Compile + +Add right type in comparison. +--- + source/adios2/helper/adiosMemory.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/source/adios2/helper/adiosMemory.cpp b/source/adios2/helper/adiosMemory.cpp +index c3a4246a91..3bf8c89adc 100644 +--- a/source/adios2/helper/adiosMemory.cpp ++++ b/source/adios2/helper/adiosMemory.cpp +@@ -29,7 +29,7 @@ void CopyPayloadStride(const char *src, const size_t payloadStride, char *dest, + #ifdef ADIOS2_HAVE_ENDIAN_REVERSE + if (endianReverse) + { +- if (destType == "") ++ if (destType == DataType::None) + { + } + #define declare_type(T) \ + diff --git a/scripts/spack_packages/packages/adios2/2.9.2-cmake-find-threads-package-first.patch b/scripts/spack_packages/packages/adios2/2.9.2-cmake-find-threads-package-first.patch new file mode 100644 index 00000000..afc6808d --- /dev/null +++ b/scripts/spack_packages/packages/adios2/2.9.2-cmake-find-threads-package-first.patch @@ -0,0 +1,36 @@ +From 80e4739fb53b0b7e02dae48b928d8b8247992763 Mon Sep 17 00:00:00 2001 +From: Vicente Adolfo Bolea Sanchez +Date: Thu, 2 Nov 2023 12:18:49 -0400 +Subject: [PATCH] cmake: find threads package first + +--- + cmake/DetectOptions.cmake | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake +index 3f511e02a..615995b71 100644 +--- a/cmake/DetectOptions.cmake ++++ b/cmake/DetectOptions.cmake +@@ -67,6 +67,9 @@ function(lists_get_prefix listVars outVar) + set(${outVar} "${prefix}" PARENT_SCOPE) + endfunction() + ++# Multithreading ++find_package(Threads REQUIRED) ++ + # Blosc2 + if(ADIOS2_USE_Blosc2 STREQUAL AUTO) + # Prefect CONFIG mode +@@ -554,9 +557,6 @@ if(AWSSDK_FOUND) + set(ADIOS2_HAVE_AWSSDK TRUE) + endif() + +-# Multithreading +-find_package(Threads REQUIRED) +- + # Floating point detection + include(CheckTypeRepresentation) + +-- +2.35.3 + diff --git a/scripts/spack_packages/packages/adios2/package.py b/scripts/spack_packages/packages/adios2/package.py new file mode 100644 index 00000000..a0950bfa --- /dev/null +++ b/scripts/spack_packages/packages/adios2/package.py @@ -0,0 +1,475 @@ +# Copyright Spack Project Developers. See COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os +import sys + +from spack_repo.builtin.build_systems.cmake import CMakeBuilder, CMakePackage +from spack_repo.builtin.build_systems.cuda import CudaPackage +from spack_repo.builtin.build_systems.rocm import ROCmPackage + +from spack.package import * + +IS_WINDOWS = sys.platform == "win32" + + +class Adios2(CMakePackage, CudaPackage, ROCmPackage): + """The Adaptable Input Output System version 2, + developed in the Exascale Computing Program""" + + homepage = "https://adios2.readthedocs.io" + url = "https://github.com/ornladios/ADIOS2/archive/v2.8.0.tar.gz" + git = "https://github.com/ornladios/ADIOS2.git" + test_requires_compiler = True + + maintainers("ax3l", "vicentebolea", "williamfgc") + + tags = ["e4s"] + + license("Apache-2.0") + + version("master", branch="master") + version("2.12.1", sha256="71edd8f721448311852122fca8d83ae497b43846e5bfcdfd275dc06bb7f3d0c5") + version("2.12.0", sha256="c59aeb75f3ea9949c4ae2d597115536ee593dedb50592784917ba8d29c8a3b34") + version("2.11.0", sha256="0a2bd745e3f39745f07587e4a5f92d72f12fa0e2be305e7957bdceda03735dbf") + version("2.10.2", sha256="14cf0bcd94772194bce0f2c0e74dba187965d1cffd12d45f801c32929158579e") + version("2.10.1", sha256="ce776f3a451994f4979c6bd6d946917a749290a37b7433c0254759b02695ad85") + version("2.10.0", sha256="e5984de488bda546553dd2f46f047e539333891e63b9fe73944782ba6c2d95e4") + version("2.9.2", sha256="78309297c82a95ee38ed3224c98b93d330128c753a43893f63bbe969320e4979") + version("2.9.1", sha256="ddfa32c14494250ee8a48ef1c97a1bf6442c15484bbbd4669228a0f90242f4f9") + version("2.9.0", sha256="69f98ef58c818bb5410133e1891ac192653b0ec96eb9468590140f2552b6e5d1") + version("2.8.3", sha256="4906ab1899721c41dd918dddb039ba2848a1fb0cf84f3a563a1179b9d6ee0d9f") + version("2.8.2", sha256="9909f6409dc44b2c28c1fda0042dab4b711f25ec3277ef0cb6ffc40f5483910d") + version("2.8.1", sha256="3f515b442bbd52e3189866b121613fe3b59edb8845692ea86fad83d1eba35d93") + version("2.8.0", sha256="5af3d950e616989133955c2430bd09bcf6bad3a04cf62317b401eaf6e7c2d479") + version("2.7.1", sha256="c8e237fd51f49d8a62a0660db12b72ea5067512aa7970f3fcf80b70e3f87ca3e") + + # There's not really any consistency about how static and shared libs are + # implemented across spack. What we're trying to support is specifically three + # library build types: + # shared (which is implicitly w/ pic) + # Implemented by +shared +pic + # static w/o pic + # Implemented by ~shared ~pic + # static w/ pic + # Implemented by ~shared +pic + # shared w/o pic is not a valid configuration because shared libraries are Position + # Independent # Code by design. We're not inherently tied to this approach and can + # change how we're supporting differnt library types in the package at anytime if + # spack decides on a standardized way of doing it across packages + variant("shared", default=True, when="+pic", description="Build shared libraries") + + # Features + variant("mpi", default=True, description="Enable MPI") + + # Compression libraries + variant( + "libpressio", default=False, when="@2.8:", description="Enable LibPressio for compression" + ) + variant("blosc", default=True, when="@2.4:2.8", description="Enable Blosc compression") + variant("blosc2", default=True, when="@2.9:", description="Enable Blosc2 compression") + variant("bzip2", default=True, description="Enable BZip2 compression") + variant("zfp", default=True, description="Enable ZFP compression") + variant("png", default=True, description="Enable PNG compression") + variant("sz", default=True, description="Enable SZ2 compression") + variant("sz3", default=True, when="@2.12:", description="Enable SZ3 compression") + variant("mgard", default=not IS_WINDOWS, when="@2.8:", description="Enable MGARD compression") + + # Transport engines + variant("sst", default=True, description="Enable the SST staging engine") + variant( + "dataman", + default=False, + when="+shared", + description="Enable the DataMan engine for WAN transports", + ) + variant("campaign", default=False, when="@2.10:", description="Enable campaign management") + variant("dataspaces", default=False, description="Enable support for DATASPACES") + variant("ssc", default=True, when="@:2.7", description="Enable the SSC staging engine") + variant("hdf5", default=False, description="Enable the HDF5 engine") + variant( + "aws", + default=False, + when="@2.9:", + description="Enable support for S3 compatible storage using AWS SDK's S3 module", + ) + variant( + "libcatalyst", + default=not IS_WINDOWS, + when="@2.9:", + description="Enable support for in situ visualization plugin using ParaView Catalyst", + ) + + variant("xrootd", default=True, description="Enable the XRootD") + + # Optional language bindings, C++11 and C always provided + variant("kokkos", default=False, when="@2.9:", description="Enable Kokkos support") + variant("sycl", default=False, when="@2.10:", description="Enable SYCL support") + variant("python", default=False, description="Enable the Python bindings") + variant("fortran", default=True, description="Enable the Fortran bindings") + + # Requires mature C++11 implementations + conflicts("%gcc@:4.7") + conflicts("%intel@:15") + + # ifx does not support submodules in separate files + conflicts("%oneapi@:2022.1.0", when="+fortran") + + # https://github.com/ornladios/ADIOS2/issues/4620 + conflicts("%cuda@13:", when="@:2.11 +cuda") + + depends_on("c", type="build") + depends_on("cxx", type="build") + depends_on("fortran", type="build", when="+fortran") + + depends_on("cmake@3.12.0:", type="build") + + depends_on("yaml-cpp") + depends_on("yaml-cpp@0.7.0:", when="@2.9:") + depends_on("nlohmann-json") + depends_on("pugixml@1.10:") + + # Standalone CUDA support + depends_on("cuda", when="+cuda ~kokkos") + + depends_on("py-nanobind", when="@2.12: +python") + + # Kokkos support + with when("+kokkos"): + depends_on("kokkos@3.7:") + depends_on("kokkos +cuda +wrapper", when="+cuda") + depends_on("kokkos +rocm", when="+rocm") + depends_on("kokkos +sycl", when="+sycl") + + # Propagate CUDA target to kokkos for +cuda + for cuda_arch in CudaPackage.cuda_arch_values: + depends_on( + "kokkos cuda_arch=%s" % cuda_arch, when="+kokkos +cuda cuda_arch=%s" % cuda_arch + ) + + # Propagate AMD GPU target to kokkos for +rocm + for amdgpu_value in ROCmPackage.amdgpu_targets: + depends_on( + "kokkos amdgpu_target=%s" % amdgpu_value, + when="+kokkos +rocm amdgpu_target=%s" % amdgpu_value, + ) + + conflicts("+cuda", when="@:2.7") + conflicts("+rocm", when="@:2.8") + + conflicts("+cuda", when="+sycl") + conflicts("+rocm", when="+cuda") + conflicts("+rocm", when="+sycl") + + conflicts("+rocm", when="~kokkos", msg="ADIOS2 does not support HIP without Kokkos") + conflicts("+sycl", when="~kokkos", msg="ADIOS2 does not support SYCL without Kokkos") + + for _platform in ["linux", "darwin"]: + depends_on("pkgconfig", type="build", when=f"platform={_platform}") + variant( + "pic", + default=False, + description="Build pic-enabled static libraries", + when=f"platform={_platform}", + ) + # libffi and libfabric and not currently supported on Windows + # see Paraview's superbuild handling of libfabric at + # https://gitlab.kitware.com/paraview/paraview-superbuild/-/blob/master/projects/adios2.cmake#L3 + depends_on("libffi", when=f"+sst platform={_platform}") # optional in DILL + depends_on( + "libfabric@1.6.0:", when=f"+sst platform={_platform}" + ) # optional in EVPath and SST + # depends_on('bison', when='+sst') # optional in FFS, broken package + # depends_on('flex', when='+sst') # optional in FFS, depends on BISON + + depends_on("mpi", when="+mpi") + depends_on("libzmq", when="+dataman") + depends_on("dataspaces@1.8.0:", when="+dataspaces") + + depends_on("hdf5@:1.12", when="@:2.8 +hdf5") + depends_on("hdf5@1.12:", when="@2.9: +hdf5") + depends_on("hdf5~mpi", when="+hdf5~mpi") + depends_on("hdf5+mpi", when="+hdf5+mpi") + + depends_on("sqlite@3", when="+campaign") + + depends_on("libpressio", when="+libpressio") + depends_on("c-blosc", when="+blosc") + depends_on("c-blosc2", when="+blosc2") + depends_on("bzip2", when="+bzip2") + depends_on("libpng@1.6:", when="+png") + depends_on("zfp@0.5.1:0.5", when="+zfp") + depends_on("sz@2.0.2.0:", when="+sz") + depends_on("sz3", when="+sz3") + depends_on("mgard@compat-2022-11-18:", when="+mgard") + depends_on("mgard@compat-2023-01-10:", when="@2.9: +mgard") + + extends("python", when="+python") + depends_on("python", when="+python", type=("build", "run")) + depends_on("python@3.5:3.10", when="@:2.7 +python", type=("build", "run")) + depends_on("python@3.8:", when="@2.10: +python", type=("build", "run")) + + depends_on("python", type="test") + depends_on("python@3.5:3.10", when="@:2.7", type="test") + + depends_on("py-numpy@1.6.1:", when="+python", type=("build", "run")) + depends_on("py-mpi4py@2.0.0:", when="+mpi +python", type=("build", "run")) + depends_on("aws-sdk-cpp", when="+aws") + depends_on("libcatalyst@2", when="+libcatalyst") + + depends_on("xrootd~davix", when="+xrootd") + + # error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'} + conflicts("^python@3.11:", when="@:2.7") + + # cmake build race condition + patch( + "https://github.com/ornladios/ADIOS2/commit/16869cf18cb4bd07d500c3048c3d34d1611674c7.patch?full_index=1", + when="@2.11.0", + sha256="3af07961975ec6c9023dca182ed19458c021cdf1812d34d9a9e9dad1da60ae75", + ) + + # add missing include + patch("2.7-fix-missing-cstdint-include.patch", when="@2.7") + + # Add missing include + # https://github.com/ornladios/adios2/pull/2710 + patch( + "https://github.com/ornladios/adios2/commit/72363a5ed1015c2bbb1c057d4d6b2e5662de12ec.patch?full_index=1", + when="@2.7.1", + sha256="8221073d1b2f8944395a88a5d60a15c7370646b62f5fc6309867bbb6a8c2096c", + ) + + # Fix mismatched datatypes in comparison + # See https://github.com/ornladios/ADIOS2/pull/2701 + patch("2.7.1-fix-broken-endian-reverse-compile.patch", when="@2.7.1") + + # cmake: find threads package first + # https://github.com/ornladios/ADIOS2/pull/3893 + patch("2.9.2-cmake-find-threads-package-first.patch", when="@2.9") + + # ROCM: enable support for rocm >= 6 + # https://github.com/ornladios/ADIOS2/pull/4214 + patch("2.10-enable-rocm6.patch", when="@2.9.1:2.10.1") + + # Fix issue with GCC 7 + # https://github.com/ornladios/ADIOS2/pull/4591 + patch( + "https://github.com/ornladios/adios2/commit/b7a5957.patch?full_index=1", + sha256="d854008ab27d6ebfa66fffb78126b17713cda3234ed19bf331f85a720e599a32", + when="@2.8:2.10", + ) + + # https://github.com/ornladios/ADIOS2/pull/4729 + patch( + "https://github.com/ornladios/ADIOS2/commit/0bdda7d4729b898397e024010b1e82cb72921501.patch?full_index=1", + sha256="c7214845bc9e4262deb901f9d689236e014f5193018617675bea4bed80ca20aa", + when="@2.11", + ) + + # https://github.com/ornladios/ADIOS2/pull/5006 + # Using a diff rather than patch since the commit is a git subtree commit which does not play + # well with the github .patch URL param + patch( + "https://github.com/ornladios/ADIOS2/compare/98c51cc2207fd178d2f84f493d19710cf21f84c1^1...98c51cc2207fd178d2f84f493d19710cf21f84c1.diff?full_index=1", + sha256="0fe8ecf75eabf975caf5de447ac34084b574f78e73cf83cf158a9e58b692f2e3", + when="@2.12.0", + ) + + @when("%fj") + def patch(self): + """add fujitsu mpi commands #16864""" + f = join_path("cmake", "upstream", "FindMPI.cmake") + filter_file("mpcc_r)", "mpcc_r mpifcc)", f, string=True) + filter_file("mpc++_r)", "mpcc_r mpiFCC)", f, string=True) + filter_file("mpf77_r", "mpf77_r mpifrt", f, string=True) + + def setup_build_environment(self, env: EnvironmentModifications) -> None: + # https://github.com/ornladios/ADIOS2/issues/2228 + if self.spec.satisfies("+fortran %gcc@10:"): + env.set("FFLAGS", "-fallow-argument-mismatch") + elif self.spec.satisfies("+fortran %fj"): + env.set("FFLAGS", "-Ccpp") + + def cmake_args(self): + spec = self.spec + from_variant = self.define_from_variant + + args = [ + from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), + from_variant("BUILD_SHARED_LIBS", "shared"), + from_variant("ADIOS2_USE_AWSSDK", "aws"), + from_variant("ADIOS2_USE_Blosc2", "blosc2"), + from_variant("ADIOS2_USE_Blosc", "blosc"), + from_variant("ADIOS2_USE_BZip2", "bzip2"), + from_variant("ADIOS2_USE_Campaign", "campaign"), + from_variant("ADIOS2_USE_DataMan", "dataman"), + from_variant("ADIOS2_USE_DataSpaces", "dataspaces"), + from_variant("ADIOS2_USE_Fortran", "fortran"), + from_variant("ADIOS2_USE_HDF5", "hdf5"), + from_variant("ADIOS2_USE_MGARD", "mgard"), + from_variant("ADIOS2_USE_MPI", "mpi"), + from_variant("ADIOS2_USE_PNG", "png"), + from_variant("ADIOS2_USE_Python", "python"), + from_variant("ADIOS2_USE_SSC", "ssc"), + from_variant("ADIOS2_USE_SST", "sst"), + from_variant("ADIOS2_USE_SZ3", "sz3"), + from_variant("ADIOS2_USE_SZ", "sz"), + from_variant("ADIOS2_USE_XRootD", "xrootd"), + from_variant("ADIOS2_USE_ZFP", "zfp"), + from_variant("ADIOS2_USE_Catalyst", "libcatalyst"), + from_variant("ADIOS2_USE_LIBPRESSIO", "libpressio"), + self.define("ADIOS2_USE_CUDA", self.spec.satisfies("+cuda ~kokkos")), + self.define("ADIOS2_USE_Kokkos", self.spec.satisfies("+kokkos")), + self.define("Kokkos_ENABLE_CUDA", self.spec.satisfies("+cuda +kokkos")), + self.define("Kokkos_ENABLE_HIP", self.spec.satisfies("+rocm")), + self.define("Kokkos_ENABLE_SYCL", self.spec.satisfies("+sycl")), + self.define("BUILD_TESTING", self.run_tests), + self.define("ADIOS2_BUILD_EXAMPLES", False), + self.define("ADIOS2_USE_Endian_Reverse", True), + self.define("ADIOS2_USE_IME", False), + self.define("ADIOS2_USE_EXTERNAL_YAMLCPP", True), + self.define("ADIOS2_USE_EXTERNAL_NLOHMANN_JSON", True), + self.define("ADIOS2_USE_EXTERNAL_NANOBIND", self.spec.satisfies("@2.12: +python")), + self.define("ADIOS2_USE_EXTERNAL_PUGIXML", True), + ] + + if spec.satisfies("+sst"): + args.extend( + [ + # Broken dependency package + "-DCMAKE_DISABLE_FIND_PACKAGE_BISON=TRUE", + # Depends on ^ + "-DCMAKE_DISABLE_FIND_PACKAGE_FLEX=TRUE", + # Not yet packaged + "-DCMAKE_DISABLE_FIND_PACKAGE_CrayDRC=TRUE", + "-DCMAKE_DISABLE_FIND_PACKAGE_NVSTREAM=TRUE", + ] + ) + + if spec.satisfies("%fj"): + args.extend(["-DCMAKE_Fortran_SUBMODULE_EXT=.smod", "-DCMAKE_Fortran_SUBMODULE_SEP=."]) + + # cuda support + if spec.satisfies("+cuda"): + args.append(CMakeBuilder.define_cuda_architectures(self)) + + # hip support + if spec.satisfies("+rocm"): + args.append(CMakeBuilder.define_hip_architectures(self)) + + if spec.satisfies("+python"): + py_libdir = join_path( + self.prefix.lib, f"python{spec['python'].version.up_to(2)}", "site-packages" + ) + args.append(self.define("CMAKE_INSTALL_PYTHONDIR", py_libdir)) + + return args + + @property + def libs(self): + spec = self.spec + libs_to_seek = set() + + libs_to_seek.add("libadios2_core") + libs_to_seek.add("libadios2_c") + if spec.satisfies("@:2.10"): + libs_to_seek.add("libadios2_cxx11") + else: + libs_to_seek.add("libadios2_cxx") + if spec.satisfies("+fortran"): + libs_to_seek.add("libadios2_fortran") + + if spec.satisfies("+mpi"): + libs_to_seek.add("libadios2_core_mpi") + libs_to_seek.add("libadios2_c_mpi") + if spec.satisfies("@:2.10"): + libs_to_seek.add("libadios2_cxx11_mpi") + else: + libs_to_seek.add("libadios2_cxx_mpi") + if spec.satisfies("+fortran"): + libs_to_seek.add("libadios2_fortran_mpi") + + if "+shared+hdf5" in spec and "@1.12:" in spec["hdf5"]: + libs_to_seek.add("libadios2_h5vol") + + else: + libs_to_seek.add("libadios2") + if spec.satisfies("+fortran"): + libs_to_seek.add("libadios2_fortran") + + return find_libraries( + list(libs_to_seek), root=self.spec.prefix, shared=("+shared" in spec), recursive=True + ) + + def setup_run_environment(self, env: EnvironmentModifications) -> None: + try: + all_libs = self.libs + idx = all_libs.basenames.index("libadios2_h5vol.so") + env.prepend_path("HDF5_PLUGIN_PATH", os.path.dirname(all_libs[idx])) + except ValueError: + pass + + if "+python" in self.spec: + py_libdir = join_path( + self.prefix.lib, f"python{self.spec['python'].version.up_to(2)}", "site-packages" + ) + env.prepend_path("PYTHONPATH", py_libdir) + + @run_after("install") + def setup_install_tests(self): + """ + Copy the example files after the package is installed to an + install test subdirectory for use during `spack test run`. + """ + extra_install_tests = [join_path("testing", "install", "C")] + cache_extra_test_sources(self, extra_install_tests) + + def test_run_executables(self): + """Run installed adios2 executables""" + + commands_and_args = [("bpls", ["-v", "-V"]), ("adios2-config", ["-v"])] + + for cmd, opts in commands_and_args: + with test_part( + self, + f"test_run_executables_{cmd}", + purpose=f"run installed adios2 executable {cmd}", + ): + exe = which(join_path(self.prefix.bin, cmd), required=True) + exe(*opts) + + def test_python(self): + """Test adios2 python""" + if self.spec.satisfies("+python"): + with test_part(self, "test_python_import", purpose="import adios2 in python"): + python = Executable(self.spec["python"].prefix.bin.python) + python(*(["-c", "import adios2; print(adios2.__version__)"])) + + def test_install(self): + """Build and run an install tests""" + srcdir = self.test_suite.current_test_cache_dir.testing.install.C + blddir = self.test_suite.current_test_cache_dir.build_dir + + cmake = Executable(self.spec["cmake"].prefix.bin.cmake) + cmake_args = [] + + if self.spec.satisfies("+mpi"): + mpi_exec = join_path(self.spec["mpi"].prefix, "bin", "mpiexec") + cmake_args.append(f"-DMPIEXEC_EXECUTABLE={mpi_exec}") + + with working_dir(blddir, create=True): + with test_part(self, "test_install_build", purpose="ADIOS2 install test build app"): + cmake(srcdir, *cmake_args) + cmake(*(["--build", "."])) + + for binary in ["adios_c_mpi_test", "adios_adios2c_test", "adios_c_test"]: + exe = which(join_path(".", binary)) + if exe: + with test_part( + self, + f"test_install_run_{binary}", + purpose=f"ADIOS2 install test run {binary}", + ): + exe() diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index 91c3c7df..ddd992c6 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -63,6 +63,7 @@ class Geosx(CMakePackage, CudaPackage, ROCmPackage): variant('openmp', default=True, description='Build with OpenMP support.') variant('shared', default=True, description='Build Shared Libs.') variant('caliper', default=True, description='Build Caliper support.') + variant('adios2', default=True, description='Build ADIOS2 support.') variant('vtk', default=True, description='Build VTK support.') variant('trilinos', default=True, description='Build Trilinos support.') variant('hypre', default=True, description='Build HYPRE support.') @@ -143,6 +144,12 @@ class Geosx(CMakePackage, CudaPackage, ROCmPackage): # IO # depends_on('hdf5@1.14.6') + adios2_spec = ( + 'adios2@2.12.1+mpi+hdf5+shared+pic+zfp+sz3~mgard' + '~python~fortran~sst~dataman~dataspaces~campaign~aws~libcatalyst' + '~xrootd~kokkos~cuda~rocm~sycl~libpressio~blosc2~bzip2~png~sz' + ) + depends_on(adios2_spec, when='+adios2') depends_on('silo@4.12.0~fortran~shared~python build_system=cmake') depends_on('conduit@0.9.5 ~test~fortran~hdf5_compat+shared') @@ -519,6 +526,7 @@ def geos_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): io_tpls = ( ('zlib', 'ZLIB', True), ('hdf5', 'HDF5', True), + ('adios2', 'ADIOS2', '+adios2' in spec), ('conduit', 'CONDUIT', True), ('silo', 'SILO', True), ('pugixml', 'PUGIXML', True), @@ -551,6 +559,8 @@ def geos_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): raise KeyError("No zlib provider (zlib/zlib-ng/zlib-api) found in {0}".format(spec)) else: dep_spec = spec[tpl] + if tpl == 'adios2': + cfg.write(cmake_cache_option('ENABLE_ADIOS2', True)) cfg.write(cmake_cache_entry('{}_DIR'.format(cmake_name), dep_spec.prefix)) else: cfg.write(cmake_cache_option('ENABLE_{}'.format(cmake_name), False)) From 6af2565f028a12a86a58d67d80188d4ea27e0894 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Sat, 30 May 2026 14:37:31 -0700 Subject: [PATCH 02/11] patch for issue with metis and ML --- .../trilinos/fix_ml_metis_idx_t.patch | 191 ++++++++++++++++++ .../packages/trilinos/package.py | 1 + 2 files changed, 192 insertions(+) create mode 100644 scripts/spack_packages/packages/trilinos/fix_ml_metis_idx_t.patch diff --git a/scripts/spack_packages/packages/trilinos/fix_ml_metis_idx_t.patch b/scripts/spack_packages/packages/trilinos/fix_ml_metis_idx_t.patch new file mode 100644 index 00000000..8e1e493e --- /dev/null +++ b/scripts/spack_packages/packages/trilinos/fix_ml_metis_idx_t.patch @@ -0,0 +1,191 @@ +diff -Naur a/packages/ml/src/Coarsen/ml_agg_METIS.c b/packages/ml/src/Coarsen/ml_agg_METIS.c +--- a/packages/ml/src/Coarsen/ml_agg_METIS.c 2025-03-19 14:59:00 ++++ b/packages/ml/src/Coarsen/ml_agg_METIS.c 2026-05-30 14:31:46 +@@ -82,7 +82,7 @@ + int graph_decomposition[], + int mypid); + */ +-static int ML_LocalReorder_with_METIS( int Nrows, int xadj[], int adjncy[] , ++static int ML_LocalReorder_with_METIS( int Nrows, indextype xadj[], indextype adjncy[] , + int Nparts, indextype part[], int level, + ML_Comm *comm ); + +@@ -441,7 +441,7 @@ + */ + /* ------------------------------------------------------------------------ */ + +-static int ML_LocalReorder_with_METIS( int Nrows, int xadj[], int adjncy[] , ++static int ML_LocalReorder_with_METIS( int Nrows, indextype xadj[], indextype adjncy[] , + int Nparts, indextype part[], int level, + ML_Comm *comm ) + { +@@ -451,7 +451,11 @@ + int MaxNnzRow; + indextype * xadj2 = NULL, * adjncy2 = NULL; + indextype * perm = NULL, * iperm = NULL; ++#if defined(HAVE_ML_METIS) && (METIS_VER_MAJOR >= 5) ++ indextype options[METIS_NOPTIONS]; ++#else + indextype options[8]; ++#endif + size_t used_mem; + int bandwidth_orig, bandwidth_perm; + int mypid = comm->ML_mypid; +@@ -616,7 +620,11 @@ + exit( EXIT_FAILURE ); + } + ++#if defined(HAVE_ML_METIS) && (METIS_VER_MAJOR >= 5) ++ METIS_SetDefaultOptions(options); ++#else + options[0] = 0; /* default values */ ++#endif + /* those are instead possible non-default values. No idea about how + to pick them up... + options[0] = 1; +@@ -663,7 +671,14 @@ + + i = 0; /* offset, C or FORTRAN */ + #ifdef HAVE_ML_METIS ++# if METIS_VER_MAJOR < 5 + METIS_NodeND( &Nparts, xadj2, adjncy2, &i, options, perm, iperm ); ++# else ++ { ++ indextype metis_nparts = (indextype) Nparts; ++ METIS_NodeND( &metis_nparts, xadj2, adjncy2, NULL, options, perm, iperm ); ++ } ++# endif + #else + fprintf( stderr, + "*ERR*ML* This function has been compiled without -DHAVE_ML_METIS\n" +@@ -750,7 +765,8 @@ + + int i, j,jj, count, count2, count_start; + int Nrows, Nrows_global,NrowsMETIS, N_nonzeros, N_bdry_nodes; +- int *wgtflag=NULL, numflag; ++ indextype *wgtflag=NULL; ++ int numflag; + indextype *xadj=NULL, *adjncy=NULL; + #ifdef HAVE_ML_METIS + indextype *vwgt=NULL, *adjwgt=NULL; +@@ -970,8 +986,12 @@ + vsize = NULL; + tpwgts = NULL; + ubvec = NULL; +- METIS_PartGraphRecursive (&NrowsMETIS, &numBalancingConstraints, xadj, adjncy, +- vwgt, vsize, adjwgt, &N_parts, tpwgts, ubvec, options, &edgecut, part); ++ { ++ indextype metis_nrows = (indextype) NrowsMETIS; ++ indextype metis_nparts = (indextype) N_parts; ++ METIS_PartGraphRecursive (&metis_nrows, &numBalancingConstraints, xadj, adjncy, ++ vwgt, vsize, adjwgt, &metis_nparts, tpwgts, ubvec, options, &edgecut, part); ++ } + # endif + } else { + +@@ -990,8 +1010,12 @@ + vsize = NULL; + tpwgts = NULL; + ubvec = NULL; +- METIS_PartGraphKway (&NrowsMETIS, &numBalancingConstraints, xadj, adjncy, +- vwgt, vsize, adjwgt, &N_parts, tpwgts, ubvec, options, &edgecut, part); ++ { ++ indextype metis_nrows = (indextype) NrowsMETIS; ++ indextype metis_nparts = (indextype) N_parts; ++ METIS_PartGraphKway (&metis_nrows, &numBalancingConstraints, xadj, adjncy, ++ vwgt, vsize, adjwgt, &metis_nparts, tpwgts, ubvec, options, &edgecut, part); ++ } + # endif + } + #else +diff -Naur a/packages/ml/src/Coarsen/ml_agg_ParMETIS.c b/packages/ml/src/Coarsen/ml_agg_ParMETIS.c +--- a/packages/ml/src/Coarsen/ml_agg_ParMETIS.c 2025-03-19 14:59:00 ++++ b/packages/ml/src/Coarsen/ml_agg_ParMETIS.c 2026-05-30 14:31:56 +@@ -472,7 +472,7 @@ + + int i, j,jj, count; + int Nrows; +- int *wgtflag=NULL, numflag, *options=NULL, edgecut; ++ indextype *wgtflag=NULL, numflag, *options=NULL, edgecut; + indextype *xadj=NULL, *adjncy=NULL; + #if defined(ML_MPI) + #if defined(HAVE_ML_PARMETIS) +@@ -490,7 +490,7 @@ + int mypid = Amatrix->comm->ML_mypid; + int * offsets = NULL; + indextype * vtxdist = NULL; +- int ncon = 1; ++ indextype ncon = 1; + float * tpwgts = NULL; + float ubvec; /* size = ncon */ + int * proc_with_parmetis = NULL; +@@ -670,7 +670,7 @@ + /* set parameters for ParMETIS */ + + wgtflag = (indextype *) ML_allocate (4*sizeof(indextype)); +- options = (int *) ML_allocate (4*sizeof(int)); ++ options = (indextype *) ML_allocate (4*sizeof(indextype)); + + wgtflag[0] = 0; /* no weights */ + numflag = 0; /* C style */ +@@ -734,10 +734,13 @@ + + #if defined(HAVE_ML_PARMETIS) && defined(ML_MPI) + /* never tested right now... */ +- ParMETIS_V3_PartKway (vtxdist, xadj, adjncy, vwgt, adjwgt, +- wgtflag, &numflag, &ncon, &N_parts, tpwgts, +- &ubvec,options, +- &edgecut, part, &ParMETISComm); ++ { ++ indextype metis_nparts = (indextype) N_parts; ++ ParMETIS_V3_PartKway (vtxdist, xadj, adjncy, vwgt, adjwgt, ++ wgtflag, &numflag, &ncon, &metis_nparts, tpwgts, ++ &ubvec, options, ++ &edgecut, part, &ParMETISComm); ++ } + #else + if( Amatrix->comm->ML_mypid == 0 ) { + fprintf( stderr, +diff -Naur a/packages/ml/src/Coarsen/ml_agg_VBMETIS.c b/packages/ml/src/Coarsen/ml_agg_VBMETIS.c +--- a/packages/ml/src/Coarsen/ml_agg_VBMETIS.c 2025-03-19 14:59:00 ++++ b/packages/ml/src/Coarsen/ml_agg_VBMETIS.c 2026-05-30 14:31:46 +@@ -2081,7 +2081,8 @@ + + int i, j,jj, count, count2; + int Nrows, Nrows_global,NrowsMETIS, N_nonzeros, N_bdry_nodes; +- int *wgtflag=NULL, numflag; ++ indextype *wgtflag=NULL; ++ int numflag; + indextype *xadj=NULL, *adjncy=NULL; + #ifdef HAVE_ML_METIS + indextype *vwgt=NULL, *adjwgt=NULL; +@@ -2325,8 +2326,12 @@ + vsize = NULL; + tpwgts = NULL; + ubvec = NULL; +- METIS_PartGraphRecursive (&NrowsMETIS, &numBalancingConstraints, xadj, adjncy, +- vwgt, vsize, adjwgt, &N_parts, tpwgts, ubvec, options, &edgecut, part); ++ { ++ indextype metis_nrows = (indextype) NrowsMETIS; ++ indextype metis_nparts = (indextype) N_parts; ++ METIS_PartGraphRecursive (&metis_nrows, &numBalancingConstraints, xadj, adjncy, ++ vwgt, vsize, adjwgt, &metis_nparts, tpwgts, ubvec, options, &edgecut, part); ++ } + # endif + } else { + +@@ -2345,8 +2350,12 @@ + vsize = NULL; + tpwgts = NULL; + ubvec = NULL; +- METIS_PartGraphKway (&NrowsMETIS, &numBalancingConstraints, xadj, adjncy, +- vwgt, vsize, adjwgt, &N_parts, tpwgts, ubvec, options, &edgecut, part); ++ { ++ indextype metis_nrows = (indextype) NrowsMETIS; ++ indextype metis_nparts = (indextype) N_parts; ++ METIS_PartGraphKway (&metis_nrows, &numBalancingConstraints, xadj, adjncy, ++ vwgt, vsize, adjwgt, &metis_nparts, tpwgts, ubvec, options, &edgecut, part); ++ } + # endif + } + #else diff --git a/scripts/spack_packages/packages/trilinos/package.py b/scripts/spack_packages/packages/trilinos/package.py index f3f90123..43fbf43d 100644 --- a/scripts/spack_packages/packages/trilinos/package.py +++ b/scripts/spack_packages/packages/trilinos/package.py @@ -415,6 +415,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): # patch('xlf_seacas.patch', when='@12.10.1:12.12.1 %' + _compiler) # patch('xlf_tpetra.patch', when='@12.12.1 %' + _compiler) patch('fix_clang_errors_12_18_1.patch', when='@12.18.1%clang') + patch('fix_ml_metis_idx_t.patch', when='@16.1.0 +ml ^metis+int64') #patch('cray_secas_12_12_1.patch', when='@12.12.1%cce') patch('cray_secas.patch', when='@12.14.1:%cce') From 18294525c2d57550bba6f49c307a81c7f1180edb Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Sat, 30 May 2026 16:42:17 -0700 Subject: [PATCH 03/11] another attempt at a patch --- .../trilinos/fix_ml_metis_idx_t.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/scripts/spack_packages/packages/trilinos/fix_ml_metis_idx_t.patch b/scripts/spack_packages/packages/trilinos/fix_ml_metis_idx_t.patch index 8e1e493e..950f6e4d 100644 --- a/scripts/spack_packages/packages/trilinos/fix_ml_metis_idx_t.patch +++ b/scripts/spack_packages/packages/trilinos/fix_ml_metis_idx_t.patch @@ -189,3 +189,40 @@ diff -Naur a/packages/ml/src/Coarsen/ml_agg_VBMETIS.c b/packages/ml/src/Coarsen/ # endif } #else +diff -Naur a/packages/ml/src/Operator/ml_op_utils.c b/packages/ml/src/Operator/ml_op_utils.c +--- a/packages/ml/src/Operator/ml_op_utils.c 2025-03-19 14:59:00 ++++ b/packages/ml/src/Operator/ml_op_utils.c 2026-05-30 15:11:07 +@@ -461,3 +461,4 @@ +- indextype *vtxdist = NULL, *tpwts = NULL, *adjncy = NULL, *xadj = NULL, *node_wt = NULL; ++ indextype *vtxdist = NULL, *adjncy = NULL, *xadj = NULL, *node_wt = NULL; + int *map = NULL, *bindx = NULL, *blks = NULL, nprocs, myid, j, ii, jj; ++ int *vtxdist_int = NULL, *tpwts_int = NULL; + int allocated = 0, row_length, itemp1, itemp2, Nrows; +@@ -741,7 +742,13 @@ +- tpwts = (indextype *) ML_allocate(sizeof(indextype)*ML_max(*nblks,nprocs)); + vtxdist = (indextype *) ML_allocate(sizeof(indextype)*(nprocs+1)); ++ vtxdist_int = (int *) ML_allocate(sizeof(int)*nprocs); ++ tpwts_int = (int *) ML_allocate(sizeof(int)*nprocs); + for (ii = 0; ii <= nprocs; ii++) vtxdist[ii] = 0; +- vtxdist[myid] = n; +- ML_gsum_vec_int(&vtxdist,&tpwts,nprocs,matrix->comm); +- ++ for (ii = 0; ii < nprocs; ii++) vtxdist_int[ii] = 0; ++ vtxdist_int[myid] = n; ++ ML_gsum_vec_int(&vtxdist_int,&tpwts_int,nprocs,matrix->comm); ++ for (ii = 0; ii < nprocs; ii++) vtxdist[ii] = (indextype) vtxdist_int[ii]; ++ ML_free(vtxdist_int); ++ ML_free(tpwts_int); ++ vtxdist_int = NULL; ++ tpwts_int = NULL; + itemp1 = 0; +@@ -865,8 +873,9 @@ + if (bindx != NULL) ML_free(bindx); + if (blks != NULL) ML_free(blks); + if (vtxdist != NULL) ML_free(vtxdist); +- if (tpwts != NULL) ML_free(tpwts); ++ if (vtxdist_int != NULL) ML_free(vtxdist_int); ++ if (tpwts_int != NULL) ML_free(tpwts_int); + if (adjncy != NULL) ML_free(adjncy); + if (xadj != NULL) ML_free(xadj); + if (node_wt != NULL) ML_free(node_wt); From a10ef8a78afc34e2e7713aff7a177641a2f20997 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Sun, 31 May 2026 13:26:10 -0700 Subject: [PATCH 04/11] workaround for cce compiler issue with gsl. make all builds include hypredrive --- scripts/setupLC-TPL-uberenv.bash | 23 ++++++++----------- .../packages/hypredrive/package.py | 3 ++- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/scripts/setupLC-TPL-uberenv.bash b/scripts/setupLC-TPL-uberenv.bash index e5f064ae..96fbe571 100755 --- a/scripts/setupLC-TPL-uberenv.bash +++ b/scripts/setupLC-TPL-uberenv.bash @@ -89,27 +89,24 @@ function launch_jobs() { case "$machine" in dane) ALLOC_CMD="srun -N 1 --exclusive -t 60 -A vortex" - "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-12 "+docs %%gcc-12 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-13 "+docs %%gcc-13 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-13-hypredrive "+docs +hypredrive %%gcc-13 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-14 "+docs %%clang-14 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-19 "+docs %%clang-19 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-12 "+docs +hypredrive %%gcc-12 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-13 "+docs +hypredrive %%gcc-13 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-14 "+docs +hypredrive %%clang-14 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-19 "+docs +hypredrive %%clang-19 ${COMMON}" "${ALLOC_CMD}" "$@" & ;; matrix) ALLOC_CMD="srun -N 1 --exclusive -t 60 -A vortex" - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-12-cuda-12.6 "+cuda ~uncrustify cuda_arch=90 %%gcc-12 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9 "+cuda ~uncrustify cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9-hypredrive "+cuda ~uncrustify +hypredrive cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-14-cuda-12.6 "+cuda ~uncrustify cuda_arch=90 %%clang-14 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-19-cuda-12.9 "+cuda ~uncrustify cuda_arch=90 %%clang-19 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-12-cuda-12.6 "+cuda ~uncrustify +hypredrive cuda_arch=90 %%gcc-12 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9 "+cuda ~uncrustify +hypredrive cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-14-cuda-12.6 "+cuda ~uncrustify +hypredrive cuda_arch=90 %%clang-14 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-19-cuda-12.9 "+cuda ~uncrustify +hypredrive cuda_arch=90 %%clang-19 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & ;; tuo|tuolumne) ALLOC_CMD="salloc -N 1 --exclusive -p pdebug -t 60 -A vortex" - "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne cce-20-rocm-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs amdgpu_target=gfx942 %%cce-20 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne llvm-amdgpu-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs amdgpu_target=gfx942 %%llvm-amdgpu_6_4_3 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne llvm-amdgpu-6.4.3-hypredrive "+rocm~pygeosx~trilinos~petsc~docs+hypredrive amdgpu_target=gfx942 %%llvm-amdgpu_6_4_3 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne cce-20-rocm-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs+hypredrive amdgpu_target=gfx942 %%cce-20 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne llvm-amdgpu-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs+hypredrive amdgpu_target=gfx942 %%llvm-amdgpu_6_4_3 ${COMMON}" "${ALLOC_CMD}" "$@" & ;; *) diff --git a/scripts/spack_packages/packages/hypredrive/package.py b/scripts/spack_packages/packages/hypredrive/package.py index 51a1a6cb..5f78432a 100644 --- a/scripts/spack_packages/packages/hypredrive/package.py +++ b/scripts/spack_packages/packages/hypredrive/package.py @@ -47,6 +47,7 @@ class Hypredrive(CMakePackage): def cmake_args(self): spec = self.spec from_variant = self.define_from_variant + pic_enabled = "+pic" in spec or "+shared" in spec args = [ from_variant("BUILD_SHARED_LIBS", "shared"), @@ -54,7 +55,7 @@ def cmake_args(self): from_variant("HYPREDRV_ENABLE_HWLOC", "hwloc"), from_variant("HYPREDRV_ENABLE_CALIPER", "caliper"), from_variant("HYPREDRV_ENABLE_COMPRESSION", "compression"), - from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), + self.define("CMAKE_POSITION_INDEPENDENT_CODE", pic_enabled), self.define("HYPRE_ROOT", spec["hypre"].prefix), self.define("HYPREDRV_ENABLE_TESTING", self.run_tests), self.define("HYPREDRV_ENABLE_COVERAGE", False), From 02bd3bfc31dad6604aaaf1807a9a239d7db2414a Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Sun, 31 May 2026 18:40:55 -0700 Subject: [PATCH 05/11] set hypredrive default to on --- scripts/spack_packages/packages/geosx/package.py | 2 +- scripts/spack_packages/packages/gsl/package.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 scripts/spack_packages/packages/gsl/package.py diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index ddd992c6..f877dcfe 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -67,7 +67,7 @@ class Geosx(CMakePackage, CudaPackage, ROCmPackage): variant('vtk', default=True, description='Build VTK support.') variant('trilinos', default=True, description='Build Trilinos support.') variant('hypre', default=True, description='Build HYPRE support.') - variant('hypredrive', default=False, description='Build hypredrive support.') + variant('hypredrive', default=True, description='Build hypredrive support.') variant('petsc', default=False, description='Build PETSc support.') variant('scotch', default=True, description='Build Scotch support.') variant('uncrustify', default=True, description='Build Uncrustify support.') diff --git a/scripts/spack_packages/packages/gsl/package.py b/scripts/spack_packages/packages/gsl/package.py new file mode 100644 index 00000000..ccbca842 --- /dev/null +++ b/scripts/spack_packages/packages/gsl/package.py @@ -0,0 +1,9 @@ +from spack.package import * +from spack_repo.builtin.packages.gsl.package import Gsl as BuiltinGsl + + +class Gsl(BuiltinGsl): + def setup_build_environment(self, env): + # Avoid a cce@20.0.0 optimizer crash in gsl matrix/minmax.c at -O2. + if self.spec.satisfies("@2.8 %cce@20.0.0"): + env.append_flags("CFLAGS", "-O1") \ No newline at end of file From ccadae0a664065118a228ac535c0a9101e3410c8 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Sun, 31 May 2026 18:45:05 -0700 Subject: [PATCH 06/11] remove +hypredrive images since they are all +hypredrive by default --- .github/workflows/docker_build_tpls.yml | 33 ------------------------- 1 file changed, 33 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index aa561125..22333d22 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -42,15 +42,6 @@ jobs: GCC_VERSION: 13 SPEC: "~pygeosx +docs %gcc-13" - - name: Ubuntu 24.04 - gcc 13 (+docs +hypredrive) - RUNS_ON: ubuntu-latest - TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile - DOCKER_BASE_IMAGE_TAG: 24.04-gcc13 - DOCKER_BASE_IMAGE_REPO: geosx/ubuntu - DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13-hypredrive - GCC_VERSION: 13 - SPEC: "~pygeosx +docs +hypredrive %gcc-13" - - name: Ubuntu 24.04 - clang 19 RUNS_ON: ubuntu-latest TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile @@ -86,14 +77,6 @@ jobs: DOCKER_REPOSITORY: geosx/rockylinux8-gcc13 SPEC: "~pygeosx ~docs %gcc-13" - - name: Rocky Linux 8 - gcc 13 (+hypredrive) - RUNS_ON: ubuntu-latest - TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile - DOCKER_BASE_IMAGE_TAG: 8-gcc13 - DOCKER_BASE_IMAGE_REPO: geosx/rockylinux - DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-hypredrive - SPEC: "~pygeosx ~docs +hypredrive %gcc-13" - - name: Rocky Linux 8 - clang 19 RUNS_ON: ubuntu-latest TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile @@ -120,14 +103,6 @@ jobs: GCC_VERSION: 13 SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" - - name: Ubuntu 24.04 - gcc 13 + CUDA 12.9.1 (+hypredrive) - RUNS_ON: streak2 - TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile - DOCKER_BASE_IMAGE_TAG: 24.04-gcc13-cuda12.9.1 - DOCKER_BASE_IMAGE_REPO: geosx/ubuntu - DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13-cuda12.9.1-hypredrive - GCC_VERSION: 13 - SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs +hypredrive %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" # CUDA 13 is blocked by the pinned RAJA package: # raja: '^cuda@13:' conflicts with '+cuda' @@ -166,14 +141,6 @@ jobs: DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1 SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" - - name: Rocky Linux 8 - gcc 13 + CUDA 12.9.1 (+hypredrive) - RUNS_ON: streak2 - TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile - DOCKER_BASE_IMAGE_TAG: 8-gcc13-cuda12.9.1 - DOCKER_BASE_IMAGE_REPO: geosx/rockylinux - DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1-hypredrive - SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs +hypredrive %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" - # Rocky8 clang19 CUDA 12.9.1 is blocked by SuperLU_DIST using # C++11 with CUDA 12.9 + clang19 + GCC 14 libstdc++. # - name: Rocky Linux 8 - clang 19 + CUDA 12.9.1 From 7691fcd9f416a94a8bbd07a2375ddcd788663e19 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Mon, 1 Jun 2026 10:36:13 -0700 Subject: [PATCH 07/11] Apply suggestions from code review Co-authored-by: Victor A. P. Magri <50467563+victorapm@users.noreply.github.com> --- scripts/setupLC-TPL-uberenv.bash | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/setupLC-TPL-uberenv.bash b/scripts/setupLC-TPL-uberenv.bash index 96fbe571..b49bb3fc 100755 --- a/scripts/setupLC-TPL-uberenv.bash +++ b/scripts/setupLC-TPL-uberenv.bash @@ -89,18 +89,18 @@ function launch_jobs() { case "$machine" in dane) ALLOC_CMD="srun -N 1 --exclusive -t 60 -A vortex" - "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-12 "+docs +hypredrive %%gcc-12 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-13 "+docs +hypredrive %%gcc-13 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-14 "+docs +hypredrive %%clang-14 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-19 "+docs +hypredrive %%clang-19 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-12 "+docs %%gcc-12 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-13 "+docs %%gcc-13 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-14 "+docs %%clang-14 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-19 "+docs %%clang-19 ${COMMON}" "${ALLOC_CMD}" "$@" & ;; matrix) ALLOC_CMD="srun -N 1 --exclusive -t 60 -A vortex" - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-12-cuda-12.6 "+cuda ~uncrustify +hypredrive cuda_arch=90 %%gcc-12 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9 "+cuda ~uncrustify +hypredrive cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-14-cuda-12.6 "+cuda ~uncrustify +hypredrive cuda_arch=90 %%clang-14 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-19-cuda-12.9 "+cuda ~uncrustify +hypredrive cuda_arch=90 %%clang-19 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-12-cuda-12.6 "+cuda ~uncrustify cuda_arch=90 %%gcc-12 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9 "+cuda ~uncrustify cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-14-cuda-12.6 "+cuda ~uncrustify cuda_arch=90 %%clang-14 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-19-cuda-12.9 "+cuda ~uncrustify cuda_arch=90 %%clang-19 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & ;; tuo|tuolumne) From 715fdbc2b1f07f5df74814da3eaccf8caeee7cb9 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Mon, 1 Jun 2026 10:54:17 -0700 Subject: [PATCH 08/11] Apply suggestion from @rrsettgast --- scripts/setupLC-TPL-uberenv.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/setupLC-TPL-uberenv.bash b/scripts/setupLC-TPL-uberenv.bash index b49bb3fc..e884717b 100755 --- a/scripts/setupLC-TPL-uberenv.bash +++ b/scripts/setupLC-TPL-uberenv.bash @@ -105,8 +105,8 @@ function launch_jobs() { tuo|tuolumne) ALLOC_CMD="salloc -N 1 --exclusive -p pdebug -t 60 -A vortex" - "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne cce-20-rocm-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs+hypredrive amdgpu_target=gfx942 %%cce-20 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne llvm-amdgpu-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs+hypredrive amdgpu_target=gfx942 %%llvm-amdgpu_6_4_3 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne cce-20-rocm-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs amdgpu_target=gfx942 %%cce-20 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne llvm-amdgpu-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs amdgpu_target=gfx942 %%llvm-amdgpu_6_4_3 ${COMMON}" "${ALLOC_CMD}" "$@" & ;; *) From e92e81b336f778e8e3ce20556923496daf62b2e0 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 31 Jul 2026 21:58:48 -0700 Subject: [PATCH 09/11] Remove ADIOS2 from GEOS TPL builds --- scripts/spack_configs/macOS/spack.yaml | 2 +- .../packages/adios2/2.10-enable-rocm6.patch | 28 -- .../2.7-fix-missing-cstdint-include.patch | 24 - ....1-fix-broken-endian-reverse-compile.patch | 24 - ...9.2-cmake-find-threads-package-first.patch | 36 -- .../spack_packages/packages/adios2/package.py | 475 ------------------ .../spack_packages/packages/geosx/package.py | 10 - .../spack_packages/packages/gsl/package.py | 9 - 8 files changed, 1 insertion(+), 607 deletions(-) delete mode 100644 scripts/spack_packages/packages/adios2/2.10-enable-rocm6.patch delete mode 100644 scripts/spack_packages/packages/adios2/2.7-fix-missing-cstdint-include.patch delete mode 100644 scripts/spack_packages/packages/adios2/2.7.1-fix-broken-endian-reverse-compile.patch delete mode 100644 scripts/spack_packages/packages/adios2/2.9.2-cmake-find-threads-package-first.patch delete mode 100644 scripts/spack_packages/packages/adios2/package.py delete mode 100644 scripts/spack_packages/packages/gsl/package.py diff --git a/scripts/spack_configs/macOS/spack.yaml b/scripts/spack_configs/macOS/spack.yaml index bdbe36d1..693e973b 100644 --- a/scripts/spack_configs/macOS/spack.yaml +++ b/scripts/spack_configs/macOS/spack.yaml @@ -110,7 +110,7 @@ spack: buildable: false externals: - spec: perl@5.34.1 - prefix: /usr + prefix: /opt/homebrew/opt/perl pkg-config: buildable: false externals: diff --git a/scripts/spack_packages/packages/adios2/2.10-enable-rocm6.patch b/scripts/spack_packages/packages/adios2/2.10-enable-rocm6.patch deleted file mode 100644 index abd69a9d..00000000 --- a/scripts/spack_packages/packages/adios2/2.10-enable-rocm6.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c718e99a9e226b7327ab41396823873999206e38 Mon Sep 17 00:00:00 2001 -From: Vicente Adolfo Bolea Sanchez -Date: Thu, 27 Jun 2024 18:25:58 -0400 -Subject: [PATCH] kokkos: support ROCM >=6 - ---- - source/adios2/helper/kokkos/adiosKokkos.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/source/adios2/helper/kokkos/adiosKokkos.cpp b/source/adios2/helper/kokkos/adiosKokkos.cpp -index e0599944e..d2619f0d4 100644 ---- a/source/adios2/helper/kokkos/adiosKokkos.cpp -+++ b/source/adios2/helper/kokkos/adiosKokkos.cpp -@@ -85,7 +85,11 @@ bool IsGPUbuffer(const void *ptr) - hipError_t ret; - hipPointerAttribute_t attr; - ret = hipPointerGetAttributes(&attr, ptr); -+#if defined(ROCM_VERSION_MAJOR) && ROCM_VERSION_MAJOR < 6 - if (ret == hipSuccess && attr.memoryType == hipMemoryTypeDevice) -+#else -+ if (ret == hipSuccess && attr.type == hipMemoryTypeDevice) -+#endif - { - return true; - } --- -2.35.3 - diff --git a/scripts/spack_packages/packages/adios2/2.7-fix-missing-cstdint-include.patch b/scripts/spack_packages/packages/adios2/2.7-fix-missing-cstdint-include.patch deleted file mode 100644 index 6b90d210..00000000 --- a/scripts/spack_packages/packages/adios2/2.7-fix-missing-cstdint-include.patch +++ /dev/null @@ -1,24 +0,0 @@ -From abbe0f81d78403a62444b1a76222b9a226fd17c6 Mon Sep 17 00:00:00 2001 -From: Vicente Adolfo Bolea Sanchez -Date: Mon, 22 Apr 2024 20:52:49 -0700 -Subject: [PATCH] fix py11bind stdint dep - ---- - thirdparty/pybind11/pybind11/include/pybind11/pybind11.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h b/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h -index fa98f7c18..6992c3d55 100644 ---- a/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h -+++ b/thirdparty/pybind11/pybind11/include/pybind11/pybind11.h -@@ -47,6 +47,7 @@ - #include "detail/class.h" - #include "detail/init.h" - -+#include - #include - #include - #include --- -2.35.3 - diff --git a/scripts/spack_packages/packages/adios2/2.7.1-fix-broken-endian-reverse-compile.patch b/scripts/spack_packages/packages/adios2/2.7.1-fix-broken-endian-reverse-compile.patch deleted file mode 100644 index 669eb1b2..00000000 --- a/scripts/spack_packages/packages/adios2/2.7.1-fix-broken-endian-reverse-compile.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 5aed0d5c3ecb7afbd56a786243b2bc8811e0fbdd Mon Sep 17 00:00:00 2001 -From: Axel Huebl -Date: Fri, 14 May 2021 18:22:19 -0700 -Subject: [PATCH] Fix Broken Endinage Reverse Compile - -Add right type in comparison. ---- - source/adios2/helper/adiosMemory.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/source/adios2/helper/adiosMemory.cpp b/source/adios2/helper/adiosMemory.cpp -index c3a4246a91..3bf8c89adc 100644 ---- a/source/adios2/helper/adiosMemory.cpp -+++ b/source/adios2/helper/adiosMemory.cpp -@@ -29,7 +29,7 @@ void CopyPayloadStride(const char *src, const size_t payloadStride, char *dest, - #ifdef ADIOS2_HAVE_ENDIAN_REVERSE - if (endianReverse) - { -- if (destType == "") -+ if (destType == DataType::None) - { - } - #define declare_type(T) \ - diff --git a/scripts/spack_packages/packages/adios2/2.9.2-cmake-find-threads-package-first.patch b/scripts/spack_packages/packages/adios2/2.9.2-cmake-find-threads-package-first.patch deleted file mode 100644 index afc6808d..00000000 --- a/scripts/spack_packages/packages/adios2/2.9.2-cmake-find-threads-package-first.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 80e4739fb53b0b7e02dae48b928d8b8247992763 Mon Sep 17 00:00:00 2001 -From: Vicente Adolfo Bolea Sanchez -Date: Thu, 2 Nov 2023 12:18:49 -0400 -Subject: [PATCH] cmake: find threads package first - ---- - cmake/DetectOptions.cmake | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake -index 3f511e02a..615995b71 100644 ---- a/cmake/DetectOptions.cmake -+++ b/cmake/DetectOptions.cmake -@@ -67,6 +67,9 @@ function(lists_get_prefix listVars outVar) - set(${outVar} "${prefix}" PARENT_SCOPE) - endfunction() - -+# Multithreading -+find_package(Threads REQUIRED) -+ - # Blosc2 - if(ADIOS2_USE_Blosc2 STREQUAL AUTO) - # Prefect CONFIG mode -@@ -554,9 +557,6 @@ if(AWSSDK_FOUND) - set(ADIOS2_HAVE_AWSSDK TRUE) - endif() - --# Multithreading --find_package(Threads REQUIRED) -- - # Floating point detection - include(CheckTypeRepresentation) - --- -2.35.3 - diff --git a/scripts/spack_packages/packages/adios2/package.py b/scripts/spack_packages/packages/adios2/package.py deleted file mode 100644 index a0950bfa..00000000 --- a/scripts/spack_packages/packages/adios2/package.py +++ /dev/null @@ -1,475 +0,0 @@ -# Copyright Spack Project Developers. See COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import os -import sys - -from spack_repo.builtin.build_systems.cmake import CMakeBuilder, CMakePackage -from spack_repo.builtin.build_systems.cuda import CudaPackage -from spack_repo.builtin.build_systems.rocm import ROCmPackage - -from spack.package import * - -IS_WINDOWS = sys.platform == "win32" - - -class Adios2(CMakePackage, CudaPackage, ROCmPackage): - """The Adaptable Input Output System version 2, - developed in the Exascale Computing Program""" - - homepage = "https://adios2.readthedocs.io" - url = "https://github.com/ornladios/ADIOS2/archive/v2.8.0.tar.gz" - git = "https://github.com/ornladios/ADIOS2.git" - test_requires_compiler = True - - maintainers("ax3l", "vicentebolea", "williamfgc") - - tags = ["e4s"] - - license("Apache-2.0") - - version("master", branch="master") - version("2.12.1", sha256="71edd8f721448311852122fca8d83ae497b43846e5bfcdfd275dc06bb7f3d0c5") - version("2.12.0", sha256="c59aeb75f3ea9949c4ae2d597115536ee593dedb50592784917ba8d29c8a3b34") - version("2.11.0", sha256="0a2bd745e3f39745f07587e4a5f92d72f12fa0e2be305e7957bdceda03735dbf") - version("2.10.2", sha256="14cf0bcd94772194bce0f2c0e74dba187965d1cffd12d45f801c32929158579e") - version("2.10.1", sha256="ce776f3a451994f4979c6bd6d946917a749290a37b7433c0254759b02695ad85") - version("2.10.0", sha256="e5984de488bda546553dd2f46f047e539333891e63b9fe73944782ba6c2d95e4") - version("2.9.2", sha256="78309297c82a95ee38ed3224c98b93d330128c753a43893f63bbe969320e4979") - version("2.9.1", sha256="ddfa32c14494250ee8a48ef1c97a1bf6442c15484bbbd4669228a0f90242f4f9") - version("2.9.0", sha256="69f98ef58c818bb5410133e1891ac192653b0ec96eb9468590140f2552b6e5d1") - version("2.8.3", sha256="4906ab1899721c41dd918dddb039ba2848a1fb0cf84f3a563a1179b9d6ee0d9f") - version("2.8.2", sha256="9909f6409dc44b2c28c1fda0042dab4b711f25ec3277ef0cb6ffc40f5483910d") - version("2.8.1", sha256="3f515b442bbd52e3189866b121613fe3b59edb8845692ea86fad83d1eba35d93") - version("2.8.0", sha256="5af3d950e616989133955c2430bd09bcf6bad3a04cf62317b401eaf6e7c2d479") - version("2.7.1", sha256="c8e237fd51f49d8a62a0660db12b72ea5067512aa7970f3fcf80b70e3f87ca3e") - - # There's not really any consistency about how static and shared libs are - # implemented across spack. What we're trying to support is specifically three - # library build types: - # shared (which is implicitly w/ pic) - # Implemented by +shared +pic - # static w/o pic - # Implemented by ~shared ~pic - # static w/ pic - # Implemented by ~shared +pic - # shared w/o pic is not a valid configuration because shared libraries are Position - # Independent # Code by design. We're not inherently tied to this approach and can - # change how we're supporting differnt library types in the package at anytime if - # spack decides on a standardized way of doing it across packages - variant("shared", default=True, when="+pic", description="Build shared libraries") - - # Features - variant("mpi", default=True, description="Enable MPI") - - # Compression libraries - variant( - "libpressio", default=False, when="@2.8:", description="Enable LibPressio for compression" - ) - variant("blosc", default=True, when="@2.4:2.8", description="Enable Blosc compression") - variant("blosc2", default=True, when="@2.9:", description="Enable Blosc2 compression") - variant("bzip2", default=True, description="Enable BZip2 compression") - variant("zfp", default=True, description="Enable ZFP compression") - variant("png", default=True, description="Enable PNG compression") - variant("sz", default=True, description="Enable SZ2 compression") - variant("sz3", default=True, when="@2.12:", description="Enable SZ3 compression") - variant("mgard", default=not IS_WINDOWS, when="@2.8:", description="Enable MGARD compression") - - # Transport engines - variant("sst", default=True, description="Enable the SST staging engine") - variant( - "dataman", - default=False, - when="+shared", - description="Enable the DataMan engine for WAN transports", - ) - variant("campaign", default=False, when="@2.10:", description="Enable campaign management") - variant("dataspaces", default=False, description="Enable support for DATASPACES") - variant("ssc", default=True, when="@:2.7", description="Enable the SSC staging engine") - variant("hdf5", default=False, description="Enable the HDF5 engine") - variant( - "aws", - default=False, - when="@2.9:", - description="Enable support for S3 compatible storage using AWS SDK's S3 module", - ) - variant( - "libcatalyst", - default=not IS_WINDOWS, - when="@2.9:", - description="Enable support for in situ visualization plugin using ParaView Catalyst", - ) - - variant("xrootd", default=True, description="Enable the XRootD") - - # Optional language bindings, C++11 and C always provided - variant("kokkos", default=False, when="@2.9:", description="Enable Kokkos support") - variant("sycl", default=False, when="@2.10:", description="Enable SYCL support") - variant("python", default=False, description="Enable the Python bindings") - variant("fortran", default=True, description="Enable the Fortran bindings") - - # Requires mature C++11 implementations - conflicts("%gcc@:4.7") - conflicts("%intel@:15") - - # ifx does not support submodules in separate files - conflicts("%oneapi@:2022.1.0", when="+fortran") - - # https://github.com/ornladios/ADIOS2/issues/4620 - conflicts("%cuda@13:", when="@:2.11 +cuda") - - depends_on("c", type="build") - depends_on("cxx", type="build") - depends_on("fortran", type="build", when="+fortran") - - depends_on("cmake@3.12.0:", type="build") - - depends_on("yaml-cpp") - depends_on("yaml-cpp@0.7.0:", when="@2.9:") - depends_on("nlohmann-json") - depends_on("pugixml@1.10:") - - # Standalone CUDA support - depends_on("cuda", when="+cuda ~kokkos") - - depends_on("py-nanobind", when="@2.12: +python") - - # Kokkos support - with when("+kokkos"): - depends_on("kokkos@3.7:") - depends_on("kokkos +cuda +wrapper", when="+cuda") - depends_on("kokkos +rocm", when="+rocm") - depends_on("kokkos +sycl", when="+sycl") - - # Propagate CUDA target to kokkos for +cuda - for cuda_arch in CudaPackage.cuda_arch_values: - depends_on( - "kokkos cuda_arch=%s" % cuda_arch, when="+kokkos +cuda cuda_arch=%s" % cuda_arch - ) - - # Propagate AMD GPU target to kokkos for +rocm - for amdgpu_value in ROCmPackage.amdgpu_targets: - depends_on( - "kokkos amdgpu_target=%s" % amdgpu_value, - when="+kokkos +rocm amdgpu_target=%s" % amdgpu_value, - ) - - conflicts("+cuda", when="@:2.7") - conflicts("+rocm", when="@:2.8") - - conflicts("+cuda", when="+sycl") - conflicts("+rocm", when="+cuda") - conflicts("+rocm", when="+sycl") - - conflicts("+rocm", when="~kokkos", msg="ADIOS2 does not support HIP without Kokkos") - conflicts("+sycl", when="~kokkos", msg="ADIOS2 does not support SYCL without Kokkos") - - for _platform in ["linux", "darwin"]: - depends_on("pkgconfig", type="build", when=f"platform={_platform}") - variant( - "pic", - default=False, - description="Build pic-enabled static libraries", - when=f"platform={_platform}", - ) - # libffi and libfabric and not currently supported on Windows - # see Paraview's superbuild handling of libfabric at - # https://gitlab.kitware.com/paraview/paraview-superbuild/-/blob/master/projects/adios2.cmake#L3 - depends_on("libffi", when=f"+sst platform={_platform}") # optional in DILL - depends_on( - "libfabric@1.6.0:", when=f"+sst platform={_platform}" - ) # optional in EVPath and SST - # depends_on('bison', when='+sst') # optional in FFS, broken package - # depends_on('flex', when='+sst') # optional in FFS, depends on BISON - - depends_on("mpi", when="+mpi") - depends_on("libzmq", when="+dataman") - depends_on("dataspaces@1.8.0:", when="+dataspaces") - - depends_on("hdf5@:1.12", when="@:2.8 +hdf5") - depends_on("hdf5@1.12:", when="@2.9: +hdf5") - depends_on("hdf5~mpi", when="+hdf5~mpi") - depends_on("hdf5+mpi", when="+hdf5+mpi") - - depends_on("sqlite@3", when="+campaign") - - depends_on("libpressio", when="+libpressio") - depends_on("c-blosc", when="+blosc") - depends_on("c-blosc2", when="+blosc2") - depends_on("bzip2", when="+bzip2") - depends_on("libpng@1.6:", when="+png") - depends_on("zfp@0.5.1:0.5", when="+zfp") - depends_on("sz@2.0.2.0:", when="+sz") - depends_on("sz3", when="+sz3") - depends_on("mgard@compat-2022-11-18:", when="+mgard") - depends_on("mgard@compat-2023-01-10:", when="@2.9: +mgard") - - extends("python", when="+python") - depends_on("python", when="+python", type=("build", "run")) - depends_on("python@3.5:3.10", when="@:2.7 +python", type=("build", "run")) - depends_on("python@3.8:", when="@2.10: +python", type=("build", "run")) - - depends_on("python", type="test") - depends_on("python@3.5:3.10", when="@:2.7", type="test") - - depends_on("py-numpy@1.6.1:", when="+python", type=("build", "run")) - depends_on("py-mpi4py@2.0.0:", when="+mpi +python", type=("build", "run")) - depends_on("aws-sdk-cpp", when="+aws") - depends_on("libcatalyst@2", when="+libcatalyst") - - depends_on("xrootd~davix", when="+xrootd") - - # error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'} - conflicts("^python@3.11:", when="@:2.7") - - # cmake build race condition - patch( - "https://github.com/ornladios/ADIOS2/commit/16869cf18cb4bd07d500c3048c3d34d1611674c7.patch?full_index=1", - when="@2.11.0", - sha256="3af07961975ec6c9023dca182ed19458c021cdf1812d34d9a9e9dad1da60ae75", - ) - - # add missing include - patch("2.7-fix-missing-cstdint-include.patch", when="@2.7") - - # Add missing include - # https://github.com/ornladios/adios2/pull/2710 - patch( - "https://github.com/ornladios/adios2/commit/72363a5ed1015c2bbb1c057d4d6b2e5662de12ec.patch?full_index=1", - when="@2.7.1", - sha256="8221073d1b2f8944395a88a5d60a15c7370646b62f5fc6309867bbb6a8c2096c", - ) - - # Fix mismatched datatypes in comparison - # See https://github.com/ornladios/ADIOS2/pull/2701 - patch("2.7.1-fix-broken-endian-reverse-compile.patch", when="@2.7.1") - - # cmake: find threads package first - # https://github.com/ornladios/ADIOS2/pull/3893 - patch("2.9.2-cmake-find-threads-package-first.patch", when="@2.9") - - # ROCM: enable support for rocm >= 6 - # https://github.com/ornladios/ADIOS2/pull/4214 - patch("2.10-enable-rocm6.patch", when="@2.9.1:2.10.1") - - # Fix issue with GCC 7 - # https://github.com/ornladios/ADIOS2/pull/4591 - patch( - "https://github.com/ornladios/adios2/commit/b7a5957.patch?full_index=1", - sha256="d854008ab27d6ebfa66fffb78126b17713cda3234ed19bf331f85a720e599a32", - when="@2.8:2.10", - ) - - # https://github.com/ornladios/ADIOS2/pull/4729 - patch( - "https://github.com/ornladios/ADIOS2/commit/0bdda7d4729b898397e024010b1e82cb72921501.patch?full_index=1", - sha256="c7214845bc9e4262deb901f9d689236e014f5193018617675bea4bed80ca20aa", - when="@2.11", - ) - - # https://github.com/ornladios/ADIOS2/pull/5006 - # Using a diff rather than patch since the commit is a git subtree commit which does not play - # well with the github .patch URL param - patch( - "https://github.com/ornladios/ADIOS2/compare/98c51cc2207fd178d2f84f493d19710cf21f84c1^1...98c51cc2207fd178d2f84f493d19710cf21f84c1.diff?full_index=1", - sha256="0fe8ecf75eabf975caf5de447ac34084b574f78e73cf83cf158a9e58b692f2e3", - when="@2.12.0", - ) - - @when("%fj") - def patch(self): - """add fujitsu mpi commands #16864""" - f = join_path("cmake", "upstream", "FindMPI.cmake") - filter_file("mpcc_r)", "mpcc_r mpifcc)", f, string=True) - filter_file("mpc++_r)", "mpcc_r mpiFCC)", f, string=True) - filter_file("mpf77_r", "mpf77_r mpifrt", f, string=True) - - def setup_build_environment(self, env: EnvironmentModifications) -> None: - # https://github.com/ornladios/ADIOS2/issues/2228 - if self.spec.satisfies("+fortran %gcc@10:"): - env.set("FFLAGS", "-fallow-argument-mismatch") - elif self.spec.satisfies("+fortran %fj"): - env.set("FFLAGS", "-Ccpp") - - def cmake_args(self): - spec = self.spec - from_variant = self.define_from_variant - - args = [ - from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), - from_variant("BUILD_SHARED_LIBS", "shared"), - from_variant("ADIOS2_USE_AWSSDK", "aws"), - from_variant("ADIOS2_USE_Blosc2", "blosc2"), - from_variant("ADIOS2_USE_Blosc", "blosc"), - from_variant("ADIOS2_USE_BZip2", "bzip2"), - from_variant("ADIOS2_USE_Campaign", "campaign"), - from_variant("ADIOS2_USE_DataMan", "dataman"), - from_variant("ADIOS2_USE_DataSpaces", "dataspaces"), - from_variant("ADIOS2_USE_Fortran", "fortran"), - from_variant("ADIOS2_USE_HDF5", "hdf5"), - from_variant("ADIOS2_USE_MGARD", "mgard"), - from_variant("ADIOS2_USE_MPI", "mpi"), - from_variant("ADIOS2_USE_PNG", "png"), - from_variant("ADIOS2_USE_Python", "python"), - from_variant("ADIOS2_USE_SSC", "ssc"), - from_variant("ADIOS2_USE_SST", "sst"), - from_variant("ADIOS2_USE_SZ3", "sz3"), - from_variant("ADIOS2_USE_SZ", "sz"), - from_variant("ADIOS2_USE_XRootD", "xrootd"), - from_variant("ADIOS2_USE_ZFP", "zfp"), - from_variant("ADIOS2_USE_Catalyst", "libcatalyst"), - from_variant("ADIOS2_USE_LIBPRESSIO", "libpressio"), - self.define("ADIOS2_USE_CUDA", self.spec.satisfies("+cuda ~kokkos")), - self.define("ADIOS2_USE_Kokkos", self.spec.satisfies("+kokkos")), - self.define("Kokkos_ENABLE_CUDA", self.spec.satisfies("+cuda +kokkos")), - self.define("Kokkos_ENABLE_HIP", self.spec.satisfies("+rocm")), - self.define("Kokkos_ENABLE_SYCL", self.spec.satisfies("+sycl")), - self.define("BUILD_TESTING", self.run_tests), - self.define("ADIOS2_BUILD_EXAMPLES", False), - self.define("ADIOS2_USE_Endian_Reverse", True), - self.define("ADIOS2_USE_IME", False), - self.define("ADIOS2_USE_EXTERNAL_YAMLCPP", True), - self.define("ADIOS2_USE_EXTERNAL_NLOHMANN_JSON", True), - self.define("ADIOS2_USE_EXTERNAL_NANOBIND", self.spec.satisfies("@2.12: +python")), - self.define("ADIOS2_USE_EXTERNAL_PUGIXML", True), - ] - - if spec.satisfies("+sst"): - args.extend( - [ - # Broken dependency package - "-DCMAKE_DISABLE_FIND_PACKAGE_BISON=TRUE", - # Depends on ^ - "-DCMAKE_DISABLE_FIND_PACKAGE_FLEX=TRUE", - # Not yet packaged - "-DCMAKE_DISABLE_FIND_PACKAGE_CrayDRC=TRUE", - "-DCMAKE_DISABLE_FIND_PACKAGE_NVSTREAM=TRUE", - ] - ) - - if spec.satisfies("%fj"): - args.extend(["-DCMAKE_Fortran_SUBMODULE_EXT=.smod", "-DCMAKE_Fortran_SUBMODULE_SEP=."]) - - # cuda support - if spec.satisfies("+cuda"): - args.append(CMakeBuilder.define_cuda_architectures(self)) - - # hip support - if spec.satisfies("+rocm"): - args.append(CMakeBuilder.define_hip_architectures(self)) - - if spec.satisfies("+python"): - py_libdir = join_path( - self.prefix.lib, f"python{spec['python'].version.up_to(2)}", "site-packages" - ) - args.append(self.define("CMAKE_INSTALL_PYTHONDIR", py_libdir)) - - return args - - @property - def libs(self): - spec = self.spec - libs_to_seek = set() - - libs_to_seek.add("libadios2_core") - libs_to_seek.add("libadios2_c") - if spec.satisfies("@:2.10"): - libs_to_seek.add("libadios2_cxx11") - else: - libs_to_seek.add("libadios2_cxx") - if spec.satisfies("+fortran"): - libs_to_seek.add("libadios2_fortran") - - if spec.satisfies("+mpi"): - libs_to_seek.add("libadios2_core_mpi") - libs_to_seek.add("libadios2_c_mpi") - if spec.satisfies("@:2.10"): - libs_to_seek.add("libadios2_cxx11_mpi") - else: - libs_to_seek.add("libadios2_cxx_mpi") - if spec.satisfies("+fortran"): - libs_to_seek.add("libadios2_fortran_mpi") - - if "+shared+hdf5" in spec and "@1.12:" in spec["hdf5"]: - libs_to_seek.add("libadios2_h5vol") - - else: - libs_to_seek.add("libadios2") - if spec.satisfies("+fortran"): - libs_to_seek.add("libadios2_fortran") - - return find_libraries( - list(libs_to_seek), root=self.spec.prefix, shared=("+shared" in spec), recursive=True - ) - - def setup_run_environment(self, env: EnvironmentModifications) -> None: - try: - all_libs = self.libs - idx = all_libs.basenames.index("libadios2_h5vol.so") - env.prepend_path("HDF5_PLUGIN_PATH", os.path.dirname(all_libs[idx])) - except ValueError: - pass - - if "+python" in self.spec: - py_libdir = join_path( - self.prefix.lib, f"python{self.spec['python'].version.up_to(2)}", "site-packages" - ) - env.prepend_path("PYTHONPATH", py_libdir) - - @run_after("install") - def setup_install_tests(self): - """ - Copy the example files after the package is installed to an - install test subdirectory for use during `spack test run`. - """ - extra_install_tests = [join_path("testing", "install", "C")] - cache_extra_test_sources(self, extra_install_tests) - - def test_run_executables(self): - """Run installed adios2 executables""" - - commands_and_args = [("bpls", ["-v", "-V"]), ("adios2-config", ["-v"])] - - for cmd, opts in commands_and_args: - with test_part( - self, - f"test_run_executables_{cmd}", - purpose=f"run installed adios2 executable {cmd}", - ): - exe = which(join_path(self.prefix.bin, cmd), required=True) - exe(*opts) - - def test_python(self): - """Test adios2 python""" - if self.spec.satisfies("+python"): - with test_part(self, "test_python_import", purpose="import adios2 in python"): - python = Executable(self.spec["python"].prefix.bin.python) - python(*(["-c", "import adios2; print(adios2.__version__)"])) - - def test_install(self): - """Build and run an install tests""" - srcdir = self.test_suite.current_test_cache_dir.testing.install.C - blddir = self.test_suite.current_test_cache_dir.build_dir - - cmake = Executable(self.spec["cmake"].prefix.bin.cmake) - cmake_args = [] - - if self.spec.satisfies("+mpi"): - mpi_exec = join_path(self.spec["mpi"].prefix, "bin", "mpiexec") - cmake_args.append(f"-DMPIEXEC_EXECUTABLE={mpi_exec}") - - with working_dir(blddir, create=True): - with test_part(self, "test_install_build", purpose="ADIOS2 install test build app"): - cmake(srcdir, *cmake_args) - cmake(*(["--build", "."])) - - for binary in ["adios_c_mpi_test", "adios_adios2c_test", "adios_c_test"]: - exe = which(join_path(".", binary)) - if exe: - with test_part( - self, - f"test_install_run_{binary}", - purpose=f"ADIOS2 install test run {binary}", - ): - exe() diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index f877dcfe..84bae6c1 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -63,7 +63,6 @@ class Geosx(CMakePackage, CudaPackage, ROCmPackage): variant('openmp', default=True, description='Build with OpenMP support.') variant('shared', default=True, description='Build Shared Libs.') variant('caliper', default=True, description='Build Caliper support.') - variant('adios2', default=True, description='Build ADIOS2 support.') variant('vtk', default=True, description='Build VTK support.') variant('trilinos', default=True, description='Build Trilinos support.') variant('hypre', default=True, description='Build HYPRE support.') @@ -144,12 +143,6 @@ class Geosx(CMakePackage, CudaPackage, ROCmPackage): # IO # depends_on('hdf5@1.14.6') - adios2_spec = ( - 'adios2@2.12.1+mpi+hdf5+shared+pic+zfp+sz3~mgard' - '~python~fortran~sst~dataman~dataspaces~campaign~aws~libcatalyst' - '~xrootd~kokkos~cuda~rocm~sycl~libpressio~blosc2~bzip2~png~sz' - ) - depends_on(adios2_spec, when='+adios2') depends_on('silo@4.12.0~fortran~shared~python build_system=cmake') depends_on('conduit@0.9.5 ~test~fortran~hdf5_compat+shared') @@ -526,7 +519,6 @@ def geos_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): io_tpls = ( ('zlib', 'ZLIB', True), ('hdf5', 'HDF5', True), - ('adios2', 'ADIOS2', '+adios2' in spec), ('conduit', 'CONDUIT', True), ('silo', 'SILO', True), ('pugixml', 'PUGIXML', True), @@ -559,8 +551,6 @@ def geos_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): raise KeyError("No zlib provider (zlib/zlib-ng/zlib-api) found in {0}".format(spec)) else: dep_spec = spec[tpl] - if tpl == 'adios2': - cfg.write(cmake_cache_option('ENABLE_ADIOS2', True)) cfg.write(cmake_cache_entry('{}_DIR'.format(cmake_name), dep_spec.prefix)) else: cfg.write(cmake_cache_option('ENABLE_{}'.format(cmake_name), False)) diff --git a/scripts/spack_packages/packages/gsl/package.py b/scripts/spack_packages/packages/gsl/package.py deleted file mode 100644 index ccbca842..00000000 --- a/scripts/spack_packages/packages/gsl/package.py +++ /dev/null @@ -1,9 +0,0 @@ -from spack.package import * -from spack_repo.builtin.packages.gsl.package import Gsl as BuiltinGsl - - -class Gsl(BuiltinGsl): - def setup_build_environment(self, env): - # Avoid a cce@20.0.0 optimizer crash in gsl matrix/minmax.c at -O2. - if self.spec.satisfies("@2.8 %cce@20.0.0"): - env.append_flags("CFLAGS", "-O1") \ No newline at end of file From 5bd04ad8c5a9e9c6906a23f71b8d0968e76e6b80 Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Sat, 1 Aug 2026 13:42:58 -0400 Subject: [PATCH 10/11] Update hypre/hypredrive versions --- scripts/spack_configs/versions.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/spack_configs/versions.yaml b/scripts/spack_configs/versions.yaml index b4f05040..0c84b38d 100644 --- a/scripts/spack_configs/versions.yaml +++ b/scripts/spack_configs/versions.yaml @@ -14,13 +14,13 @@ # This file lists the package versions for geos's dependencies # packages: - # master - 01/23/26 + # master - 08/01/26 hypre: - require: "@git.8b0093306228fef1b92384d9face7fbe5a63b460=master" + require: "@git.857d6e2a8e7ab7d1fc592ac0f1f014774699d0ba=master" - # master - 03/28/26 + # master - 08/01/26 hypredrive: - require: "@git.d062c48cc8d26a9bee92f33f3c588d071c230d30=master" + require: "@git.e3dad076604b5041a8ba74ac2e48647522dda15d=master" # master - 04/12/20 uncrustify: From 589d8f5cba18c98cc8ad47200cec1c15d7eac923 Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Sat, 1 Aug 2026 22:11:06 -0400 Subject: [PATCH 11/11] Update hashes --- scripts/docker-build.sh | 5 +++++ scripts/spack_configs/versions.yaml | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh index 9ab6a3f5..59218646 100644 --- a/scripts/docker-build.sh +++ b/scripts/docker-build.sh @@ -31,7 +31,12 @@ EXTRA_BUILD_ARGS=() if [ -n "${GCC_VERSION}" ]; then EXTRA_BUILD_ARGS+=(--build-arg "GCC_VERSION=${GCC_VERSION}"); fi if [ -n "${CLANG_VERSION}" ]; then EXTRA_BUILD_ARGS+=(--build-arg "CLANG_VERSION=${CLANG_VERSION}"); fi +BUILDER_ARGS=() +if [ -n "${DOCKER_BUILDER:-}" ]; then BUILDER_ARGS+=(--builder "${DOCKER_BUILDER}"); fi +if [ "${DOCKER_LOAD:-0}" = 1 ]; then BUILDER_ARGS+=(--load); fi + docker build --progress=plain \ + "${BUILDER_ARGS[@]}" \ --build-arg HOST_CONFIG=${HOST_CONFIG} \ --build-arg DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE} \ --build-arg INSTALL_DIR=${INSTALL_DIR} \ diff --git a/scripts/spack_configs/versions.yaml b/scripts/spack_configs/versions.yaml index 0c84b38d..08b2ad43 100644 --- a/scripts/spack_configs/versions.yaml +++ b/scripts/spack_configs/versions.yaml @@ -16,11 +16,11 @@ packages: # master - 08/01/26 hypre: - require: "@git.857d6e2a8e7ab7d1fc592ac0f1f014774699d0ba=master" + require: "@git.8df038ce669c623cd403ab77f3b4850fbb622dc9=master" # master - 08/01/26 hypredrive: - require: "@git.e3dad076604b5041a8ba74ac2e48647522dda15d=master" + require: "@git.21a2e3abe2a6f5cd0c6db89ff419f851c3f6c13f=master" # master - 04/12/20 uncrustify: