Various updates to RADIUSS packages (sync with llnl/radiuss-spack-configs)
This commit is contained in:
parent
29427d3e9e
commit
048a46f817
@ -147,6 +147,19 @@ def _get_sys_type(self, spec):
|
||||
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
|
||||
entries = super().initconfig_compiler_entries()
|
||||
|
@ -106,7 +106,8 @@ def cmake_args(self):
|
||||
|
||||
options.append(self.define_from_variant("ENABLE_HIP", "rocm"))
|
||||
if spec.satisfies("+rocm"):
|
||||
options.append("-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix))
|
||||
rocm_root = dirname(spec["llvm-amdgpu"].prefix)
|
||||
options.append("-DROCM_PATH={0}".format(rocm_root))
|
||||
|
||||
archs = self.spec.variants["amdgpu_target"].value
|
||||
options.append("-DCMAKE_HIP_ARCHITECTURES={0}".format(archs))
|
||||
|
@ -25,6 +25,18 @@ class Care(CachedCMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
version("develop", branch="develop", submodules=False)
|
||||
version("master", branch="master", submodules=False)
|
||||
version(
|
||||
"0.14.1",
|
||||
tag="v0.14.1",
|
||||
commit="110c6e5766ead59b231e2b05deecd7567874e907",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"0.14.0",
|
||||
tag="v0.14.0",
|
||||
commit="2784188a067abac35747d58b5a5daa1b3852756b",
|
||||
submodules=False,
|
||||
)
|
||||
version(
|
||||
"0.13.3",
|
||||
tag="v0.13.3",
|
||||
@ -251,6 +263,13 @@ def initconfig_package_entries(self):
|
||||
|
||||
entries.append(cmake_cache_string("CMAKE_BUILD_TYPE", spec.variants["build_type"].value))
|
||||
|
||||
# C++14
|
||||
if spec.satisfies("@:0.14.1"):
|
||||
entries.append(cmake_cache_string("BLT_CXX_STD", "c++14"))
|
||||
# C++17
|
||||
else:
|
||||
entries.append(cmake_cache_string("BLT_CXX_STD", "c++17"))
|
||||
|
||||
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.
|
||||
|
@ -250,7 +250,7 @@ def initconfig_hardware_entries(self):
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_HIP", False))
|
||||
|
||||
entries.append(cmake_cache_option("ENABLE_OPENMP_TARGET", "+omptarget" in spec))
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_TARGET_OPENMP", "+omptarget" in spec))
|
||||
if "+omptarget" in spec:
|
||||
if "%xl" in spec:
|
||||
entries.append(
|
||||
@ -321,7 +321,7 @@ def initconfig_package_entries(self):
|
||||
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("ENABLE_SYCL", spec.satisfies("+sycl")))
|
||||
entries.append(cmake_cache_option("RAJA_ENABLE_SYCL", spec.satisfies("+sycl")))
|
||||
|
||||
# C++17
|
||||
if spec.satisfies("@2024.07.0:") and spec.satisfies("+sycl"):
|
||||
|
Loading…
Reference in New Issue
Block a user