From 33264e41b3e0b325d852fbd89710a6030238098c Mon Sep 17 00:00:00 2001 From: Brian Han Date: Thu, 1 Feb 2024 08:12:46 -0800 Subject: [PATCH 1/5] Update spack commit, remove chai and umpire recipes --- .uberenv_config.json | 2 +- .../blueos_3_ppc64le_ib_p9/spack.yaml | 18 +- .../spack_configs/toss_4_x86_64_ib/spack.yaml | 9 +- .../spack_packages/packages/chai/package.py | 198 ------------ .../spack_packages/packages/fesapi/package.py | 40 +-- .../spack_packages/packages/geosx/package.py | 4 +- .../spack_packages/packages/umpire/package.py | 299 ------------------ 7 files changed, 42 insertions(+), 528 deletions(-) delete mode 100644 scripts/spack_packages/packages/chai/package.py delete mode 100644 scripts/spack_packages/packages/umpire/package.py diff --git a/.uberenv_config.json b/.uberenv_config.json index 883612c2c25..9bce41d3e6e 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -4,7 +4,7 @@ "package_final_phase": "lvarray_hostconfig", "package_source_dir": "../..", "spack_url": "https://github.com/spack/spack", -"spack_commit": "e8658d6493887ef702dd38f0e9ee5870a1651c1e", +"spack_commit": "2721b4c10d27afde281ea0cdb0480a7343ce0863", "spack_configs_path": "scripts/spack_configs", "spack_packages_path": "scripts/spack_packages/packages", "spack_concretizer": "clingo" diff --git a/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml b/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml index 798f19bff0b..685241bb3aa 100644 --- a/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml +++ b/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml @@ -93,6 +93,9 @@ spack: hypre: require: "@git.57bfb26e268ddf003668c5d0b5938ae258922a83" + chai: + require: "@git.6fe3470ad020303530af2f3dbbfe18826bd3319b=develop" + umpire: require: "@git.4bd9b2ded81d3216b3f62e2aad62d0e34fe2c256=develop" @@ -184,13 +187,18 @@ spack: externals: - spec: libtool@2.4.2 prefix: /usr - bison: - buildable: False - externals: - - spec: bison@3.0.4 - prefix: /usr flex: buildable: False externals: - spec: flex@2.5.37 prefix: /usr + gettext: + buildable: False + externals: + - spec: gettext@0.19.8.1 + prefix: /usr/bin/ + zlib: + buildable: false + externals: + - spec: zlib@1.2.7 + prefix: /usr diff --git a/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml b/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml index 817a6e8199d..d68e623853f 100644 --- a/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml +++ b/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml @@ -74,6 +74,9 @@ spack: hypre: require: "@git.57bfb26e268ddf003668c5d0b5938ae258922a83" + chai: + require: "@git.6fe3470ad020303530af2f3dbbfe18826bd3319b=develop" + umpire: require: "@git.4bd9b2ded81d3216b3f62e2aad62d0e34fe2c256=develop" @@ -170,11 +173,11 @@ spack: externals: - spec: libtool@2.4.6 prefix: /usr - bison: + gettext: buildable: False externals: - - spec: bison@3.0.4 - prefix: /usr + - spec: gettext@0.19.8.1 + prefix: /usr/bin/ flex: buildable: False externals: diff --git a/scripts/spack_packages/packages/chai/package.py b/scripts/spack_packages/packages/chai/package.py deleted file mode 100644 index 6ce16a6a510..00000000000 --- a/scripts/spack_packages/packages/chai/package.py +++ /dev/null @@ -1,198 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import socket - -from spack.package import * - - -class Chai(CachedCMakePackage, CudaPackage, ROCmPackage): - """ - Copy-hiding array interface for data migration between memory spaces - """ - - homepage = "https://github.com/LLNL/CHAI" - git = "https://github.com/LLNL/CHAI.git" - tags = ["ecp", "e4s", "radiuss"] - - maintainers("davidbeckingsale") - - # GEOS_EDIT_START - version("2023.06.0", tag="v2023.06.0", submodules=False) - # GEOS_EDIT_END - - version("develop", branch="develop", submodules=False) - version("main", branch="main", submodules=False) - version("2022.03.0", tag="v2022.03.0", submodules=False) - version("2.4.0", tag="v2.4.0", submodules=True) - version("2.3.0", tag="v2.3.0", submodules=True) - version("2.2.2", tag="v2.2.2", submodules=True) - version("2.2.1", tag="v2.2.1", submodules=True) - version("2.2.0", tag="v2.2.0", submodules=True) - version("2.1.1", tag="v2.1.1", submodules=True) - version("2.1.0", tag="v2.1.0", submodules=True) - version("2.0.0", tag="v2.0.0", submodules=True) - version("1.2.0", tag="v1.2.0", submodules=True) - version("1.1.0", tag="v1.1.0", submodules=True) - version("1.0", tag="v1.0", submodules=True) - - variant("enable_pick", default=False, description="Enable pick method") - variant("shared", default=True, description="Build Shared Libs") - variant("raja", default=False, description="Build plugin for RAJA") - variant("benchmarks", default=False, description="Build benchmarks.") - variant("examples", default=True, description="Build examples.") - variant("openmp", default=False, description="Build using OpenMP") - # TODO: figure out gtest dependency and then set this default True - # and remove the +tests conflict below. - variant("tests", default=False, description="Build tests") - - depends_on("cmake@3.8:", type="build") - depends_on("cmake@3.9:", type="build", when="+cuda") - depends_on("cmake@3.14:", when="@2022.03.0:") - - # GEOS_EDIT_START - depends_on("blt@0.5.3:", type="build", when="@2023.06.0:") - # # GEOS_EDIT_END - depends_on("blt@0.5.0:", type="build", when="@2022.03.0:") - depends_on("blt@0.4.1:", type="build", when="@2.4.0:") - depends_on("blt@0.4.0:", type="build", when="@2.3.0") - depends_on("blt@0.3.6:", type="build", when="@:2.2.2") - - depends_on("umpire") - # GEOS_EDIT_START - depends_on("umpire@2023.06.0:", when="@2023.06.0:") - # GEOS_EDIT_END - depends_on("umpire@2022.03.0:", when="@2022.03.0:") - depends_on("umpire@6.0.0", when="@2.4.0") - depends_on("umpire@4.1.2", when="@2.2.0:2.3.0") - depends_on("umpire@main", when="@main") - - with when("+cuda"): - depends_on("umpire+cuda") - for sm_ in CudaPackage.cuda_arch_values: - depends_on("umpire+cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) - - with when("+rocm"): - depends_on("umpire+rocm") - for arch in ROCmPackage.amdgpu_targets: - depends_on( - "umpire+rocm amdgpu_target={0}".format(arch), when="amdgpu_target={0}".format(arch) - ) - - with when("+raja"): - depends_on("raja~openmp", when="~openmp") - depends_on("raja+openmp", when="+openmp") - depends_on("raja@0.14.0", when="@2.4.0") - depends_on("raja@0.13.0", when="@2.3.0") - depends_on("raja@0.12.0", when="@2.2.0:2.2.2") - depends_on("raja@2022.03.0:", when="@2022.03.0:") - # GEOS_EDIT_START - depends_on("raja@2023.06.0:", when="@2023.06.0:") - # GEOS_EDIT_END - depends_on("raja@main", when="@main") - - with when("+cuda"): - depends_on("raja+cuda") - for sm_ in CudaPackage.cuda_arch_values: - depends_on("raja+cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) - with when("+rocm"): - depends_on("raja+rocm") - for arch in ROCmPackage.amdgpu_targets: - depends_on( - "raja+rocm amdgpu_target={0}".format(arch), - when="amdgpu_target={0}".format(arch), - ) - - conflicts("+benchmarks", when="~tests") - - def _get_sys_type(self, spec): - sys_type = spec.architecture - if "SYS_TYPE" in env: - sys_type = env["SYS_TYPE"] - return sys_type - - @property - def cache_name(self): - hostname = socket.gethostname() - if "SYS_TYPE" in env: - hostname = hostname.rstrip("1234567890") - return "{0}-{1}-{2}@{3}.cmake".format( - hostname, - self._get_sys_type(self.spec), - self.spec.compiler.name, - self.spec.compiler.version, - ) - - def initconfig_compiler_entries(self): - spec = self.spec - entries = super(Chai, self).initconfig_compiler_entries() - if "+rocm" in spec: - entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc)) - return entries - - def initconfig_hardware_entries(self): - spec = self.spec - entries = super(Chai, self).initconfig_hardware_entries() - - entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec)) - - if "+cuda" in spec: - entries.append(cmake_cache_option("ENABLE_CUDA", True)) - # GEOS_EDIT_START - #entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True)) - #entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", True)) - # GEOS_EDIT_END - - if not spec.satisfies("cuda_arch=none"): - cuda_arch = spec.variants["cuda_arch"].value - entries.append(cmake_cache_string("CUDA_ARCH", "sm_{0}".format(cuda_arch[0]))) - entries.append( - cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(cuda_arch[0])) - ) - flag = "-arch sm_{0}".format(cuda_arch[0]) - entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", "{0}".format(flag))) - else: - entries.append(cmake_cache_option("ENABLE_CUDA", False)) - - if "+rocm" in spec: - entries.append(cmake_cache_option("ENABLE_HIP", True)) - entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix))) - archs = self.spec.variants["amdgpu_target"].value - if archs != "none": - arch_str = ",".join(archs) - entries.append( - cmake_cache_string("HIP_HIPCC_FLAGS", "--amdgpu-target={0}".format(arch_str)) - ) - else: - entries.append(cmake_cache_option("ENABLE_HIP", False)) - - return entries - - def initconfig_package_entries(self): - spec = self.spec - entries = [] - - option_prefix = "CHAI_" if spec.satisfies("@2022.03.0:") else "" - - entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix)) - if "+raja" in spec: - entries.append(cmake_cache_option("{}ENABLE_RAJA_PLUGIN".format(option_prefix), True)) - entries.append(cmake_cache_path("RAJA_DIR", spec["raja"].prefix)) - entries.append( - cmake_cache_option("{}ENABLE_PICK".format(option_prefix), "+enable_pick" in spec) - ) - entries.append(cmake_cache_path("umpire_DIR", spec["umpire"].prefix.share.umpire.cmake)) - entries.append(cmake_cache_option("ENABLE_TESTS", "+tests" in spec)) - entries.append(cmake_cache_option("ENABLE_BENCHMARKS", "+benchmarks" in spec)) - entries.append( - cmake_cache_option("{}ENABLE_EXAMPLES".format(option_prefix), "+examples" in spec) - ) - entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec)) - - return entries - - def cmake_args(self): - options = [] - return options diff --git a/scripts/spack_packages/packages/fesapi/package.py b/scripts/spack_packages/packages/fesapi/package.py index 6e95779990f..57a511f82e5 100644 --- a/scripts/spack_packages/packages/fesapi/package.py +++ b/scripts/spack_packages/packages/fesapi/package.py @@ -1,21 +1,21 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import os -import sys - from spack.package import * class Fesapi(CMakePackage): + """Allow access in reading and writing to ENERGISTICS standards data + (mainly RESQML, some of WITSML™ and PRODML)""" - url = "https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.4.0.0.tar.gz" git = "https://github.com/F2I-Consulting/fesapi.git" + url = "https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.4.0.0.tar.gz" version("2.4.0.0", sha256="a711e8a1218c876a2799f4d05a9820da71eb5503b5d51b834fae98d9fe635381") + depends_on("mpi") depends_on("hdf5") depends_on("boost@1.67.0") depends_on("minizip") @@ -26,21 +26,21 @@ def cmake_args(self): cppflags = " ".join(spec.compiler_flags["cppflags"]) cxxflags = cppflags + " ".join(spec.compiler_flags["cxxflags"]) cmake_args = [ - self.define('CMAKE_C_COMPILER', spec['mpi'].mpicc), - self.define('CMAKE_CXX_COMPILER', spec['mpi'].mpicxx), - self.define('CMAKE_CXX_FLAGS', cxxflags), - self.define('HDF5_ROOT', spec['hdf5'].prefix), - # fesAPI/spack can detect wrong version otherwise - self.define('HDF5_VERSION', spec['hdf5'].version), - self.define('MINIZIP_INCLUDE_DIR', spec['minizip'].prefix.include + "/minizip"), - self.define('MINIZIP_LIBRARY_RELEASE', spec['minizip'].prefix.lib), - self.define('Boost_INCLUDE_DIR', spec['boost'].prefix.include), - "-DWITH_EXAMPLE:BOOL=OFF", - "-DWITH_DOTNET_WRAPPING:BOOL=OFF", - "-DWITH_JAVA_WRAPPING:BOOL=OFF", - "-DWITH_PYTHON_WRAPPING:BOOL=OFF", - "-DWITH_RESQML2_2:BOOL=OFF", - "-DWITH_TEST:BOOL=OFF", + self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc), + self.define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx), + self.define("CMAKE_CXX_FLAGS", cxxflags), + self.define("HDF5_ROOT", spec["hdf5"].prefix), + # fesAPI/spack can detect wrong HDF5 version otherwise + self.define("HDF5_VERSION", spec["hdf5"].version), + self.define("MINIZIP_INCLUDE_DIR", spec["minizip"].prefix.include + "/minizip"), + self.define("MINIZIP_LIBRARY_RELEASE", spec["minizip"].prefix.lib), + self.define("Boost_INCLUDE_DIR", spec["boost"].prefix.include), + self.define("WITH_EXAMPLE", "OFF"), + self.define("WITH_DOTNET_WRAPPING", "OFF"), + self.define("WITH_JAVA_WRAPPING", "OFF"), + self.define("WITH_PYTHON_WRAPPING", "OFF"), + self.define("WITH_RESQML2_2", "OFF"), + self.define("WITH_TEST", "OFF"), ] return cmake_args diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index 85548940940..c0d8fc8d60b 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -101,7 +101,7 @@ class Geosx(CMakePackage, CudaPackage): depends_on('umpire +c+openmp~examples+fortran~device_alloc~shared') - depends_on('chai@2023.06.0 +raja+openmp~examples~shared') + depends_on('chai +raja+openmp~examples~shared') depends_on('camp') @@ -109,7 +109,7 @@ class Geosx(CMakePackage, CudaPackage): for sm_ in CudaPackage.cuda_arch_values: depends_on('raja+cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_)) depends_on('umpire+cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_)) - depends_on('chai+cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_)) + depends_on('chai+cuda~separable_compilation cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_)) depends_on('camp+cuda cuda_arch={0}'.format(sm_), when='cuda_arch={0}'.format(sm_)) # diff --git a/scripts/spack_packages/packages/umpire/package.py b/scripts/spack_packages/packages/umpire/package.py deleted file mode 100644 index a37abf7055f..00000000000 --- a/scripts/spack_packages/packages/umpire/package.py +++ /dev/null @@ -1,299 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import os -import socket - -import llnl.util.tty as tty - -from spack.package import * -from spack.pkg.builtin.camp import hip_repair_cache - - -class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage): - """An application-focused API for memory management on NUMA & GPU - architectures""" - - homepage = "https://github.com/LLNL/Umpire" - git = "https://github.com/LLNL/Umpire.git" - tags = ["radiuss", "e4s"] - - maintainers("davidbeckingsale") - - # GEOS_EDIT_START - version("2023.06.0", branch="v2023.06.0", submodules=False) - # GEOS_EDIT_END - - - version("develop", branch="develop", submodules=False) - version("main", branch="main", submodules=False) - version("2022.03.1", tag="v2022.03.1", submodules=False) - version("2022.03.0", tag="v2022.03.0", submodules=False) - version("6.0.0", tag="v6.0.0", submodules=True) - version("5.0.1", tag="v5.0.1", submodules=True) - version("5.0.0", tag="v5.0.0", submodules=True) - version("4.1.2", tag="v4.1.2", submodules=True) - version("4.1.1", tag="v4.1.1", submodules=True) - version("4.1.0", tag="v4.1.0", submodules=True) - version("4.0.1", tag="v4.0.1", submodules=True) - version("4.0.0", tag="v4.0.0", submodules=True) - version("3.0.0", tag="v3.0.0", submodules=True) - version("2.1.0", tag="v2.1.0", submodules=True) - version("2.0.0", tag="v2.0.0", submodules=True) - version("1.1.0", tag="v1.1.0", submodules=True) - version("1.0.1", tag="v1.0.1", submodules=True) - version("1.0.0", tag="v1.0.0", submodules=True) - version("0.3.5", tag="v0.3.5", submodules=True) - version("0.3.4", tag="v0.3.4", submodules=True) - version("0.3.3", tag="v0.3.3", submodules=True) - version("0.3.2", tag="v0.3.2", submodules=True) - version("0.3.1", tag="v0.3.1", submodules=True) - version("0.3.0", tag="v0.3.0", submodules=True) - version("0.2.4", tag="v0.2.4", submodules=True) - version("0.2.3", tag="v0.2.3", submodules=True) - version("0.2.2", tag="v0.2.2", submodules=True) - version("0.2.1", tag="v0.2.1", submodules=True) - version("0.2.0", tag="v0.2.0", submodules=True) - version("0.1.4", tag="v0.1.4", submodules=True) - version("0.1.3", tag="v0.1.3", submodules=True) - - # GEOS_EDIT_START - # Unused patches - - #patch("std-filesystem-pr784.patch", when="@2022.03.1 +rocm ^blt@0.5.2:") - #patch("camp_target_umpire_3.0.0.patch", when="@3.0.0") - # patch("cmake_version_check.patch", when="@4.1") - #patch("missing_header_for_numeric_limits.patch", when="@4.1:5.0.1") - # GEOS_EDIT_END - - # export targets when building pre-6.0.0 release with BLT 0.4.0+ - patch( - "https://github.com/LLNL/Umpire/commit/5773ce9af88952c8d23f9bcdcb2e503ceda40763.patch?full_index=1", - sha256="f3b21335ce5cf9c0fecc852a94dfec90fb5703032ac97f9fee104af9408d8899", - when="@:5.0.1 ^blt@0.4:", - ) - - variant("fortran", default=False, description="Build C/Fortran API") - variant("c", default=True, description="Build C API") - variant("numa", default=False, description="Enable NUMA support") - variant("shared", default=True, description="Enable Shared libs") - variant("openmp", default=False, description="Build with OpenMP support") - variant("deviceconst", default=False, description="Enables support for constant device memory") - variant("examples", default=True, description="Build Umpire Examples") - variant( - "tests", - default="none", - values=("none", "basic", "benchmarks"), - multi=False, - description="Tests to run", - ) - variant("device_alloc", default=True, description="Build Umpire Device Allocator") - - depends_on("cmake@3.8:", type="build") - depends_on("cmake@3.9:", when="+cuda", type="build") - depends_on("cmake@3.14:", when="@2022.03.0:") - - # GEOS_EDIT_START - depends_on("blt@0.5.3:", type="build", when="@2023.06.0:") - # GEOS_EDIT_END - depends_on("blt@0.5.0:", type="build", when="@2022.03.0:") - depends_on("blt@0.4.1", type="build", when="@6.0.0") - depends_on("blt@0.4.0:", type="build", when="@4.1.3:5.0.1") - depends_on("blt@0.3.6:", type="build", when="@:4.1.2") - - depends_on("camp", when="@5.0.0:") - depends_on("camp@0.2.2:0.2.3", when="@6.0.0") - depends_on("camp@0.1.0", when="@5.0.0:5.0.1") - depends_on("camp@2022.03.2:", when="@2022.03.0:") - # GEOS_EDIT_START - depends_on("camp@2023.06.0:", when="@2023.06.0:") - # GEOS_EDIT_END - depends_on("camp@main", when="@main") - depends_on("camp@main", when="@develop") - depends_on("camp+openmp", when="+openmp") - depends_on("camp~cuda", when="~cuda") - - with when("@5.0.0:"): - with when("+cuda"): - depends_on("camp+cuda") - for sm_ in CudaPackage.cuda_arch_values: - depends_on("camp+cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) - - with when("+rocm"): - depends_on("camp+rocm") - for arch_ in ROCmPackage.amdgpu_targets: - depends_on( - "camp+rocm amdgpu_target={0}".format(arch_), - when="amdgpu_target={0}".format(arch_), - ) - - conflicts("+numa", when="@:0.3.2") - conflicts("~c", when="+fortran", msg="Fortran API requires C API") - conflicts("+device_alloc", when="@:2022.03.0") - - # device allocator exports device code, which requires static libs - # currently only available for cuda. - conflicts("+shared", when="+cuda") - - # https://github.com/LLNL/Umpire/issues/653 - # This range looks weird, but it ensures the concretizer looks at it as a - # range, not as a concrete version, so that it also matches 10.3.* versions. - conflicts("%gcc@10.3.0:10.3", when="+cuda") - - def _get_sys_type(self, spec): - sys_type = spec.architecture - if "SYS_TYPE" in env: - sys_type = env["SYS_TYPE"] - return sys_type - - @property - def cache_name(self): - hostname = socket.gethostname() - if "SYS_TYPE" in env: - hostname = hostname.rstrip("1234567890") - return "{0}-{1}-{2}@{3}.cmake".format( - hostname, - self._get_sys_type(self.spec), - self.spec.compiler.name, - self.spec.compiler.version, - ) - - def initconfig_compiler_entries(self): - spec = self.spec - entries = super().initconfig_compiler_entries() - - if "+rocm" in spec: - entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc)) - - option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else "" - - if "+fortran" in spec and self.compiler.fc is not None: - entries.append(cmake_cache_option("ENABLE_FORTRAN", True)) - else: - entries.append(cmake_cache_option("ENABLE_FORTRAN", False)) - - entries.append(cmake_cache_option("{}ENABLE_C".format(option_prefix), "+c" in spec)) - - return entries - - def initconfig_hardware_entries(self): - spec = self.spec - entries = super().initconfig_hardware_entries() - - option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else "" - - if "+cuda" in spec: - entries.append(cmake_cache_option("ENABLE_CUDA", True)) - - if not spec.satisfies("cuda_arch=none"): - cuda_arch = spec.variants["cuda_arch"].value - entries.append(cmake_cache_string("CUDA_ARCH", "sm_{0}".format(cuda_arch[0]))) - entries.append( - cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(cuda_arch[0])) - ) - flag = "-arch sm_{0}".format(cuda_arch[0]) - entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", "{0}".format(flag))) - - entries.append( - cmake_cache_option( - "{}ENABLE_DEVICE_CONST".format(option_prefix), spec.satisfies("+deviceconst") - ) - ) - else: - entries.append(cmake_cache_option("ENABLE_CUDA", False)) - - if "+rocm" in spec: - entries.append(cmake_cache_option("ENABLE_HIP", True)) - entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix))) - hip_repair_cache(entries, spec) - archs = self.spec.variants["amdgpu_target"].value - if archs != "none": - arch_str = ",".join(archs) - entries.append( - cmake_cache_string("HIP_HIPCC_FLAGS", "--amdgpu-target={0}".format(arch_str)) - ) - entries.append( - cmake_cache_string("CMAKE_HIP_ARCHITECTURES", "{0}".format(arch_str)) - ) - else: - entries.append(cmake_cache_option("ENABLE_HIP", False)) - - return entries - - def initconfig_package_entries(self): - spec = self.spec - entries = [] - - option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else "" - - # TPL locations - entries.append("#------------------{0}".format("-" * 60)) - entries.append("# TPLs") - entries.append("#------------------{0}\n".format("-" * 60)) - - entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix)) - if spec.satisfies("@5.0.0:"): - entries.append(cmake_cache_path("camp_DIR", spec["camp"].prefix)) - entries.append(cmake_cache_option("{}ENABLE_NUMA".format(option_prefix), "+numa" in spec)) - # GEOS_EDIT_START - - # The wrong way to initialize OpenMP from spack upstream - # entries.append( - # cmake_cache_option("{}ENABLE_OPENMP".format(option_prefix), "+openmp" in spec) - # ) - entries.append(cmake_cache_option( - "ENABLE_OPENMP", "+openmp" in spec)) - # GEOS_EDIT_END - entries.append(cmake_cache_option("ENABLE_BENCHMARKS", "tests=benchmarks" in spec)) - entries.append( - cmake_cache_option("{}ENABLE_EXAMPLES".format(option_prefix), "+examples" in spec) - ) - entries.append(cmake_cache_option("{}ENABLE_DOCS".format(option_prefix), False)) - entries.append( - cmake_cache_option("UMPIRE_ENABLE_DEVICE_ALLOCATOR", "+device_alloc" in spec) - ) - entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec)) - entries.append(cmake_cache_option("ENABLE_TESTS", "tests=none" not in spec)) - - return entries - - def cmake_args(self): - options = [] - return options - - def test(self): - """Perform stand-alone checks on the installed package.""" - if self.spec.satisfies("@:1") or not os.path.isdir(self.prefix.bin): - tty.info("Skipping: checks not installed in bin for v{0}".format(self.version)) - return - - # Run a subset of examples PROVIDED installed - # tutorials with readily checkable outputs. - checks = { - "malloc": ["99 should be 99"], - "recipe_dynamic_pool_heuristic": ["in the pool", "releas"], - "recipe_no_introspection": ["has allocated", "used"], - "strategy_example": ["Available allocators", "HOST"], - "tut_copy": ["Copied source data"], - "tut_introspection": ["Allocator used is HOST", "size of the allocation"], - "tut_memset": ["Set data from HOST"], - "tut_move": ["Moved source data", "HOST"], - "tut_reallocate": ["Reallocated data"], - "vector_allocator": [""], - } - - for exe in checks: - expected = checks[exe] - reason = "test: checking output from {0}".format(exe) - self.run_test( - exe, - [], - expected, - 0, - installed=False, - purpose=reason, - skip_missing=True, - work_dir=self.prefix.bin, - ) \ No newline at end of file From ee9954f3da297428cf8bc3d096ed4a2bd9e186a0 Mon Sep 17 00:00:00 2001 From: Brian Han Date: Thu, 8 Feb 2024 08:42:46 -0800 Subject: [PATCH 2/5] Remove fesapi support from spack --- .../spack_packages/packages/fesapi/package.py | 46 ------------------- .../spack_packages/packages/geosx/package.py | 4 -- 2 files changed, 50 deletions(-) delete mode 100644 scripts/spack_packages/packages/fesapi/package.py diff --git a/scripts/spack_packages/packages/fesapi/package.py b/scripts/spack_packages/packages/fesapi/package.py deleted file mode 100644 index 57a511f82e5..00000000000 --- a/scripts/spack_packages/packages/fesapi/package.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - - -class Fesapi(CMakePackage): - """Allow access in reading and writing to ENERGISTICS standards data - (mainly RESQML, some of WITSML™ and PRODML)""" - - git = "https://github.com/F2I-Consulting/fesapi.git" - url = "https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.4.0.0.tar.gz" - - version("2.4.0.0", sha256="a711e8a1218c876a2799f4d05a9820da71eb5503b5d51b834fae98d9fe635381") - - depends_on("mpi") - depends_on("hdf5") - depends_on("boost@1.67.0") - depends_on("minizip") - - def cmake_args(self): - spec = self.spec - - cppflags = " ".join(spec.compiler_flags["cppflags"]) - cxxflags = cppflags + " ".join(spec.compiler_flags["cxxflags"]) - cmake_args = [ - self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc), - self.define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx), - self.define("CMAKE_CXX_FLAGS", cxxflags), - self.define("HDF5_ROOT", spec["hdf5"].prefix), - # fesAPI/spack can detect wrong HDF5 version otherwise - self.define("HDF5_VERSION", spec["hdf5"].version), - self.define("MINIZIP_INCLUDE_DIR", spec["minizip"].prefix.include + "/minizip"), - self.define("MINIZIP_LIBRARY_RELEASE", spec["minizip"].prefix.lib), - self.define("Boost_INCLUDE_DIR", spec["boost"].prefix.include), - self.define("WITH_EXAMPLE", "OFF"), - self.define("WITH_DOTNET_WRAPPING", "OFF"), - self.define("WITH_JAVA_WRAPPING", "OFF"), - self.define("WITH_PYTHON_WRAPPING", "OFF"), - self.define("WITH_RESQML2_2", "OFF"), - self.define("WITH_TEST", "OFF"), - ] - - return cmake_args diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index c0d8fc8d60b..daf721c05f1 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -58,7 +58,6 @@ class Geosx(CMakePackage, CudaPackage): variant('shared', default=True, description='Build Shared Libs.') variant('caliper', default=True, description='Build Caliper support.') variant('vtk', default=True, description='Build VTK support.') - variant('fesapi', default=False, description='Build fesapi support.') variant('trilinos', default=True, description='Build Trilinos support.') variant('hypre', default=True, description='Build HYPRE support.') variant('petsc', default=False, description='Build PETSc support.') @@ -128,8 +127,6 @@ class Geosx(CMakePackage, CudaPackage): depends_on('fmt@10.0.0 cxxstd=14') depends_on('vtk@9.2.6', when='+vtk') - depends_on('fesapi', when='+fesapi') - # # Math # @@ -386,7 +383,6 @@ def geos_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): ('silo', 'SILO', True), ('pugixml', 'PUGIXML', True), ('vtk', 'VTK', '+vtk' in spec), - ('fesapi', 'FESAPI', '+fesapi' in spec), ('fmt', 'FMT', True) ) # yapf: enable From 401d6281d128836fa492bed0243d1e1f2f245fb6 Mon Sep 17 00:00:00 2001 From: Brian Han Date: Thu, 8 Feb 2024 08:46:08 -0800 Subject: [PATCH 3/5] Remove toss_3 recipe (no more toss_3 systems) --- .../spack_configs/toss_3_x86_64_ib/spack.yaml | 194 ------------------ 1 file changed, 194 deletions(-) delete mode 100644 scripts/spack_configs/toss_3_x86_64_ib/spack.yaml diff --git a/scripts/spack_configs/toss_3_x86_64_ib/spack.yaml b/scripts/spack_configs/toss_3_x86_64_ib/spack.yaml deleted file mode 100644 index ce601ad9237..00000000000 --- a/scripts/spack_configs/toss_3_x86_64_ib/spack.yaml +++ /dev/null @@ -1,194 +0,0 @@ -#------------------------------------------------------------------------------------------------------------ -# SPDX-License-Identifier: LGPL-2.1-only -# -# Copyright (c) 2018-2020 Lawrence Livermore National Security LLC -# Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University -# Copyright (c) 2018-2020 TotalEnergies -# Copyright (c) 2019- GEOSX Contributors -# All rights reserved -# -# See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. -#------------------------------------------------------------------------------------------------------------ - -# geosx@develop%clang@10.0.0 -# -# Uberenv command to build pygeosx dependencies: -# python3 ./scripts/uberenv/uberenv.py --spec="%clang@10.0.0" - -spack: - config: - install_tree: - root: $spack/.. - projections: - all: '{compiler.name}-{compiler.version}/{name}-{version}-{hash}' - misc_cache: $spack/../misc_cache - test_stage: $spack/../test_stage - build_stage:: - - $spack/../build_stage - - # Regular TPLs do not need views - view: false - - compilers:: - - compiler: - spec: clang@10.0.0 - paths: - cc: /usr/tce/packages/clang/clang-10.0.0/bin/clang - cxx: /usr/tce/packages/clang/clang-10.0.0/bin/clang++ - f77: /usr/tce/packages/gcc/gcc-8.1.0/bin/gfortran - fc: /usr/tce/packages/gcc/gcc-8.1.0/bin/gfortran - flags: - cflags: --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0 - cxxflags: --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0 - operating_system: rhel7 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] - - compiler: - spec: clang@10.0.1 - paths: - cc: /usr/tce/packages/clang/clang-10.0.1/bin/clang - cxx: /usr/tce/packages/clang/clang-10.0.1/bin/clang++ - f77: /usr/tce/packages/gcc/gcc-8.1.0/bin/gfortran - fc: /usr/tce/packages/gcc/gcc-8.1.0/bin/gfortran - flags: - cflags: --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0 - cxxflags: --gcc-toolchain=/usr/tce/packages/gcc/gcc-8.1.0 - operating_system: rhel7 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] - - compiler: - spec: gcc@8.1.0 - paths: - cc: /usr/tce/packages/gcc/gcc-8.1.0/bin/gcc - cxx: /usr/tce/packages/gcc/gcc-8.1.0/bin/g++ - f77: /usr/tce/packages/gcc/gcc-8.1.0/bin/gfortran - fc: /usr/tce/packages/gcc/gcc-8.1.0/bin/gfortran - flags: {} - operating_system: rhel7 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] - - compiler: - spec: intel@19.1.2 - paths: - cc: /usr/tce/packages/intel/intel-19.1.2/bin/icc - cxx: /usr/tce/packages/intel/intel-19.1.2/bin/icpc - f77: /usr/tce/packages/intel/intel-19.1.2/bin/ifort - fc: /usr/tce/packages/intel/intel-19.1.2/bin/ifort - flags: - cflags: -gcc-name=/usr/tce/packages/gcc/gcc-8.3.1/bin/gcc - cxxflags: -gxx-name=/usr/tce/packages/gcc/gcc-8.3.1/bin/g++ - fflags: -gcc-name=/usr/tce/packages/gcc/gcc-8.3.1/bin/gcc - operating_system: rhel7 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] - - packages: - all: - target: [ivybridge] - compiler: [gcc, clang, intel] - providers: - mpi: [mvapich2] - blas: [intel-mkl] - lapack: [intel-mkl] - - # Lock down which MPI we are using - mvapich2: - buildable: False - externals: - - spec: mvapich2@2.3%gcc@8.3.1 - prefix: /usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.3.1/ - - spec: mvapich2@2.3%clang@10.0.1 - prefix: /usr/tce/packages/mvapich2/mvapich2-2.3-clang-10.0.1 - - # Lock down blas, lapack implementation - intel-mkl: - buildable: False - externals: - - spec: intel-mkl@2020.0.166 threads=openmp - prefix: /usr/tce/packages/mkl/mkl-2020.0/ - - # System level packages to not build - papi: - buildable: False - externals: - - spec: papi@5.5.1 - prefix: /usr/tce/packages/papi/papi-5.5.1/ - cmake: - version: [3.23.1] - buildable: false - externals: - - spec: cmake@3.23.1 - prefix: /usr/tce/packages/cmake/cmake-3.23.1 - readline: - externals: - - spec: readline@7.0 - prefix: /collab/usr/gapps/python/build/spack-toss3.3/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/readline-7.0-e5jqqjmcjknidgwvi353pd6umpixzxr2 - buildable: false - zlib: - buildable: False - externals: - - spec: zlib@1.2.7 - prefix: /usr - m4: - buildable: False - externals: - - spec: m4@1.4.16 - prefix: /usr - perl: - buildable: false - externals: - - spec: perl@5.16.3 - prefix: /usr - pkg-config: - buildable: false - externals: - - spec: pkg-config@0.27.1 - prefix: /usr - diffutils: - buildable: False - externals: - - spec: diffutils@3.3 - prefix: /usr/bin - python: - buildable: False - externals: - - spec: python@3.8.2 - prefix: /usr/tce/packages/python/python-3.8.2/ - py-sphinx: - buildable: False - externals: - - spec: py-sphinx@1.6.3 - prefix: /collab/usr/gapps/python/build/spack-toss3.2/opt/spack/linux-rhel7-x86_64/gcc-4.9.3/python-2.7.14-7rci3jkmuht2uiwp433afigveuf4ocnu/ - autoconf: - buildable: False - externals: - - spec: autoconf@2.69 - prefix: /usr - automake: - buildable: False - externals: - - spec: automake@1.13.4 - prefix: /usr - libtool: - buildable: False - externals: - - spec: libtool@2.4.2 - prefix: /usr - bison: - buildable: False - externals: - - spec: bison@3.0.4 - prefix: /usr - flex: - buildable: False - externals: - - spec: flex@2.5.37 - prefix: /usr From f0c5d1c84d124b794a8e8f32719953c7e676da92 Mon Sep 17 00:00:00 2001 From: Brian Han Date: Thu, 8 Feb 2024 10:35:48 -0800 Subject: [PATCH 4/5] hypre update --- scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml | 2 +- scripts/spack_configs/toss_4_x86_64_ib/spack.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml b/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml index 685241bb3aa..56d7d9a687f 100644 --- a/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml +++ b/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml @@ -91,7 +91,7 @@ spack: require: "@git.5a792c1775e7a7628d84dcde31652a689f1df7b5=develop" hypre: - require: "@git.57bfb26e268ddf003668c5d0b5938ae258922a83" + require: "@git.eab5f9f7f18e5a5c6de34b7652b6ee5b9407d597" chai: require: "@git.6fe3470ad020303530af2f3dbbfe18826bd3319b=develop" diff --git a/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml b/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml index d68e623853f..6551690cf78 100644 --- a/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml +++ b/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml @@ -72,7 +72,7 @@ spack: require: "@git.5a792c1775e7a7628d84dcde31652a689f1df7b5=develop" hypre: - require: "@git.57bfb26e268ddf003668c5d0b5938ae258922a83" + require: "@git.eab5f9f7f18e5a5c6de34b7652b6ee5b9407d597" chai: require: "@git.6fe3470ad020303530af2f3dbbfe18826bd3319b=develop" From 6279ef5bab47f426a3dc6bb26c7d3fa66172f105 Mon Sep 17 00:00:00 2001 From: Brian Han Date: Wed, 6 Mar 2024 15:49:05 -0800 Subject: [PATCH 5/5] Remove unneeded dependencies for pygeosx, add recommendation to build python3 using Linux package manager > spack --- .../packages/py-pydata-sphinx-theme/package.py | 17 ----------------- .../py-sphinxcontrib-plantuml/package.py | 17 ----------------- .../spack_packages/packages/pygeosx/package.py | 8 ++++++-- 3 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 scripts/spack_packages/packages/py-pydata-sphinx-theme/package.py delete mode 100644 scripts/spack_packages/packages/py-sphinxcontrib-plantuml/package.py diff --git a/scripts/spack_packages/packages/py-pydata-sphinx-theme/package.py b/scripts/spack_packages/packages/py-pydata-sphinx-theme/package.py deleted file mode 100644 index 2d9229245bd..00000000000 --- a/scripts/spack_packages/packages/py-pydata-sphinx-theme/package.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - -class PyPydataSphinxTheme(PythonPackage): - """A clean, three-column, Bootstrap-based Sphinx theme by and for the PyData community""" - - homepage = "https://github.com/pydata/pydata-sphinx-theme" - pypi = "pydata-sphinx-theme/pydata_sphinx_theme-0.13.3.tar.gz" - - version("0.13.3", sha256="827f16b065c4fd97e847c11c108bf632b7f2ff53a3bca3272f63f3f3ff782ecc") - - depends_on("python", type=("build", "run")) - depends_on("py-setuptools", type="build") \ No newline at end of file diff --git a/scripts/spack_packages/packages/py-sphinxcontrib-plantuml/package.py b/scripts/spack_packages/packages/py-sphinxcontrib-plantuml/package.py deleted file mode 100644 index de642a3dec4..00000000000 --- a/scripts/spack_packages/packages/py-sphinxcontrib-plantuml/package.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - -class PySphinxcontribPlantuml(PythonPackage): - """PlantUML for Sphinx""" - - homepage = "https://github.com/sphinx-contrib/plantuml" - pypi = "sphinxcontrib-plantuml/sphinxcontrib-plantuml-0.26.tar.gz" - - version("0.26", sha256="adb3397d5cb0613632cd3dad7894381422bac24464c393cb050404dd6712b1a7") - - depends_on("python", type=("build", "run")) - depends_on("py-setuptools", type="build") \ No newline at end of file diff --git a/scripts/spack_packages/packages/pygeosx/package.py b/scripts/spack_packages/packages/pygeosx/package.py index 723ad48c510..aaa1ddc4828 100644 --- a/scripts/spack_packages/packages/pygeosx/package.py +++ b/scripts/spack_packages/packages/pygeosx/package.py @@ -6,7 +6,10 @@ from spack import * class Pygeosx(BundlePackage): - """This is a set of libraries necessary for the pygeosx ATS environment""" + """This is a set of libraries necessary for the pygeosx ATS environment. + NOTE: It is recommended to download and install python3 and package + dependencies using your Linux distribution's package manager (Spack + builds of python tend to be much slower). """ version('fakeversion') @@ -18,4 +21,5 @@ class Pygeosx(BundlePackage): depends_on("openblas") depends_on("py-matplotlib") depends_on("py-sphinx") - depends_on("py-sphinx-argparse") \ No newline at end of file + depends_on("py-sphinx-argparse") + depends_on("py-test")