diff --git a/experiments/kripke/experiment.py b/experiments/kripke/experiment.py index 560862dec..eed791265 100644 --- a/experiments/kripke/experiment.py +++ b/experiments/kripke/experiment.py @@ -30,8 +30,8 @@ class Kripke( variant( "version", - default="2026.10.0", - values=("develop", "latest", "2026.10.0", "2025.12.0", "2025.07.0", "1.2.7.0"), + default="1.2.8", + values=("develop", "latest", "1.2.8", "1.2.7.0"), description="app version", ) diff --git a/repos/spack_repo/benchpark/packages/kripke/001-remove-googletest-from-cmake.patch b/repos/spack_repo/benchpark/packages/kripke/001-remove-googletest-from-cmake.patch deleted file mode 100644 index d257ec5f6..000000000 --- a/repos/spack_repo/benchpark/packages/kripke/001-remove-googletest-from-cmake.patch +++ /dev/null @@ -1,24 +0,0 @@ -m aa630efbd686c8581bb893b512dbf1613e1e574d Mon Sep 17 00:00:00 2001 -From: Afzal Patel -Date: Thu, 20 Jun 2024 18:40:02 +0000 -Subject: [PATCH] Comment out googletest folder - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2f9bff0..3059e26 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -64,7 +64,7 @@ endif() - # - # Add googletest (needed by RAJA, etc) - # --add_subdirectory(tpl/googletest) -+# add_subdirectory(tpl/googletest) - - - # --- -2.31.1 diff --git a/repos/spack_repo/benchpark/packages/kripke/package.py b/repos/spack_repo/benchpark/packages/kripke/package.py index 9dd12b97b..af18152dc 100644 --- a/repos/spack_repo/benchpark/packages/kripke/package.py +++ b/repos/spack_repo/benchpark/packages/kripke/package.py @@ -1,181 +1,13 @@ -# Copyright Spack Project Developers. See COPYRIGHT file for details. +# Copyright 2023 Lawrence Livermore National Security, LLC and other +# Benchpark Project Developers. See the top-level COPYRIGHT file for details. # -# SPDX-License-Identifier: (Apache-2.0 OR MIT) +# SPDX-License-Identifier: Apache-2.0 from spack.package import * -from spack_repo.builtin.build_systems.cmake import CMakePackage -from spack_repo.builtin.build_systems.cuda import CudaPackage -from spack_repo.builtin.build_systems.rocm import ROCmPackage +from spack_repo.builtin.packages.kripke.package import Kripke as BuiltinKripke -class Kripke(CMakePackage, CudaPackage, ROCmPackage): - """Kripke is a simple, scalable, 3D Sn deterministic particle - transport proxy/mini app. - """ - - homepage = "https://computing.llnl.gov/projects/co-design/kripke" - git = "https://github.com/LLNL/Kripke.git" - - tags = ["proxy-app"] - - maintainers("rchen20") - - license("BSD-3-Clause") - - version("develop", branch="develop", submodules=False) - version("2026.10.0", submodules=False, commit="aeaa69f12ccc52243dbeb41194a08d0be53c4c41") - version("2025.12.0", submodules=False, commit="01f6f85c02ceffcd2bc06e42cee997867dd142c5") - version("2025.07.0", submodules=False, commit="8cf38433a6a11e0dcd17864e649b2d045159ee9c") - version( - "1.2.7.0", submodules=False, commit="db920c1f5e1dcbb9e949d120e7d86efcdb777635" - ) - version( - "1.2.7", submodules=True, tag="v1.2.7", commit="ddcac43cdad999f0346eb682065ef0af1847029d" - ) - version( - "1.2.6", submodules=True, tag="v1.2.6", commit="55b39f34b68c68b2d828a33a75568abd66e1019f" - ) - version( - "1.2.5", submodules=True, tag="v1.2.5", commit="20e9ea975f1bf567829323a18927b69bed3f4ebd" - ) - version( - "1.2.4", submodules=False, tag="v1.2.4", commit="d85c6bc462f17a2382b11ba363059febc487f771" - ) - version( - "1.2.3", submodules=True, tag="v1.2.3", commit="66046d8cd51f5bcf8666fd8c810322e253c4ce0e" - ) - version( - "1.2.2", - submodules=True, - tag="v1.2.2-CORAL2", - commit="a12bce71e751f8f999009aa2fd0839b908b118a4", - ) - version( - "1.2.1", - submodules=True, - tag="v1.2.1-CORAL2", - commit="c36453301ddd684118bb0fb426cfa62764d42398", - ) - version( - "1.2.0", - submodules=True, - tag="v1.2.0-CORAL2", - commit="67e4b0a2f092009d61f44b5122111d388a3bec2a", - ) - - variant("mpi", default=True, description="Build with MPI.") - variant("chai", default=True, description="Build with CHAI/Umpire.") - variant("direct-device-plane", default=False, description="Use direct device allocator in Umpire for plane fields") - variant("openmp", default=False, description="Build with OpenMP enabled.") - variant("caliper", default=False, description="Build with Caliper support enabled.") - variant("gpu-aware-mpi", default=False, description="Enable GPU-aware MPI") - - depends_on("cxx", type="build") # generated - - depends_on("mpi", when="+mpi") - depends_on("blt", type="build", when="@:1.2.7") - - depends_on("camp@2026.07.2:", when="@develop") - depends_on("camp@2026.07.1", when="@2026.10.0") - depends_on("camp@2025.12.0", when="@2025.12.0") - depends_on("camp@2024.07.0", when="@1.2.7.0:2025.07.0") - - depends_on("raja@2026.07.1: ~examples~exercises cxxstd=20", when="@develop") - depends_on("raja@2026.07.0 ~examples~exercises cxxstd=20", when="@2026.10.0") - depends_on("raja@2025.12.0 ~examples~exercises cxxstd=17", when="@2025.12.0") - depends_on("raja@2024.07.0 ~examples~exercises cxxstd=14", when="@1.2.7.0:2025.07.0") - depends_on("raja@:2024.02.1~exercises~examples", when="@:1.2.7") - - - with when("+chai"): - depends_on("chai+mpi", when="+mpi") - - depends_on("chai@2026.07.0: ~examples +raja cxxstd=20", when="@develop") - depends_on("chai@2026.07.0 ~examples +raja cxxstd=20", when="@2026.10.0") - depends_on("chai@2025.12.0 ~examples +raja cxxstd=17", when="@2025.12.0") - depends_on("chai@2024.07.0 ~examples +raja cxxstd=14", when="@1.2.7.0:2025.07.0") - depends_on("chai~examples+raja", when="@:1.2.7") - depends_on("chai+openmp", when="+openmp") - depends_on("chai~openmp", when="~openmp") - depends_on("chai+cuda", when="+cuda") - depends_on("chai~cuda", when="~cuda") - depends_on("chai~rocm", when="~rocm") - depends_on("fmt@9.1", when="^chai@2024.07.0") - - depends_on("umpire@2026.07.2: ~examples", when="@develop") - depends_on("umpire@2026.07.1 ~examples", when="@2026.10.0") - depends_on("umpire@2025.12.0 ~examples", when="@2025.12.0") - depends_on("umpire@2024.07.0 ~examples", when="@1.2.7.0:2025.07.0") - depends_on("umpire~examples", when="@:1.2.7") - depends_on("umpire+openmp", when="+openmp") - depends_on("umpire~openmp", when="~openmp") - depends_on("umpire+cuda", when="+cuda") - depends_on("umpire~cuda", when="~cuda") - - with when("+cuda"): - for sm_ in CudaPackage.cuda_arch_values: - depends_on("umpire cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) - depends_on("chai cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) - - depends_on("umpire+rocm", when="+rocm") - depends_on("umpire~rocm", when="~rocm") - with when("+rocm @1.2.5:"): - for arch in ROCmPackage.amdgpu_targets: - depends_on("umpire amdgpu_target={0}".format(arch), when="amdgpu_target={0}".format(arch)) - depends_on("chai amdgpu_target={0}".format(arch), when="amdgpu_target={0}".format(arch)) - - conflicts("^blt@0.7:", when="^chai@:2024.07.0") - - depends_on("caliper", when="+caliper") - depends_on("adiak@0.4:", when="+caliper") - conflicts("^blt@:0.3.6", when="+rocm") - - depends_on("blt@0.6.2:", type="build", when="@1.2.7:") - - with when("+cuda~chai"): - depends_on("umpire@2026.07.1: ~examples", when="@develop") - depends_on("umpire@2026.07.1 ~examples", when="@2026.10.0") - depends_on("umpire@2025.12.0 ~examples", when="@2025.12.0") - depends_on("umpire@2024.07.0 ~examples", when="@1.2.7.0:2025.07.0") - depends_on("umpire+cuda") - for sm_ in CudaPackage.cuda_arch_values: - depends_on("umpire cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) - - with when("+rocm~chai"): - depends_on("umpire@2026.07.1: ~examples", when="@develop") - depends_on("umpire@2026.07.1 ~examples", when="@2026.10.0") - depends_on("umpire@2025.12.0 ~examples", when="@2025.12.0") - depends_on("umpire@2024.07.0 ~examples", when="@1.2.7.0:2025.07.0") - depends_on("umpire+rocm") - for arch in ROCmPackage.amdgpu_targets: - depends_on("umpire amdgpu_target={0}".format(arch), when="amdgpu_target={0}".format(arch)) - - depends_on("raja+openmp", when="+openmp") - depends_on("raja~openmp", when="~openmp") - - depends_on("raja+cuda", when="+cuda") - depends_on("raja~cuda", when="~cuda") - with when("+cuda"): - for sm_ in CudaPackage.cuda_arch_values: - depends_on("raja cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) - - depends_on("raja+rocm", when="+rocm") - depends_on("raja~rocm", when="~rocm") - with when("+rocm"): - for arch in ROCmPackage.amdgpu_targets: - depends_on("raja amdgpu_target={0}".format(arch), when="amdgpu_target={0}".format(arch)) - - # googletest folder version hasn't been updated in over 5 years - # and is commented out in later releases - patch("001-remove-googletest-from-cmake.patch", when="@1.2.5:1.2.6") - - def setup_build_environment(self, env): - spec = self.spec - if "+cuda" in spec: - if "+mpi" in spec: - env.set("CUDAHOSTCXX", self.spec["mpi"].mpicxx) - else: - env.set("CUDAHOSTCXX", self.compiler.cxx) +class Kripke(BuiltinKripke): def setup_run_environment(self, env): super().setup_run_environment(env) @@ -183,83 +15,3 @@ def setup_run_environment(self, env): if self.compiler.extra_rpaths: for rpath in self.compiler.extra_rpaths: env.prepend_path("LD_LIBRARY_PATH", rpath) - - def cmake_args(self): - spec = self.spec - args = [] - if spec.satisfies("@develop"): - blt_cxx_std = "c++20" - elif spec.satisfies("@2026.10.0"): - blt_cxx_std = "c++20" - elif spec.satisfies("@2025.12.0"): - blt_cxx_std = "c++17" - elif spec.satisfies("@:2025.7.0"): - blt_cxx_std = "c++14" - - args.extend( - [ - "-Dcamp_DIR=%s" % self.spec["camp"].prefix, - "-DBLT_SOURCE_DIR=%s" % self.spec["blt"].prefix, - "-DRAJA_DIR=%s" % self.spec["raja"].prefix, - "-DBLT_CXX_STD=%s" % blt_cxx_std, - ] - ) - - args.append(self.define_from_variant("ENABLE_CHAI", "chai")) - if "+chai" in spec: - args.extend( - [ - "-Dchai_DIR=%s" % self.spec["chai"].prefix, - "-Dumpire_DIR=%s" % self.spec["umpire"].prefix + "/lib64/cmake/umpire", - ] - ) - - args.append(self.define_from_variant("ENABLE_GPU_AWARE_MPI", "gpu-aware-mpi")) - if "+gpu-aware-mpi" in spec: - args.append(self.define_from_variant("ENABLE_DIRECT_UMPIRE_PLANE_STORAGE", "direct-device-plane")) - args.append(self.define_from_variant("ENABLE_OPENMP", "openmp")) - args.append(self.define_from_variant("ENABLE_CALIPER", "caliper")) - - args.append(self.define_from_variant("ENABLE_MPI", "mpi")) - if "+mpi" in spec: - args.append(self.define("CMAKE_CXX_COMPILER", self.spec["mpi"].mpicxx)) - args.append("-DMPI_CXX_LINK_FLAGS='%s'" % self.spec["mpi"].libs.ld_flags) - - args.append(self.define_from_variant("ENABLE_HIP", "rocm")) - if "+rocm" in spec: - # Set up the hip macros needed by the build - args.append("-Dumpire_DIR=%s" % self.spec["umpire"].prefix + "/lib64/cmake/umpire") - args.append("-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix)) - rocm_archs = spec.variants["amdgpu_target"].value - if "none" not in rocm_archs: - arch_str = ",".join(rocm_archs) - args.append("-DHIP_HIPCC_FLAGS=--amdgpu-target={0}".format(arch_str)) - args.append("-DCMAKE_HIP_ARCHITECTURES={0}".format(arch_str)) - - args.append(self.define_from_variant("ENABLE_CUDA", "cuda")) - if "+cuda" in spec: - args.append("-Dumpire_DIR=%s" % self.spec["umpire"].prefix + "/lib64/cmake/umpire") - if "+mpi" in spec: - args.append(self.define("CMAKE_CUDA_HOST_COMPILER", self.spec["mpi"].mpicxx)) - else: - args.append(self.define("CMAKE_CUDA_HOST_COMPILER", self.compiler.cxx)) - if not spec.satisfies("cuda_arch=none"): - cuda_arch = spec.variants["cuda_arch"].value - args.append("-DCUDA_ARCH={0}".format(cuda_arch[0])) - args.append("-DCMAKE_CUDA_ARCHITECTURES={0}".format(cuda_arch[0])) - if "+mpi" in spec: - args.append( - "-DCMAKE_CUDA_FLAGS=--extended-lambda -I=%s" - % (self.spec["mpi"].prefix.include) - ) - - return args - - def install(self, spec, prefix): - # Kripke does not provide install target, so we have to copy - # things into place. - mkdirp(prefix.bin) - if spec.satisfies("@:1.2.4") or spec.satisfies("@1.2.7:"): - install(join_path(self.build_directory, "kripke.exe"), prefix.bin) - else: - install(join_path(self.build_directory, "bin", "kripke.exe"), prefix.bin)