Update and standardize implementation of RADIUSS packages (#45648)
* Add latest releases of Camp, RAJA, Umpire, CHAI and CARE * Address review comments + blt requirement in Umpire * CARE @develop & @main: Submodules -> False * Changes in Umpire * Changes in RAJA * Changes in CHAI * Changes in RAJA: prefer 'spec.satisfies' to 'in spec' This is due to a non-equivalence in Spack with providers like mpi. See e.g. https://github.com/spack/spack/pull/46126 * Changes in Umpire: prefer 'spec.satisfies' to 'in spec' This is due to a non-equivalence in Spack with providers like mpi. See e.g. https://github.com/spack/spack/pull/46126 * Changes in CARE: Still need to update to CachedCMakePackage based on RADIUSS Spack Configs version * Missing change in RAJA + changes in fmt * Fix synta * Changes in Camp * Fix style * CHAI: when ~raja, turn off RAJA in build system * Fix: Ascent@0.9.3 does not support RAJA@2024.07.0 * Enforce same version constraint on Umpire as for RAJA * Enforce preferred version of vtk-m in ascent 0.9.3 * Migrate CARE package to CachedCMakePackage * Fix style in CARE package * CARE: Apply changes for uniform implementation accross RADIUSS projects * Caliper: move to CachedCMakePackage, from RADIUSS Spack Configs * Adapt RAJA Perf to spack CI * Activate CHAI, CARE and RAJAPerf in Spack CI * Fixes and diffs with RADIUSS Spack Configs * Caliper: fix * Caliper : fix + RAJAPerf : style * RAJAPerf: fixes * Update maintainers * raja-perf: fix license header * raja-perf: Fix variant naming openmp_target -> omptarget * raja-perf: style and blt dependency versions * CARE: benchmark and examples off by default (like tests) * CARE: fix missing variable * Update var/spack/repos/builtin/packages/raja-perf/package.py * CARE: fix branch name * Revert changes in MFEM to pass CI * Fix CXX17 condition in RAJA + add sycl option in RAJAPerf --------- Co-authored-by: Rich Hornung <hornung1@llnl.gov>
This commit is contained in:
parent
cb43019455
commit
d7f5dbaf89
@ -17,8 +17,8 @@ spack:
|
||||
- axom
|
||||
- blt
|
||||
- caliper
|
||||
#- care ## ~benchmarks ~examples ~tests
|
||||
#- chai ## ~examples
|
||||
- care # ~benchmarks ~examples ~tests
|
||||
- chai # ~examples
|
||||
- conduit # ^hdf5+shared
|
||||
- flux-core
|
||||
#- flux-sched
|
||||
@ -31,6 +31,7 @@ spack:
|
||||
- py-merlin
|
||||
- py-shroud
|
||||
- raja # ~examples # ~tests
|
||||
- raja-perf
|
||||
- samrai
|
||||
- scr
|
||||
- sundials
|
||||
|
@ -196,14 +196,14 @@ class Ascent(CMakePackage, CudaPackage):
|
||||
#######################
|
||||
with when("+raja"):
|
||||
depends_on("raja")
|
||||
depends_on("raja@2024.02.1:", when="@0.9.3:")
|
||||
depends_on("raja@2024.02.1:2024.02.99", when="@0.9.3:")
|
||||
depends_on("raja+openmp", when="+openmp")
|
||||
depends_on("raja~openmp", when="~openmp")
|
||||
|
||||
with when("+umpire"):
|
||||
depends_on("umpire")
|
||||
depends_on("umpire@:2023.06.0", when="@:0.9.2")
|
||||
depends_on("umpire@2024.02.1:", when="@0.9.3:")
|
||||
depends_on("umpire@2024.02.1:2024.02.99", when="@0.9.3:")
|
||||
|
||||
#######################
|
||||
# BabelFlow
|
||||
@ -216,6 +216,7 @@ class Ascent(CMakePackage, CudaPackage):
|
||||
#######################
|
||||
with when("+vtkh"):
|
||||
depends_on("vtk-m +doubleprecision ~64bitids")
|
||||
depends_on("vtk-m@2.1:", when="@0.9.3:")
|
||||
depends_on("vtk-m@2.0:", when="@0.9.2:")
|
||||
# 2.1 support needs commit e52b7bb8c9fd131f2fd49edf58037cc5ef77a166
|
||||
depends_on("vtk-m@:2.0", when="@:0.9.2")
|
||||
|
@ -9,7 +9,7 @@
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Caliper(CMakePackage, CudaPackage, ROCmPackage):
|
||||
class Caliper(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
"""Caliper is a program instrumentation and performance measurement
|
||||
framework. It is designed as a performance analysis toolbox in a
|
||||
library, allowing one to bake performance analysis capabilities
|
||||
@ -21,7 +21,7 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage):
|
||||
url = "https://github.com/LLNL/Caliper/archive/v2.11.0.tar.gz"
|
||||
tags = ["e4s", "radiuss"]
|
||||
|
||||
maintainers("daboehme")
|
||||
maintainers("daboehme", "adrienbernede")
|
||||
|
||||
test_requires_compiler = True
|
||||
|
||||
@ -134,69 +134,109 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage):
|
||||
when="@2.9.0:2.9.1 +libunwind +sampler",
|
||||
)
|
||||
|
||||
def cmake_args(self):
|
||||
def _get_sys_type(self, spec):
|
||||
sys_type = spec.architecture
|
||||
if "SYS_TYPE" in env:
|
||||
sys_type = env["SYS_TYPE"]
|
||||
return sys_type
|
||||
|
||||
def initconfig_compiler_entries(self):
|
||||
spec = self.spec
|
||||
entries = super().initconfig_compiler_entries()
|
||||
|
||||
args = [
|
||||
"-DBUILD_TESTING=Off",
|
||||
"-DBUILD_DOCS=Off",
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
self.define_from_variant("WITH_ADIAK", "adiak"),
|
||||
self.define_from_variant("WITH_GOTCHA", "gotcha"),
|
||||
self.define_from_variant("WITH_PAPI", "papi"),
|
||||
self.define_from_variant("WITH_LIBDW", "libdw"),
|
||||
self.define_from_variant("WITH_LIBPFM", "libpfm"),
|
||||
self.define_from_variant("WITH_SOSFLOW", "sosflow"),
|
||||
self.define_from_variant("WITH_SAMPLER", "sampler"),
|
||||
self.define_from_variant("WITH_MPI", "mpi"),
|
||||
self.define_from_variant("WITH_FORTRAN", "fortran"),
|
||||
self.define_from_variant("WITH_CUPTI", "cuda"),
|
||||
self.define_from_variant("WITH_NVTX", "cuda"),
|
||||
self.define_from_variant("WITH_ROCTRACER", "rocm"),
|
||||
self.define_from_variant("WITH_ROCTX", "rocm"),
|
||||
self.define_from_variant("WITH_VARIORUM", "variorum"),
|
||||
self.define_from_variant("WITH_VTUNE", "vtune"),
|
||||
self.define_from_variant("WITH_KOKKOS", "kokkos"),
|
||||
]
|
||||
if spec.satisfies("+rocm"):
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
entries.append(cmake_cache_option("WITH_FORTRAN", spec.satisfies("+fortran")))
|
||||
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
|
||||
entries.append(cmake_cache_option("BUILD_TESTING", spec.satisfies("+tests")))
|
||||
entries.append(cmake_cache_option("BUILD_DOCS", False))
|
||||
entries.append(cmake_cache_path("PYTHON_EXECUTABLE", spec["python"].command.path))
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_hardware_entries(self):
|
||||
spec = self.spec
|
||||
entries = super().initconfig_hardware_entries()
|
||||
|
||||
if spec.satisfies("+cuda"):
|
||||
entries.append(cmake_cache_option("WITH_CUPTI", True))
|
||||
entries.append(cmake_cache_option("WITH_NVTX", True))
|
||||
entries.append(cmake_cache_path("CUDA_TOOLKIT_ROOT_DIR", spec["cuda"].prefix))
|
||||
entries.append(cmake_cache_path("CUPTI_PREFIX", spec["cuda"].prefix))
|
||||
else:
|
||||
entries.append(cmake_cache_option("WITH_CUPTI", False))
|
||||
entries.append(cmake_cache_option("WITH_NVTX", False))
|
||||
|
||||
if spec.satisfies("+rocm"):
|
||||
entries.append(cmake_cache_option("WITH_ROCTRACER", True))
|
||||
entries.append(cmake_cache_option("WITH_ROCTX", True))
|
||||
else:
|
||||
entries.append(cmake_cache_option("WITH_ROCTRACER", False))
|
||||
entries.append(cmake_cache_option("WITH_ROCTX", False))
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_mpi_entries(self):
|
||||
spec = self.spec
|
||||
entries = super().initconfig_mpi_entries()
|
||||
|
||||
entries.append(cmake_cache_option("WITH_MPI", spec.satisfies("+mpi")))
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_package_entries(self):
|
||||
spec = self.spec
|
||||
entries = []
|
||||
|
||||
# TPL locations
|
||||
entries.append("#------------------{0}".format("-" * 60))
|
||||
entries.append("# TPLs")
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
if spec.satisfies("+adiak"):
|
||||
entries.append(cmake_cache_path("adiak_DIR", spec["adiak"].prefix))
|
||||
if spec.satisfies("+papi"):
|
||||
args.append("-DPAPI_PREFIX=%s" % spec["papi"].prefix)
|
||||
entries.append(cmake_cache_path("PAPI_PREFIX", spec["papi"].prefix))
|
||||
if spec.satisfies("+libdw"):
|
||||
args.append("-DLIBDW_PREFIX=%s" % spec["elfutils"].prefix)
|
||||
entries.append(cmake_cache_path("LIBDW_PREFIX", spec["elfutils"].prefix))
|
||||
if spec.satisfies("+libpfm"):
|
||||
args.append("-DLIBPFM_INSTALL=%s" % spec["libpfm4"].prefix)
|
||||
entries.append(cmake_cache_path("LIBPFM_INSTALL", spec["libpfm4"].prefix))
|
||||
if spec.satisfies("+sosflow"):
|
||||
args.append("-DSOS_PREFIX=%s" % spec["sosflow"].prefix)
|
||||
entries.append(cmake_cache_path("SOS_PREFIX", spec["sosflow"].prefix))
|
||||
if spec.satisfies("+variorum"):
|
||||
args.append("-DVARIORUM_PREFIX=%s" % spec["variorum"].prefix)
|
||||
entries.append(cmake_cache_path("VARIORUM_PREFIX", spec["variorum"].prefix))
|
||||
if spec.satisfies("+vtune"):
|
||||
itt_dir = join_path(spec["intel-oneapi-vtune"].prefix, "vtune", "latest")
|
||||
entries.append(cmake_cache_path("ITT_PREFIX", itt_dir))
|
||||
if spec.satisfies("+libunwind"):
|
||||
entries.append(cmake_cache_path("LIBUNWIND_PREFIX", spec["unwind"].prefix))
|
||||
|
||||
# Build options
|
||||
entries.append("#------------------{0}".format("-" * 60))
|
||||
entries.append("# Build Options")
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
entries.append(cmake_cache_option("WITH_ADIAK", spec.satisfies("+adiak")))
|
||||
entries.append(cmake_cache_option("WITH_GOTCHA", spec.satisfies("+gotcha")))
|
||||
entries.append(cmake_cache_option("WITH_SAMPLER", spec.satisfies("+sampler")))
|
||||
entries.append(cmake_cache_option("WITH_PAPI", spec.satisfies("+papi")))
|
||||
entries.append(cmake_cache_option("WITH_LIBDW", spec.satisfies("+libdw")))
|
||||
entries.append(cmake_cache_option("WITH_LIBPFM", spec.satisfies("+libpfm")))
|
||||
entries.append(cmake_cache_option("WITH_SOSFLOW", spec.satisfies("+sosflow")))
|
||||
entries.append(cmake_cache_option("WITH_KOKKOS", spec.satisfies("+kokkos")))
|
||||
entries.append(cmake_cache_option("WITH_VARIORUM", spec.satisfies("+variorum")))
|
||||
entries.append(cmake_cache_option("WITH_VTUNE", spec.satisfies("+vtune")))
|
||||
|
||||
# -DWITH_CALLPATH was renamed -DWITH_LIBUNWIND in 2.5
|
||||
callpath_flag = "LIBUNWIND" if spec.satisfies("@2.5:") else "CALLPATH"
|
||||
if spec.satisfies("+libunwind"):
|
||||
args.append("-DLIBUNWIND_PREFIX=%s" % spec["unwind"].prefix)
|
||||
args.append("-DWITH_%s=On" % callpath_flag)
|
||||
else:
|
||||
args.append("-DWITH_%s=Off" % callpath_flag)
|
||||
entries.append(cmake_cache_option("WITH_%s" % callpath_flag, spec.satisfies("+libunwind")))
|
||||
|
||||
if spec.satisfies("+mpi"):
|
||||
args.append("-DMPI_C_COMPILER=%s" % spec["mpi"].mpicc)
|
||||
args.append("-DMPI_CXX_COMPILER=%s" % spec["mpi"].mpicxx)
|
||||
return entries
|
||||
|
||||
if spec.satisfies("+cuda"):
|
||||
args.append("-DCUDA_TOOLKIT_ROOT_DIR=%s" % spec["cuda"].prefix)
|
||||
# technically only works with cuda 10.2+, otherwise cupti is in
|
||||
# ${CUDA_TOOLKIT_ROOT_DIR}/extras/CUPTI
|
||||
args.append("-DCUPTI_PREFIX=%s" % spec["cuda"].prefix)
|
||||
|
||||
if spec.satisfies("+vtune"):
|
||||
itt_dir = join_path(spec["intel-oneapi-vtune"].prefix, "vtune", "latest")
|
||||
args.append("-DITT_PREFIX=%s" % itt_dir)
|
||||
|
||||
if spec.satisfies("+rocm"):
|
||||
args.append("-DCMAKE_CXX_COMPILER={0}".format(spec["hip"].hipcc))
|
||||
args.append("-DROCM_PREFIX=%s" % spec["hsa-rocr-dev"].prefix)
|
||||
|
||||
return args
|
||||
def cmake_args(self):
|
||||
return []
|
||||
|
||||
@run_after("install")
|
||||
def cache_test_sources(self):
|
||||
|
@ -21,9 +21,15 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("main", branch="main", submodules=False)
|
||||
version(
|
||||
"2024.07.0",
|
||||
tag="v2024.07.0",
|
||||
commit="0f07de4240c42e0b38a8d872a20440cb4b33d9f5",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"2024.02.1",
|
||||
tag="v2024.02.",
|
||||
tag="v2024.02.1",
|
||||
commit="79c320fa09db987923b56884afdc9f82f4b70fc4",
|
||||
submodules=False,
|
||||
)
|
||||
@ -53,12 +59,14 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
|
||||
# TODO: figure out gtest dependency and then set this default True.
|
||||
variant("tests", default=False, description="Build tests")
|
||||
variant("openmp", default=False, description="Build with OpenMP support")
|
||||
variant("omptarget", default=False, description="Build with OpenMP Target support")
|
||||
variant("sycl", default=False, description="Build with Sycl support")
|
||||
|
||||
depends_on("cub", when="+cuda")
|
||||
|
||||
depends_on("blt", type="build")
|
||||
depends_on("blt@0.6.2:", type="build", when="@2024.02.1:")
|
||||
depends_on("blt@0.6.1:", type="build", when="@2024.02.0:")
|
||||
depends_on("blt@0.6.1", type="build", when="@2024.02.0")
|
||||
depends_on("blt@0.5.0:0.5.3", type="build", when="@2022.03.0:2023.06.0")
|
||||
|
||||
patch("libstdc++-13-missing-header.patch", when="@:2022.10")
|
||||
@ -67,6 +75,16 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
conflicts("^blt@:0.3.6", when="+rocm")
|
||||
|
||||
conflicts("+omptarget +rocm")
|
||||
conflicts("+sycl +omptarget")
|
||||
conflicts("+sycl +rocm")
|
||||
conflicts(
|
||||
"+sycl",
|
||||
when="@:2024.02.99",
|
||||
msg="Support for SYCL was introduced in RAJA after 2024.02 release, "
|
||||
"please use a newer release.",
|
||||
)
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
||||
@ -94,7 +112,12 @@ def cmake_args(self):
|
||||
options.append("-DGPU_TARGETS={0}".format(archs))
|
||||
options.append("-DAMDGPU_TARGETS={0}".format(archs))
|
||||
|
||||
options.append(self.define_from_variant("ENABLE_OPENMP", "openmp"))
|
||||
if spec.satisfies("+omptarget"):
|
||||
options.append(cmake_cache_string("RAJA_DATA_ALIGN", 64))
|
||||
|
||||
options.append(self.define_from_variant("ENABLE_TESTS", "tests"))
|
||||
options.append(self.define_from_variant("ENABLE_OPENMP", "openmp"))
|
||||
options.append(self.define_from_variant("CAMP_ENABLE_TARGET_OPENMP", "omptarget"))
|
||||
options.append(self.define_from_variant("ENABLE_SYCL", "sycl"))
|
||||
|
||||
return options
|
||||
|
@ -3,42 +3,59 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import socket
|
||||
|
||||
from spack.package import *
|
||||
|
||||
from .blt import llnl_link_helpers
|
||||
|
||||
class Care(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
class Care(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
"""
|
||||
Algorithms for chai managed arrays.
|
||||
CHAI and RAJA extensions (includes data structures and algorithms).
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/LLNL/CARE"
|
||||
git = "https://github.com/LLNL/CARE.git"
|
||||
tags = ["radiuss"]
|
||||
|
||||
license("GPL-2.0-or-later")
|
||||
license("BSD-3-Clause")
|
||||
|
||||
maintainers("adayton1")
|
||||
maintainers("adayton1", "adrienbernede")
|
||||
|
||||
version("develop", branch="develop", submodules="True")
|
||||
version("master", branch="main", submodules="True")
|
||||
version("develop", branch="develop", submodules=False)
|
||||
version("master", branch="master", submodules=False)
|
||||
version(
|
||||
"0.13.3",
|
||||
tag="v0.13.3",
|
||||
commit="93853696b452647278eae9311b835ad206236522",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"0.13.2",
|
||||
tag="v0.13.2",
|
||||
commit="b25dcd2a35683a68db1c25173e849be69833ed4f",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"0.13.1",
|
||||
tag="v0.13.1",
|
||||
commit="0fd0d47aaaa57076f26caad88e667fbc01ff7214",
|
||||
submodules="True",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"0.13.0",
|
||||
tag="v0.13.0",
|
||||
commit="2b288e2c557c3b14befeebc8e14a7d48348bd857",
|
||||
submodules="True",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"0.12.0",
|
||||
tag="v0.12.0",
|
||||
commit="a9978083035eb00a090451bd36d7987bc935204d",
|
||||
submodules="True",
|
||||
submodules=False,
|
||||
)
|
||||
version("0.10.0", tag="v0.10.0", submodules="True")
|
||||
version(
|
||||
"0.3.0", tag="v0.3.0", commit="5e2b69b2836c9f2215207ca9a36a690cb77eea33", submodules="True"
|
||||
)
|
||||
@ -50,137 +67,219 @@ class Care(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("fortran", type="build") # generated
|
||||
|
||||
variant("openmp", default=False, description="Build Shared Libs")
|
||||
variant("openmp", default=False, description="Build with OpenMP support")
|
||||
variant("mpi", default=False, description="Enable MPI support")
|
||||
variant(
|
||||
"implicit_conversions",
|
||||
default=True,
|
||||
default=False,
|
||||
description="Enable implicit" "conversions to/from raw pointers",
|
||||
)
|
||||
variant("benchmarks", default=True, description="Build benchmarks.")
|
||||
variant("examples", default=True, description="Build examples.")
|
||||
variant("docs", default=False, description="Build documentation")
|
||||
variant("tests", default=False, description="Build tests")
|
||||
variant("benchmarks", default=False, description="Build benchmarks.")
|
||||
variant("examples", default=False, description="Build examples.")
|
||||
variant("docs", default=False, description="Build documentation")
|
||||
variant("loop_fuser", default=False, description="Enable loop fusion capability")
|
||||
|
||||
depends_on("cmake@3.8:", type="build")
|
||||
depends_on("cmake@3.9:", type="build", when="+cuda")
|
||||
depends_on("cmake@3.18:", type="build", when="@0.12.0:")
|
||||
depends_on("cmake", type="build")
|
||||
depends_on("cmake@3.23:", type="build", when="@0.13.2:")
|
||||
depends_on("cmake@3.21:", type="build", when="@0.12.0:+rocm")
|
||||
depends_on("cmake@3.18:", type="build", when="@0.12.0:")
|
||||
depends_on("cmake@3.14:", type="build", when="@0.10.0:")
|
||||
depends_on("cmake@3.9:", type="build", when="+cuda")
|
||||
depends_on("cmake@3.8:", type="build")
|
||||
|
||||
depends_on("blt")
|
||||
depends_on("blt", type="build")
|
||||
depends_on("blt@0.6.2:", type="build", when="@0.13.0:")
|
||||
depends_on("blt@0.6.1:", type="build", when="@0.12.0:")
|
||||
depends_on("blt@0.4.0:", type="build", when="@0.3.1:")
|
||||
depends_on("blt@0.5.2:", type="build", when="@0.10.0:")
|
||||
depends_on("blt@0.4.1:", type="build", when="@0.3.1:")
|
||||
depends_on("blt@:0.3.6", type="build", when="@:0.3.0")
|
||||
conflicts("^blt@:0.3.6", when="+rocm")
|
||||
|
||||
depends_on("camp", when="@:0.11.1")
|
||||
|
||||
depends_on("umpire")
|
||||
depends_on("umpire+mpi", when="+mpi")
|
||||
depends_on("umpire@2024.07.0:", when="@0.13.2:")
|
||||
depends_on("umpire@2024.02.1:", when="@0.13.0:")
|
||||
depends_on("umpire@2024.02.0:", when="@0.12.0:")
|
||||
depends_on("umpire@2022.10.0:", when="@0.10.0:")
|
||||
|
||||
depends_on("raja")
|
||||
depends_on("raja@2024.07.0:", when="@0.13.2:")
|
||||
depends_on("raja@2024.02.2:", when="@0.13.1:")
|
||||
depends_on("raja@2024.02.1:", when="@0.13.0:")
|
||||
depends_on("raja@2024.02.0:", when="@0.12.0:")
|
||||
depends_on("raja@2022.10.5:", when="@0.10.0:")
|
||||
|
||||
# TODO: Add an enable_pick variant
|
||||
depends_on("chai+enable_pick+raja")
|
||||
depends_on("chai@2024.07.0:", when="@0.13.2:")
|
||||
depends_on("chai@2024.02.2:", when="@0.13.1:")
|
||||
depends_on("chai@2024.02.1:", when="@0.13.0:")
|
||||
depends_on("chai@2024.02.0:", when="@0.12.0:")
|
||||
|
||||
# pass on +cuda variants
|
||||
# WARNING: this package currently only supports an internal cub
|
||||
# package. This will cause a race condition if compiled with another
|
||||
# package that uses cub. TODO: have all packages point to the same external
|
||||
# cub package.
|
||||
depends_on("cub", when="+cuda")
|
||||
depends_on("camp+cuda", when="+cuda")
|
||||
depends_on("umpire+cuda~shared", when="+cuda")
|
||||
depends_on("raja+cuda~openmp", when="+cuda")
|
||||
depends_on("chai+cuda~shared", when="+cuda")
|
||||
|
||||
# variants +rocm and amdgpu_targets are not automatically passed to
|
||||
# dependencies, so do it manually.
|
||||
depends_on("camp+rocm", when="+rocm")
|
||||
depends_on("umpire+rocm", when="+rocm")
|
||||
depends_on("raja+rocm~openmp", when="+rocm")
|
||||
depends_on("chai+rocm", when="+rocm")
|
||||
for val in ROCmPackage.amdgpu_targets:
|
||||
depends_on("camp amdgpu_target=%s" % val, when="amdgpu_target=%s" % val)
|
||||
depends_on("umpire amdgpu_target=%s" % val, when="amdgpu_target=%s" % val)
|
||||
depends_on("raja amdgpu_target=%s" % val, when="amdgpu_target=%s" % val)
|
||||
depends_on("chai amdgpu_target=%s" % val, when="amdgpu_target=%s" % val)
|
||||
depends_on("chai@2022.10.0:", when="@0.10.0:")
|
||||
|
||||
conflicts("+openmp", when="+rocm")
|
||||
conflicts("+openmp", when="+cuda")
|
||||
conflicts("~tests", when="+benchmarks")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
from_variant = self.define_from_variant
|
||||
with when("+openmp"):
|
||||
depends_on("umpire+openmp")
|
||||
depends_on("raja+openmp")
|
||||
depends_on("chai+openmp")
|
||||
|
||||
options = []
|
||||
options.append("-DBLT_SOURCE_DIR={0}".format(spec["blt"].prefix))
|
||||
with when("+cuda"):
|
||||
# WARNING: this package currently only supports an internal cub
|
||||
# package. This will cause a race condition if compiled with another
|
||||
# package that uses cub. TODO: have all packages point to the same external
|
||||
# cub package.
|
||||
depends_on("cub")
|
||||
|
||||
if spec.satisfies("+cuda"):
|
||||
options.extend(
|
||||
[
|
||||
"-DENABLE_CUDA=ON",
|
||||
"-DCUDA_TOOLKIT_ROOT_DIR=" + spec["cuda"].prefix,
|
||||
"-DNVTOOLSEXT_DIR=" + spec["cuda"].prefix,
|
||||
"-DCUB_DIR=" + spec["cub"].prefix,
|
||||
]
|
||||
depends_on("umpire+cuda")
|
||||
depends_on("raja+cuda")
|
||||
depends_on("chai+cuda")
|
||||
|
||||
for sm_ in CudaPackage.cuda_arch_values:
|
||||
depends_on("umpire+cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_))
|
||||
depends_on("raja+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_))
|
||||
|
||||
with when("+rocm"):
|
||||
depends_on("umpire+rocm")
|
||||
depends_on("raja+rocm")
|
||||
depends_on("chai+rocm")
|
||||
|
||||
for arch_ in ROCmPackage.amdgpu_targets:
|
||||
depends_on(
|
||||
"umpire+rocm amdgpu_target={0}".format(arch_),
|
||||
when="amdgpu_target={0}".format(arch_),
|
||||
)
|
||||
depends_on(
|
||||
"raja+rocm amdgpu_target={0}".format(arch_), when="amdgpu_target={0}".format(arch_)
|
||||
)
|
||||
depends_on(
|
||||
"chai+rocm amdgpu_target={0}".format(arch_), when="amdgpu_target={0}".format(arch_)
|
||||
)
|
||||
|
||||
if not spec.satisfies("cuda_arch=none"):
|
||||
cuda_arch = spec.variants["cuda_arch"].value
|
||||
# Please note that within care, CUDA_ARCH is assigned to -code
|
||||
# and likewise CUDA_CODE is assigned to -arch, so these are
|
||||
# intentionally flipped here.
|
||||
options.append("-DCUDA_ARCH=sm_{0}".format(cuda_arch[0]))
|
||||
options.append("-DCUDA_CODE=compute_{0}".format(cuda_arch[0]))
|
||||
else:
|
||||
options.append("-DENABLE_CUDA=OFF")
|
||||
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}-{4}.cmake".format(
|
||||
hostname,
|
||||
self._get_sys_type(self.spec),
|
||||
self.spec.compiler.name,
|
||||
self.spec.compiler.version,
|
||||
self.spec.dag_hash(8),
|
||||
)
|
||||
|
||||
def initconfig_compiler_entries(self):
|
||||
spec = self.spec
|
||||
compiler = self.compiler
|
||||
entries = super().initconfig_compiler_entries()
|
||||
|
||||
if spec.satisfies("+rocm"):
|
||||
options.extend(["-DENABLE_HIP=ON", "-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix)])
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
llnl_link_helpers(entries, spec, compiler)
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_hardware_entries(self):
|
||||
spec = self.spec
|
||||
entries = super().initconfig_hardware_entries()
|
||||
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp")))
|
||||
|
||||
if spec.satisfies("+cuda"):
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", True))
|
||||
entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", True))
|
||||
entries.append(cmake_cache_string("NVTOOLSEXT_DIR", spec["cuda"].prefix))
|
||||
entries.append(cmake_cache_string("CUB_DIR", spec["cub"].prefix))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", False))
|
||||
|
||||
if spec.satisfies("+rocm"):
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", True))
|
||||
archs = self.spec.variants["amdgpu_target"].value
|
||||
if archs != "none":
|
||||
arch_str = ",".join(archs)
|
||||
options.append("-DHIP_HIPCC_FLAGS=--amdgpu-target={0}".format(arch_str))
|
||||
entries.append(
|
||||
cmake_cache_string("HIP_HIPCC_FLAGS", "--amdgpu-target={0}".format(arch_str))
|
||||
)
|
||||
else:
|
||||
options.append("-DENABLE_HIP=OFF")
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", False))
|
||||
|
||||
options.extend(
|
||||
[
|
||||
from_variant("CARE_ENABLE_IMPLICIT_CONVERSIONS", "implicit_conversions"),
|
||||
from_variant("CARE_ENABLE_LOOP_FUSER", "loop_fuser"),
|
||||
self.define("CAMP_DIR", spec["camp"].prefix.share.camp.cmake),
|
||||
self.define("UMPIRE_DIR", spec["umpire"].prefix.share.umpire.cmake),
|
||||
self.define("RAJA_DIR", spec["raja"].prefix.share.raja.cmake),
|
||||
self.define("CHAI_DIR", spec["chai"].prefix.share.chai.cmake),
|
||||
from_variant("CARE_ENABLE_TESTS", "tests"),
|
||||
]
|
||||
)
|
||||
return entries
|
||||
|
||||
def initconfig_mpi_entries(self):
|
||||
spec = self.spec
|
||||
|
||||
entries = super(Care, self).initconfig_mpi_entries()
|
||||
entries.append(cmake_cache_option("ENABLE_MPI", spec.satisfies("+mpi")))
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_package_entries(self):
|
||||
spec = self.spec
|
||||
entries = []
|
||||
|
||||
# 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))
|
||||
entries.append(cmake_cache_path("CAMP_DIR", spec["camp"].prefix))
|
||||
entries.append(cmake_cache_path("UMPIRE_DIR", spec["umpire"].prefix))
|
||||
entries.append(cmake_cache_path("RAJA_DIR", spec["raja"].prefix))
|
||||
entries.append(cmake_cache_path("CHAI_DIR", spec["chai"].prefix))
|
||||
|
||||
# Build options
|
||||
entries.append("#------------------{0}".format("-" * 60))
|
||||
entries.append("# Build Options")
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
|
||||
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", spec.satisfies("+tests")))
|
||||
entries.append(cmake_cache_option("CARE_ENABLE_TESTS", spec.satisfies("+tests")))
|
||||
# For tests to work, we also need BLT_ENABLE_TESTS to be on.
|
||||
# This will take care of the gtest dependency. CARE developers should
|
||||
# consider consolidating these flags in the future.
|
||||
options.append(from_variant("BLT_ENABLE_TESTS", "tests"))
|
||||
entries.append(cmake_cache_option("BLT_ENABLE_TESTS", spec.satisfies("+tests")))
|
||||
|
||||
# There are both CARE_ENABLE_* and ENABLE_* variables in here because
|
||||
# one controls the BLT infrastructure and the other controls the CARE
|
||||
# infrastructure. The goal is to just be able to use the CARE_ENABLE_*
|
||||
# variables, but CARE isn't set up correctly for that yet.
|
||||
options.append(from_variant("ENABLE_BENCHMARKS", "benchmarks"))
|
||||
options.append(from_variant("CARE_ENABLE_BENCHMARKS", "benchmarks"))
|
||||
entries.append(cmake_cache_option("ENABLE_BENCHMARKS", spec.satisfies("+benchmarks")))
|
||||
entries.append(cmake_cache_option("CARE_ENABLE_BENCHMARKS", spec.satisfies("+benchmarks")))
|
||||
|
||||
options.append(from_variant("ENABLE_EXAMPLES", "examples"))
|
||||
options.append(from_variant("CARE_ENABLE_EXAMPLES", "examples"))
|
||||
entries.append(cmake_cache_option("ENABLE_EXAMPLES", spec.satisfies("+examples")))
|
||||
entries.append(cmake_cache_option("CARE_ENABLE_EXAMPLES", spec.satisfies("+examples")))
|
||||
|
||||
options.append(from_variant("ENABLE_DOCS", "docs"))
|
||||
options.append(from_variant("CARE_ENABLE_DOCS", "docs"))
|
||||
entries.append(cmake_cache_option("ENABLE_DOCS", spec.satisfies("+docs")))
|
||||
entries.append(cmake_cache_option("CARE_ENABLE_DOCS", spec.satisfies("+docs")))
|
||||
|
||||
return options
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"CARE_ENABLE_IMPLICIT_CONVERSIONS", spec.satisfies("+implicit_conversions")
|
||||
)
|
||||
)
|
||||
|
||||
entries.append(cmake_cache_option("CARE_ENABLE_LOOP_FUSER", spec.satisfies("+loop_fuser")))
|
||||
|
||||
return entries
|
||||
|
||||
def cmake_args(self):
|
||||
return []
|
||||
|
@ -19,11 +19,17 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
git = "https://github.com/LLNL/CHAI.git"
|
||||
tags = ["ecp", "e4s", "radiuss"]
|
||||
|
||||
maintainers("davidbeckingsale", "adayton1")
|
||||
maintainers("davidbeckingsale", "adayton1", "adrienbernede")
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("develop", branch="develop", submodules=False)
|
||||
version(
|
||||
"2024.07.0",
|
||||
tag="v2024.07.0",
|
||||
commit="df7741f1dbbdc5fff5f7d626151fdf1904e62b19",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"2024.02.2",
|
||||
tag="v2024.02.2",
|
||||
@ -119,13 +125,15 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
description="Tests to run",
|
||||
)
|
||||
|
||||
depends_on("cmake@3.8:", type="build")
|
||||
depends_on("cmake", type="build")
|
||||
depends_on("cmake@3.23:", type="build", when="@2024.07.0:")
|
||||
depends_on("cmake@3.14:", type="build", when="@2022.03.0:2024.2")
|
||||
depends_on("cmake@3.9:", type="build", when="+cuda")
|
||||
depends_on("cmake@3.14:", type="build", when="@2022.03.0:")
|
||||
depends_on("cmake@3.8:", type="build")
|
||||
|
||||
depends_on("blt")
|
||||
depends_on("blt", type="build")
|
||||
depends_on("blt@0.6.2:", type="build", when="@2024.02.1:")
|
||||
depends_on("blt@0.6.1:", type="build", when="@2024.02.0:")
|
||||
depends_on("blt@0.6.1", type="build", when="@2024.02.0")
|
||||
depends_on("blt@0.5.3", type="build", when="@2023.06.0")
|
||||
depends_on("blt@0.5.2:0.5.3", type="build", when="@2022.10.0")
|
||||
depends_on("blt@0.5.0:0.5.3", type="build", when="@2022.03.0")
|
||||
@ -135,8 +143,9 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
conflicts("^blt@:0.3.6", when="+rocm")
|
||||
|
||||
depends_on("umpire")
|
||||
depends_on("umpire@2024.02.1:", when="@2024.02.1:")
|
||||
depends_on("umpire@2024.02.0:", when="@2024.02.0:")
|
||||
depends_on("umpire@2024.07.0:", when="@2024.07.0:")
|
||||
depends_on("umpire@2024.02.1", when="@2024.02.1")
|
||||
depends_on("umpire@2024.02.0", when="@2024.02.0")
|
||||
depends_on("umpire@2023.06.0", when="@2023.06.0")
|
||||
depends_on("umpire@2022.10.0:2023.06.0", when="@2022.10.0")
|
||||
depends_on("umpire@2022.03.0:2023.06.0", when="@2022.03.0")
|
||||
@ -149,6 +158,8 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
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("@2024.02.0:"):
|
||||
depends_on("umpire~fmt_header_only")
|
||||
|
||||
with when("+rocm"):
|
||||
depends_on("umpire+rocm")
|
||||
@ -160,15 +171,16 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
with when("+raja"):
|
||||
depends_on("raja~openmp", when="~openmp")
|
||||
depends_on("raja+openmp", when="+openmp")
|
||||
depends_on("raja@2024.02.2:", when="@2024.02.2:")
|
||||
depends_on("raja@2024.02.1:", when="@2024.02.1:")
|
||||
depends_on("raja@2024.02.0:", when="@2024.02.0:")
|
||||
depends_on("raja@2024.07.0:", when="@2024.07.0:")
|
||||
depends_on("raja@2024.02.2", when="@2024.02.2")
|
||||
depends_on("raja@2024.02.1", when="@2024.02.1")
|
||||
depends_on("raja@2024.02.0", when="@2024.02.0")
|
||||
depends_on("raja@2023.06.0", when="@2023.06.0")
|
||||
depends_on("raja@2022.10.0:2023.06.0", when="@2022.10.0")
|
||||
depends_on("raja@2022.03.0:2023.06.0", when="@2022.03.0")
|
||||
depends_on("raja@0.12.0", when="@2.2.0:2.2.2")
|
||||
depends_on("raja@0.13.0", when="@2.3.0")
|
||||
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")
|
||||
|
||||
with when("+cuda"):
|
||||
depends_on("raja+cuda")
|
||||
@ -229,7 +241,6 @@ def initconfig_hardware_entries(self):
|
||||
if spec.satisfies("+separable_compilation"):
|
||||
entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True))
|
||||
entries.append(cmake_cache_option("CUDA_SEPARABLE_COMPILATION", True))
|
||||
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", False))
|
||||
|
||||
@ -244,7 +255,7 @@ def initconfig_mpi_entries(self):
|
||||
spec = self.spec
|
||||
|
||||
entries = super(Chai, self).initconfig_mpi_entries()
|
||||
entries.append(cmake_cache_option("ENABLE_MPI", "+mpi" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_MPI", spec.satisfies("+mpi")))
|
||||
|
||||
return entries
|
||||
|
||||
@ -259,10 +270,17 @@ def initconfig_package_entries(self):
|
||||
entries.append("# TPLs")
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
# - BLT
|
||||
entries.append(cmake_cache_path("BLT_SOURCE_DIR", spec["blt"].prefix))
|
||||
|
||||
# - RAJA
|
||||
if spec.satisfies("+raja"):
|
||||
entries.append(cmake_cache_option("{}ENABLE_RAJA_PLUGIN".format(option_prefix), True))
|
||||
entries.append(cmake_cache_path("RAJA_DIR", spec["raja"].prefix))
|
||||
else:
|
||||
entries.append(cmake_cache_option("{}ENABLE_RAJA_PLUGIN".format(option_prefix), False))
|
||||
|
||||
# - Umpire
|
||||
entries.append(cmake_cache_path("umpire_DIR", spec["umpire"].prefix))
|
||||
|
||||
# Build options
|
||||
@ -270,24 +288,25 @@ def initconfig_package_entries(self):
|
||||
entries.append("# Build Options")
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
# Build options
|
||||
entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
|
||||
|
||||
# Generic options that have a prefixed equivalent in CHAI CMake
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_EXAMPLES", "+examples" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp")))
|
||||
entries.append(cmake_cache_option("ENABLE_EXAMPLES", spec.satisfies("+examples")))
|
||||
entries.append(cmake_cache_option("ENABLE_DOCS", False))
|
||||
if spec.satisfies("tests=benchmarks"):
|
||||
# BLT requires ENABLE_TESTS=True to enable benchmarks
|
||||
entries.append(cmake_cache_option("ENABLE_BENCHMARKS", True))
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", True))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", "tests=none" not in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", not spec.satisfies("tests=none")))
|
||||
|
||||
# Prefixed options that used to be name without one
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_PICK".format(option_prefix), "+enable_pick" in spec)
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_PICK".format(option_prefix), spec.satisfies("+enable_pick")
|
||||
)
|
||||
)
|
||||
|
||||
return entries
|
||||
|
@ -101,10 +101,10 @@ class Fmt(CMakePackage):
|
||||
|
||||
# Fix 'variable "buffer" may not be initialized' compiler error
|
||||
patch(
|
||||
"fmt-no-variable-initialize_10.0.0.patch", when="@10.0.0:10.2.1%clang@12.0.1.ibm.gcc.8.3.1"
|
||||
"fmt-no-variable-initialize_10.0.0.patch", when="@10.0.0:11.0.2%clang@12.0.1.ibm.gcc.8.3.1"
|
||||
)
|
||||
patch(
|
||||
"fmt-no-variable-initialize_10.0.0.patch", when="@10.0.0:10.2.1%clang@14.0.5.ibm.gcc.8.3.1"
|
||||
"fmt-no-variable-initialize_10.0.0.patch", when="@10.0.0:11.0.2%clang@14.0.5.ibm.gcc.8.3.1"
|
||||
)
|
||||
|
||||
def cmake_args(self):
|
||||
|
344
var/spack/repos/builtin/packages/raja-perf/package.py
Normal file
344
var/spack/repos/builtin/packages/raja-perf/package.py
Normal file
@ -0,0 +1,344 @@
|
||||
# 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 socket
|
||||
|
||||
from spack.package import *
|
||||
|
||||
from .blt import llnl_link_helpers
|
||||
|
||||
|
||||
class RajaPerf(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
"""RAJA Performance Suite."""
|
||||
|
||||
homepage = "https://github.com/LLNL/RAJAPerf"
|
||||
git = "https://github.com/LLNL/RAJAPerf.git"
|
||||
tags = ["radiuss"]
|
||||
|
||||
maintainers("davidbeckingsale", "adrienbernede")
|
||||
|
||||
license("BSD-3-Clause")
|
||||
|
||||
version("develop", branch="develop", submodules="True")
|
||||
version("main", branch="main", submodules="True")
|
||||
version(
|
||||
"2024.07.0",
|
||||
tag="v2024.07.0",
|
||||
commit="6e81aa58af244a13755a694bfdc7bc301139a244",
|
||||
submodules="True",
|
||||
)
|
||||
version(
|
||||
"2023.06.0",
|
||||
tag="v2023.06.0",
|
||||
commit="e5b2102f50e4642f53d9c86fb622b398a748974a",
|
||||
submodules="True",
|
||||
)
|
||||
version(
|
||||
"2022.10.0",
|
||||
tag="v2022.10.0",
|
||||
commit="57ee53e402d2ac0a398df39ad1ca85cf1d2be45b",
|
||||
submodules="True",
|
||||
)
|
||||
version(
|
||||
"0.12.0",
|
||||
tag="v0.12.0",
|
||||
commit="388c1d7562e1cb364191cb34c1ff62f3cadf54a0",
|
||||
submodules="True",
|
||||
)
|
||||
version(
|
||||
"0.11.0",
|
||||
tag="v0.11.0",
|
||||
commit="22ac1de533ebd477c781d53962a92478c0a11d43",
|
||||
submodules="True",
|
||||
)
|
||||
version(
|
||||
"0.10.0",
|
||||
tag="v0.10.0",
|
||||
commit="6bf725af38da41b1ebd1d29c75ffa5b8e57f7cbf",
|
||||
submodules="True",
|
||||
)
|
||||
version(
|
||||
"0.9.0", tag="v0.9.0", commit="064dd17dae696c3e440eeb7469fa90341858a636", submodules="True"
|
||||
)
|
||||
version(
|
||||
"0.8.0", tag="v0.8.0", commit="94c65b2caefec2220f712f34c2a198b682ca7e23", submodules="True"
|
||||
)
|
||||
version(
|
||||
"0.7.0", tag="v0.7.0", commit="a6ef0279d9d240199947d872d8f28bf121f2192c", submodules="True"
|
||||
)
|
||||
version(
|
||||
"0.6.0", tag="v0.6.0", commit="21e476f031bc10bbdb8514425c380553bfb23bdc", submodules="True"
|
||||
)
|
||||
version(
|
||||
"0.5.2", tag="v0.5.2", commit="2da5e27bc648ff5540ffa69bbde67f125e4581d3", submodules="True"
|
||||
)
|
||||
version(
|
||||
"0.5.1", tag="v0.5.1", commit="a7b6f63e4fef2d0146932eff409788da51ab0cb3", submodules="True"
|
||||
)
|
||||
version(
|
||||
"0.5.0", tag="v0.5.0", commit="888f5ebe69a9b2ae35058cf8fb8d89d91a379bea", submodules="True"
|
||||
)
|
||||
version(
|
||||
"0.4.0", tag="v0.4.0", commit="a8f669c1ad01d51132a4e3d9d6aa8b2cabc9eff0", submodules="True"
|
||||
)
|
||||
|
||||
depends_on("cxx", type="build") # generated
|
||||
|
||||
variant("mpi", default=False, description="Enable MPI support")
|
||||
variant("openmp", default=False, description="Build OpenMP backend")
|
||||
variant("omptarget", default=False, description="Build with OpenMP target support")
|
||||
variant("sycl", default=False, description="Build sycl backend")
|
||||
variant("shared", default=False, description="Build Shared Libs")
|
||||
variant("omptask", default=False, description="Build OpenMP task variants of algorithms")
|
||||
variant(
|
||||
"tests",
|
||||
default="basic",
|
||||
values=("none", "basic", "benchmarks"),
|
||||
multi=False,
|
||||
description="Tests to run",
|
||||
)
|
||||
variant("caliper", default=False, description="Build with support for Caliper based profiling")
|
||||
|
||||
depends_on("blt")
|
||||
depends_on("blt@0.6.2:", type="build", when="@2024.07.0:")
|
||||
depends_on("blt@0.5.3", type="build", when="@2023.06")
|
||||
depends_on("blt@0.5.2:0.5.3", type="build", when="@2022.10")
|
||||
depends_on("blt@0.5.0:", type="build", when="@0.12.0:")
|
||||
depends_on("blt@0.4.1:", type="build", when="@0.11.0:")
|
||||
depends_on("blt@0.4.0:", type="build", when="@0.8.0:")
|
||||
depends_on("blt@0.3.0:", type="build", when="@:0.7.0")
|
||||
|
||||
depends_on("cmake@3.23:", when="@2024.07.0:", type="build")
|
||||
depends_on("cmake@3.23:", when="@0.12.0:2023.06.0 +rocm", type="build")
|
||||
depends_on("cmake@3.20:", when="@0.12.0:2023.06.0", type="build")
|
||||
depends_on("cmake@3.14:", when="@:0.12.0", type="build")
|
||||
|
||||
depends_on("mpi", when="+mpi")
|
||||
|
||||
depends_on("llvm-openmp", when="+openmp %apple-clang")
|
||||
|
||||
depends_on("rocprim", when="+rocm")
|
||||
|
||||
depends_on("caliper@2.9.0:", when="+caliper")
|
||||
depends_on("caliper@2.9.0: +cuda", when="+caliper +cuda")
|
||||
depends_on("caliper@2.9.0: +rocm", when="+caliper +rocm")
|
||||
|
||||
with when("@0.12.0: +rocm +caliper"):
|
||||
depends_on("caliper +rocm")
|
||||
for arch in ROCmPackage.amdgpu_targets:
|
||||
depends_on(
|
||||
"caliper +rocm amdgpu_target={0}".format(arch),
|
||||
when="amdgpu_target={0}".format(arch),
|
||||
)
|
||||
conflicts("+openmp", when="@:2022.03")
|
||||
|
||||
with when("@0.12.0: +cuda +caliper"):
|
||||
depends_on("caliper +cuda")
|
||||
for sm_ in CudaPackage.cuda_arch_values:
|
||||
depends_on("caliper +cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_))
|
||||
|
||||
conflicts("~openmp", when="+omptarget", msg="OpenMP target requires OpenMP")
|
||||
conflicts("+cuda", when="+omptarget", msg="Cuda may not be activated when omptarget is ON")
|
||||
conflicts("+omptarget +rocm")
|
||||
conflicts("+sycl +omptarget")
|
||||
conflicts("+sycl +rocm")
|
||||
# Using RAJA version as threshold on purpose (no 2024.02 version of RAJAPerf were released).
|
||||
conflicts(
|
||||
"+sycl",
|
||||
when="@:2024.02.99",
|
||||
msg="Support for SYCL was introduced in RAJA after 2024.02 release, "
|
||||
"please use a newer release.",
|
||||
)
|
||||
|
||||
def _get_sys_type(self, spec):
|
||||
sys_type = str(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}-{4}.cmake".format(
|
||||
hostname,
|
||||
self._get_sys_type(self.spec),
|
||||
self.spec.compiler.name,
|
||||
self.spec.compiler.version,
|
||||
self.spec.dag_hash(8),
|
||||
)
|
||||
|
||||
def initconfig_compiler_entries(self):
|
||||
spec = self.spec
|
||||
compiler = self.compiler
|
||||
# Default entries are already defined in CachedCMakePackage, inherit them:
|
||||
entries = super().initconfig_compiler_entries()
|
||||
|
||||
if spec.satisfies("+rocm"):
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
# adrienbernede-23-01
|
||||
# Maybe we want to share this in the above llnl_link_helpers function.
|
||||
compilers_using_cxx14 = ["intel-17", "intel-18", "xl"]
|
||||
if any(compiler in self.compiler.cxx for compiler in compilers_using_cxx14):
|
||||
entries.append(cmake_cache_string("BLT_CXX_STD", "c++14"))
|
||||
|
||||
llnl_link_helpers(entries, spec, compiler)
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_hardware_entries(self):
|
||||
spec = self.spec
|
||||
compiler = self.compiler
|
||||
entries = super().initconfig_hardware_entries()
|
||||
|
||||
entries.append("#------------------{0}".format("-" * 30))
|
||||
entries.append("# Package custom hardware settings")
|
||||
entries.append("#------------------{0}\n".format("-" * 30))
|
||||
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
|
||||
|
||||
# T benefit from the shared function "cuda_for_radiuss_projects",
|
||||
# we do not modify CMAKE_CUDA_FLAGS: it is already appended by the
|
||||
# shared function.
|
||||
if "+cuda" in spec:
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", True))
|
||||
# Shared handling of cuda.
|
||||
|
||||
# Custom options.
|
||||
# We place everything in CMAKE_CUDA_FLAGS_(RELEASE|RELWITHDEBINFO|DEBUG)
|
||||
# which are not set by cuda_for_radiuss_projects
|
||||
if "xl" in compiler.cxx:
|
||||
all_targets_flags = (
|
||||
"-Xcompiler -qstrict -Xcompiler -qxlcompatmacros -Xcompiler -qalias=noansi"
|
||||
+ "-Xcompiler -qsmp=omp -Xcompiler -qhot -Xcompiler -qnoeh"
|
||||
+ "-Xcompiler -qsuppress=1500-029 -Xcompiler -qsuppress=1500-036"
|
||||
+ "-Xcompiler -qsuppress=1500-030"
|
||||
)
|
||||
cuda_release_flags = "-O3 -Xcompiler -O2 " + all_targets_flags
|
||||
cuda_reldebinf_flags = "-O3 -g -Xcompiler -O2 " + all_targets_flags
|
||||
cuda_debug_flags = "-O0 -g -Xcompiler -O2 " + all_targets_flags
|
||||
|
||||
elif "gcc" in compiler.cxx:
|
||||
all_targets_flags = "-Xcompiler -finline-functions -Xcompiler -finline-limit=20000"
|
||||
|
||||
cuda_release_flags = "-O3 -Xcompiler -Ofast " + all_targets_flags
|
||||
cuda_reldebinf_flags = "-O3 -g -Xcompiler -Ofast " + all_targets_flags
|
||||
cuda_debug_flags = "-O0 -g -Xcompiler -O0 " + all_targets_flags
|
||||
|
||||
else:
|
||||
all_targets_flags = "-Xcompiler -finline-functions"
|
||||
|
||||
cuda_release_flags = "-O3 -Xcompiler -Ofast " + all_targets_flags
|
||||
cuda_reldebinf_flags = "-O3 -g -Xcompiler -Ofast " + all_targets_flags
|
||||
cuda_debug_flags = "-O0 -g -Xcompiler -O0 " + all_targets_flags
|
||||
|
||||
entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS_RELEASE", cuda_release_flags))
|
||||
entries.append(
|
||||
cmake_cache_string("CMAKE_CUDA_FLAGS_RELWITHDEBINFO", cuda_reldebinf_flags)
|
||||
)
|
||||
entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS_DEBUG", cuda_debug_flags))
|
||||
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", False))
|
||||
|
||||
if "+rocm" in spec:
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", True))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", False))
|
||||
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP_TARGET", "+omptarget" in spec))
|
||||
if "+omptarget" in spec:
|
||||
if "%xl" in spec:
|
||||
entries.append(
|
||||
cmake_cache_string(
|
||||
"BLT_OPENMP_COMPILE_FLAGS", "-qoffload;-qsmp=omp;-qnoeh;-qalias=noansi"
|
||||
)
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_string(
|
||||
"BLT_OPENMP_LINK_FLAGS", "-qoffload;-qsmp=omp;-qnoeh;-qalias=noansi"
|
||||
)
|
||||
)
|
||||
if "%clang" in spec:
|
||||
entries.append(
|
||||
cmake_cache_string(
|
||||
"BLT_OPENMP_COMPILE_FLAGS", "-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"
|
||||
)
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_string(
|
||||
"BLT_OPENMP_LINK_FLAGS", "-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"
|
||||
)
|
||||
)
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_mpi_entries(self):
|
||||
spec = self.spec
|
||||
entries = super().initconfig_mpi_entries()
|
||||
|
||||
entries.append(cmake_cache_option("ENABLE_MPI", "+mpi" in spec))
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_package_entries(self):
|
||||
spec = self.spec
|
||||
entries = []
|
||||
|
||||
# option_prefix = "RAJA_" if spec.satisfies("@0.14.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 "caliper" in self.spec:
|
||||
entries.append(
|
||||
cmake_cache_path("caliper_DIR", spec["caliper"].prefix + "/share/cmake/caliper/")
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_path("adiak_DIR", spec["adiak"].prefix + "/lib/cmake/adiak/")
|
||||
)
|
||||
|
||||
# Build options
|
||||
entries.append("#------------------{0}".format("-" * 60))
|
||||
entries.append("# Build Options")
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
|
||||
|
||||
entries.append(cmake_cache_string("RAJA_RANGE_ALIGN", "4"))
|
||||
entries.append(cmake_cache_string("RAJA_RANGE_MIN_LENGTH", "32"))
|
||||
entries.append(cmake_cache_string("RAJA_DATA_ALIGN", "64"))
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_HOST_CONFIG_LOADED", True))
|
||||
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_OPENMP_TASK", "+omptask" in spec))
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_SYCL", spec.satisfies("+sycl")))
|
||||
|
||||
# C++17
|
||||
if spec.satisfies("@2024.07.0:") and spec.satisfies("+sycl"):
|
||||
entries.append(cmake_cache_string("BLT_CXX_STD", "c++17"))
|
||||
# C++14
|
||||
# Using RAJA version as threshold on purpose (no 0.14 version of RAJAPerf were released).
|
||||
elif spec.satisfies("@0.14.0:"):
|
||||
entries.append(cmake_cache_string("BLT_CXX_STD", "c++14"))
|
||||
|
||||
entries.append(cmake_cache_option("ENABLE_BENCHMARKS", "tests=benchmarks" in spec))
|
||||
entries.append(
|
||||
cmake_cache_option("ENABLE_TESTS", "tests=none" not in spec or self.run_tests)
|
||||
)
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_PERFSUITE_USE_CALIPER", "+caliper" in spec))
|
||||
|
||||
return entries
|
||||
|
||||
def cmake_args(self):
|
||||
return []
|
@ -32,6 +32,12 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
version("develop", branch="develop", submodules=submodules)
|
||||
version("main", branch="main", submodules=submodules)
|
||||
version(
|
||||
"2024.07.0",
|
||||
tag="v2024.07.0",
|
||||
commit="4d7fcba55ebc7cb972b7cc9f6778b48e43792ea1",
|
||||
submodules=submodules,
|
||||
)
|
||||
version(
|
||||
"2024.02.2",
|
||||
tag="v2024.02.2",
|
||||
@ -177,6 +183,8 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
variant(
|
||||
"omptask", default=False, description="Build OpenMP task variants of internal algorithms"
|
||||
)
|
||||
variant("omptarget", default=False, description="Build OpenMP on target device support")
|
||||
variant("sycl", default=False, description="Build sycl backend")
|
||||
|
||||
variant("plugins", default=False, description="Enable runtime plugins")
|
||||
variant("examples", default=True, description="Build examples.")
|
||||
@ -196,7 +204,7 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
depends_on("blt", type="build")
|
||||
depends_on("blt@0.6.2:", type="build", when="@2024.02.1:")
|
||||
depends_on("blt@0.6.1:", type="build", when="@2024.02.0:")
|
||||
depends_on("blt@0.6.1", type="build", when="@2024.02.0")
|
||||
depends_on("blt@0.5.3", type="build", when="@2023.06.0:2023.06.1")
|
||||
depends_on("blt@0.5.2:0.5.3", type="build", when="@2022.10.5")
|
||||
depends_on("blt@0.5.0:0.5.3", type="build", when="@0.14.1:2022.10.4")
|
||||
@ -205,22 +213,25 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("blt@0.3.6:0.4.1", type="build", when="@:0.12.0")
|
||||
conflicts("^blt@:0.3.6", when="+rocm")
|
||||
|
||||
depends_on("camp")
|
||||
depends_on("camp+openmp", when="+openmp")
|
||||
depends_on("camp@main", when="@develop")
|
||||
depends_on("camp@main", when="@main")
|
||||
depends_on("camp@2024.02.1:", type="build", when="@2024.02.1:")
|
||||
depends_on("camp@2024.02.0:", type="build", when="@2024.02.0:")
|
||||
depends_on("camp@2023.06.0", type="build", when="@2023.06.0:2023.06.1")
|
||||
depends_on("camp@2022.10.1:2023.06.0", type="build", when="@2022.10.3:2022.10.5")
|
||||
depends_on("camp@2022.10.0:2023.06.0", type="build", when="@2022.10.0:2022.10.2")
|
||||
depends_on("camp@2022.03.2", type="build", when="@2022.03.0:2022.03.1")
|
||||
depends_on("camp+omptarget", when="+omptarget")
|
||||
depends_on("camp+sycl", when="+sycl")
|
||||
depends_on("camp@2024.07.0:", when="@2024.02.2:")
|
||||
depends_on("camp@2024.02.1", when="@2024.02.1")
|
||||
depends_on("camp@2024.02.0", when="@2024.02.0")
|
||||
depends_on("camp@2023.06.0", when="@2023.06.0:2023.06.1")
|
||||
depends_on("camp@2022.10.1:2023.06.0", when="@2022.10.3:2022.10.5")
|
||||
depends_on("camp@2022.10.0:2023.06.0", when="@2022.10.0:2022.10.2")
|
||||
depends_on("camp@2022.03.2", when="@2022.03.0:2022.03.1")
|
||||
depends_on("camp@0.2.2:0.2.3", when="@0.14.0")
|
||||
depends_on("camp@0.1.0", when="@0.10.0:0.13.0")
|
||||
|
||||
depends_on("cmake@3.23:", when="@2022.10.0:+rocm", type="build")
|
||||
depends_on("cmake@3.20:", when="@2022.10.0:", type="build")
|
||||
depends_on("cmake@3.14:", when="@2022.03.0:", type="build")
|
||||
depends_on("cmake@:3.20", when="@:2022.03+rocm", type="build")
|
||||
depends_on("cmake@3.23:", when="@2024.07.0:", type="build")
|
||||
depends_on("cmake@3.23:", when="@2022.10.0:2024.02.2+rocm", type="build")
|
||||
depends_on("cmake@3.20:", when="@2022.10.0:2024.02.2", type="build")
|
||||
depends_on("cmake@3.20:", when="@:2022.03+rocm", type="build")
|
||||
depends_on("cmake@3.14:", when="@:2022.03", type="build")
|
||||
|
||||
depends_on("llvm-openmp", when="+openmp %apple-clang")
|
||||
|
||||
@ -238,6 +249,16 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
for sm_ in CudaPackage.cuda_arch_values:
|
||||
depends_on("camp +cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_))
|
||||
|
||||
conflicts("+omptarget +rocm")
|
||||
conflicts("+sycl +omptarget")
|
||||
conflicts("+sycl +rocm")
|
||||
conflicts(
|
||||
"+sycl",
|
||||
when="@:2024.02.99",
|
||||
msg="Support for SYCL was introduced in RAJA after 2024.02 release, "
|
||||
"please use a newer release.",
|
||||
)
|
||||
|
||||
def _get_sys_type(self, spec):
|
||||
sys_type = spec.architecture
|
||||
if "SYS_TYPE" in env:
|
||||
@ -268,7 +289,7 @@ def initconfig_compiler_entries(self):
|
||||
# Default entries are already defined in CachedCMakePackage, inherit them:
|
||||
entries = super().initconfig_compiler_entries()
|
||||
|
||||
if "+rocm" in spec:
|
||||
if spec.satisfies("+rocm"):
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
llnl_link_helpers(entries, spec, compiler)
|
||||
@ -283,14 +304,14 @@ def initconfig_hardware_entries(self):
|
||||
entries.append("# Package custom hardware settings")
|
||||
entries.append("#------------------{0}\n".format("-" * 30))
|
||||
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp")))
|
||||
|
||||
if "+cuda" in spec:
|
||||
if spec.satisfies("+cuda"):
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", True))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", False))
|
||||
|
||||
if "+rocm" in spec:
|
||||
if spec.satisfies("+rocm"):
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", True))
|
||||
hipcc_flags = []
|
||||
if self.spec.satisfies("@0.14.0:"):
|
||||
@ -322,35 +343,62 @@ def initconfig_package_entries(self):
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_DESUL_ATOMICS", "+desul" in spec))
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_VECTORIZATION", "+vectorization" in spec))
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_OPENMP_TASK", "+omptask" in spec))
|
||||
|
||||
# C++14
|
||||
if spec.satisfies("@0.14.0:"):
|
||||
entries.append(cmake_cache_string("BLT_CXX_STD", "c++14"))
|
||||
|
||||
if "+desul" in spec:
|
||||
if "+cuda" in spec:
|
||||
entries.append(cmake_cache_string("CMAKE_CUDA_STANDARD", "14"))
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_RUNTIME_PLUGINS", "+plugins" in spec))
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_DESUL_ATOMICS", spec.satisfies("+desul")))
|
||||
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_EXAMPLES".format(option_prefix), "+examples" in spec)
|
||||
cmake_cache_option("RAJA_ENABLE_VECTORIZATION", spec.satisfies("+vectorization"))
|
||||
)
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_OPENMP_TASK", spec.satisfies("+omptask")))
|
||||
|
||||
entries.append(
|
||||
cmake_cache_option("RAJA_ENABLE_TARGET_OPENMP", spec.satisfies("+omptarget"))
|
||||
)
|
||||
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_SYCL", spec.satisfies("+sycl")))
|
||||
|
||||
# C++17
|
||||
if spec.satisfies("@2024.07.0:") and spec.satisfies("+sycl"):
|
||||
entries.append(cmake_cache_string("BLT_CXX_STD", "c++17"))
|
||||
# C++14
|
||||
elif spec.satisfies("@0.14.0:"):
|
||||
entries.append(cmake_cache_string("BLT_CXX_STD", "c++14"))
|
||||
|
||||
if spec.satisfies("+desul"):
|
||||
if spec.satisfies("+cuda"):
|
||||
entries.append(cmake_cache_string("CMAKE_CUDA_STANDARD", "14"))
|
||||
|
||||
entries.append(
|
||||
cmake_cache_option("RAJA_ENABLE_RUNTIME_PLUGINS", spec.satisfies("+plugins"))
|
||||
)
|
||||
|
||||
if spec.satisfies("+omptarget"):
|
||||
entries.append(
|
||||
cmake_cache_string(
|
||||
"BLT_OPENMP_COMPILE_FLAGS", "-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"
|
||||
)
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_string(
|
||||
"BLT_OPENMP_LINK_FLAGS", "-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"
|
||||
)
|
||||
)
|
||||
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_EXAMPLES".format(option_prefix), spec.satisfies("+examples")
|
||||
)
|
||||
)
|
||||
if spec.satisfies("@0.14.0:"):
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_EXERCISES".format(option_prefix), "+exercises" in spec
|
||||
"{}ENABLE_EXERCISES".format(option_prefix), spec.satisfies("+exercises")
|
||||
)
|
||||
)
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_EXERCISES", "+exercises" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_EXERCISES", spec.satisfies("+exercises")))
|
||||
|
||||
# TODO: Treat the workaround when building tests with spack wrapper
|
||||
# For now, removing it to test CI, which builds tests outside of wrapper.
|
||||
@ -359,12 +407,12 @@ def initconfig_package_entries(self):
|
||||
# removes -Werror from GTest flags
|
||||
#
|
||||
# if self.spec.satisfies("%clang target=ppc64le:")
|
||||
# or (not self.run_tests and "+tests" not in spec):
|
||||
if not self.run_tests and "+tests" not in spec:
|
||||
# or (not self.run_tests and not spec.satisfies("+tests")):
|
||||
if not self.run_tests and not spec.satisfies("+tests"):
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", False))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", True))
|
||||
if "+run-all-tests" not in spec:
|
||||
if not spec.satisfies("+run-all-tests"):
|
||||
if spec.satisfies("%clang@12.0.0:13.9.999"):
|
||||
entries.append(
|
||||
cmake_cache_string(
|
||||
|
@ -24,6 +24,12 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
license("MIT")
|
||||
|
||||
version("develop", branch="develop", submodules=False)
|
||||
version(
|
||||
"2024.07.0",
|
||||
tag="v2024.07.0",
|
||||
commit="abd729f40064175e999a83d11d6b073dac4c01d2",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"2024.02.1",
|
||||
tag="v2024.02.1",
|
||||
@ -196,7 +202,7 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
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("openmp_target", default=False, description="Build with OpenMP 4.5 support")
|
||||
variant("omptarget", default=False, description="Build with OpenMP 4.5 support")
|
||||
variant("deviceconst", default=False, description="Enables support for constant device memory")
|
||||
variant("examples", default=False, description="Build Umpire Examples")
|
||||
variant(
|
||||
@ -213,16 +219,19 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
variant("werror", default=False, description="Enable warnings as errors")
|
||||
variant("asan", default=False, description="Enable ASAN")
|
||||
variant("sanitizer_tests", default=False, description="Enable address sanitizer tests")
|
||||
variant("fmt_header_only", default=True, description="Link to header-only fmt target")
|
||||
|
||||
depends_on("cmake@3.23:", when="@2024.07.0:", type="build")
|
||||
depends_on("cmake@3.23:", when="@2022.10.0: +rocm", type="build")
|
||||
depends_on("cmake@3.20:", when="@2022.10.0:", type="build")
|
||||
depends_on("cmake@3.20:", when="@2022.10.0:2024.02.1", type="build")
|
||||
depends_on("cmake@:3.20", when="@2022.03.0:2022.03 +rocm", type="build")
|
||||
depends_on("cmake@3.14:", when="@2022.03.0:", type="build")
|
||||
depends_on("cmake@3.9:", when="+cuda", type="build")
|
||||
depends_on("cmake@3.8:", type="build")
|
||||
|
||||
depends_on("blt", type="build")
|
||||
depends_on("blt@0.6.1:", type="build", when="@2024.02.0:")
|
||||
depends_on("blt@0.6.2:", type="build", when="@2024.02.1:")
|
||||
depends_on("blt@0.6.1", type="build", when="@2024.02.0")
|
||||
depends_on("blt@0.5.3", type="build", when="@2023.06.0")
|
||||
depends_on("blt@0.5.2:0.5.3", type="build", when="@2022.10.0")
|
||||
depends_on("blt@0.5.0:0.5.3", type="build", when="@2022.03.0:2022.03.1")
|
||||
@ -235,7 +244,9 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("camp+openmp", when="+openmp")
|
||||
depends_on("camp~cuda", when="~cuda")
|
||||
depends_on("camp@main", when="@develop")
|
||||
depends_on("camp@2024.02.0:", when="@2024.02.0:")
|
||||
depends_on("camp@2024.07.0:", when="@2024.07.0:")
|
||||
depends_on("camp@2024.02.1", when="@2024.02.1")
|
||||
depends_on("camp@2024.02.0", when="@2024.02.0")
|
||||
depends_on("camp@2023.06.0", when="@2023.06.0")
|
||||
depends_on("camp@2022.10.0:2023.06.0", when="@2022.10.0")
|
||||
depends_on("camp@2022.03.2:2023.06.0", when="@2022.03.0:2022.03.1")
|
||||
@ -273,13 +284,11 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
conflicts("+device_alloc", when="~rocm~cuda")
|
||||
|
||||
conflicts("+deviceconst", when="~rocm~cuda")
|
||||
conflicts("~openmp", when="+openmp_target", msg="OpenMP target requires OpenMP")
|
||||
conflicts("~openmp", when="+omptarget", msg="OpenMP target requires OpenMP")
|
||||
conflicts("+cuda", when="+rocm")
|
||||
conflicts("+tools", when="+rocm")
|
||||
conflicts(
|
||||
"+rocm",
|
||||
when="+openmp_target",
|
||||
msg="Cant support both rocm and openmp device backends at once",
|
||||
"+rocm", when="+omptarget", msg="Cant support both rocm and openmp device backends at once"
|
||||
)
|
||||
conflicts("+ipc_shmem", when="@:5.0.1")
|
||||
|
||||
@ -320,12 +329,14 @@ def initconfig_compiler_entries(self):
|
||||
|
||||
option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else ""
|
||||
|
||||
if "+fortran" in spec and compiler.fc is not None:
|
||||
if spec.satisfies("+fortran") and 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))
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_C".format(option_prefix), spec.satisfies("+c"))
|
||||
)
|
||||
|
||||
llnl_link_helpers(entries, spec, compiler)
|
||||
|
||||
@ -341,31 +352,31 @@ def initconfig_hardware_entries(self):
|
||||
|
||||
option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else ""
|
||||
|
||||
if "+cuda" in spec:
|
||||
if spec.satisfies("+cuda"):
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", True))
|
||||
# Umpire used to pick only the first architecture in the list. The shared logic in
|
||||
# CachedCMakePackage keeps the list of architectures.
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_CUDA", False))
|
||||
|
||||
if "+rocm" in spec:
|
||||
if spec.satisfies("+rocm"):
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", True))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", False))
|
||||
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_DEVICE_CONST".format(option_prefix), "+deviceconst" in spec
|
||||
"{}ENABLE_DEVICE_CONST".format(option_prefix), spec.satisfies("+deviceconst")
|
||||
)
|
||||
)
|
||||
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_OPENMP_TARGET".format(option_prefix), "+openmp_target" in spec
|
||||
"{}ENABLE_OPENMP_TARGET".format(option_prefix), spec.satisfies("+omptarget")
|
||||
)
|
||||
)
|
||||
|
||||
if "+openmp_target" in spec and "%xl" in spec:
|
||||
if spec.satisfies("+omptarget") and spec.satisfies("%xl"):
|
||||
entries.append(cmake_cache_string("OpenMP_CXX_FLAGS", "-qsmp;-qoffload"))
|
||||
|
||||
return entries
|
||||
@ -373,8 +384,8 @@ def initconfig_hardware_entries(self):
|
||||
def initconfig_mpi_entries(self):
|
||||
spec = self.spec
|
||||
|
||||
entries = super(Umpire, self).initconfig_mpi_entries()
|
||||
entries.append(cmake_cache_option("ENABLE_MPI", "+mpi" in spec))
|
||||
entries = super().initconfig_mpi_entries()
|
||||
entries.append(cmake_cache_option("ENABLE_MPI", spec.satisfies("+mpi")))
|
||||
|
||||
return entries
|
||||
|
||||
@ -402,58 +413,73 @@ def initconfig_package_entries(self):
|
||||
entries.append("#------------------{0}\n".format("-" * 60))
|
||||
|
||||
entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_WARNINGS_AS_ERRORS", "+werror" in spec))
|
||||
entries.append(cmake_cache_option("BUILD_SHARED_LIBS", spec.satisfies("+shared")))
|
||||
entries.append(cmake_cache_option("ENABLE_WARNINGS_AS_ERRORS", spec.satisfies("+werror")))
|
||||
|
||||
# Generic options that have a prefixed equivalent in Umpire CMake
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", "+openmp" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_EXAMPLES", "+examples" in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp")))
|
||||
entries.append(cmake_cache_option("ENABLE_EXAMPLES", spec.satisfies("+examples")))
|
||||
entries.append(cmake_cache_option("ENABLE_DOCS", False))
|
||||
if "tests=benchmarks" in spec or "+dev_benchmarks" in spec:
|
||||
if spec.satisfies("tests=benchmarks") or spec.satisfies("+dev_benchmarks"):
|
||||
# BLT requires ENABLE_TESTS=True to enable benchmarks
|
||||
entries.append(cmake_cache_option("ENABLE_BENCHMARKS", True))
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", True))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_BENCHMARKS", False))
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", "tests=none" not in spec))
|
||||
entries.append(cmake_cache_option("ENABLE_TESTS", not spec.satisfies("tests=none")))
|
||||
|
||||
# Prefixed options that used to be name without one
|
||||
entries.append(cmake_cache_option("{}ENABLE_NUMA".format(option_prefix), "+numa" in spec))
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_NUMA".format(option_prefix), spec.satisfies("+numa"))
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_DEVELOPER_BENCHMARKS".format(option_prefix), "+dev_benchmarks" in spec
|
||||
"{}ENABLE_DEVELOPER_BENCHMARKS".format(option_prefix),
|
||||
spec.satisfies("+dev_benchmarks"),
|
||||
)
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_TOOLS".format(option_prefix), "+tools" in spec)
|
||||
cmake_cache_option("{}ENABLE_TOOLS".format(option_prefix), spec.satisfies("+tools"))
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_BACKTRACE".format(option_prefix), "+backtrace" in spec)
|
||||
)
|
||||
entries.append(cmake_cache_option("{}ENABLE_ASAN".format(option_prefix), "+asan" in spec))
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_SANITIZER_TESTS".format(option_prefix), "+sanitizer_tests" in spec
|
||||
"{}ENABLE_BACKTRACE".format(option_prefix), spec.satisfies("+backtrace")
|
||||
)
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_option("{}ENABLE_ASAN".format(option_prefix), spec.satisfies("+asan"))
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_option(
|
||||
"{}ENABLE_SANITIZER_TESTS".format(option_prefix),
|
||||
spec.satisfies("+sanitizer_tests"),
|
||||
)
|
||||
)
|
||||
|
||||
# Recent options, were never name without prefix
|
||||
entries.append(
|
||||
cmake_cache_option("UMPIRE_ENABLE_DEVICE_ALLOCATOR", "+device_alloc" in spec)
|
||||
cmake_cache_option("UMPIRE_ENABLE_DEVICE_ALLOCATOR", spec.satisfies("+device_alloc"))
|
||||
)
|
||||
entries.append(
|
||||
cmake_cache_option("UMPIRE_ENABLE_SQLITE_EXPERIMENTAL", "+sqlite_experimental" in spec)
|
||||
cmake_cache_option(
|
||||
"UMPIRE_ENABLE_SQLITE_EXPERIMENTAL", spec.satisfies("+sqlite_experimental")
|
||||
)
|
||||
)
|
||||
if "+sqlite_experimental" in spec:
|
||||
if spec.satisfies("+sqlite_experimental"):
|
||||
entries.append(cmake_cache_path("SQLite3_ROOT", spec["sqlite"].prefix))
|
||||
|
||||
# This option was renamed later than the others
|
||||
if spec.satisfies("@2022.10.0:"):
|
||||
entries.append(
|
||||
cmake_cache_option("UMPIRE_ENABLE_IPC_SHARED_MEMORY", "+ipc_shmem" in spec)
|
||||
cmake_cache_option("UMPIRE_ENABLE_IPC_SHARED_MEMORY", spec.satisfies("+ipc_shmem"))
|
||||
)
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_IPC_SHARED_MEMORY", "+ipc_shmem" in spec))
|
||||
entries.append(
|
||||
cmake_cache_option("ENABLE_IPC_SHARED_MEMORY", spec.satisfies("+ipc_shmem"))
|
||||
)
|
||||
|
||||
if spec.satisfies("~fmt_header_only"):
|
||||
entries.append(cmake_cache_string("UMPIRE_FMT_TARGET", "fmt::fmt"))
|
||||
|
||||
return entries
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user