summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Berger <rberger@lanl.gov>2023-12-19 08:14:19 -0700
committerGitHub <noreply@github.com>2023-12-19 16:14:19 +0100
commit2e18fbbdeb29385ce50078eff3a4701a45a3f656 (patch)
tree55cfb25ac76b53a07159661548e05ea2a848135d
parent02eafeee03bb50eb0b52840dbb9ab11a113adb46 (diff)
downloadspack-2e18fbbdeb29385ce50078eff3a4701a45a3f656.tar.gz
spack-2e18fbbdeb29385ce50078eff3a4701a45a3f656.tar.bz2
spack-2e18fbbdeb29385ce50078eff3a4701a45a3f656.tar.xz
spack-2e18fbbdeb29385ce50078eff3a4701a45a3f656.zip
legion: do not set HIP_PATH env variable (#41660)
* legion: do not set HIP_PATH env variable * flecsi: workaround Legion CMake for +rocm
-rw-r--r--var/spack/repos/builtin/packages/flecsi/package.py3
-rw-r--r--var/spack/repos/builtin/packages/legion/package.py6
2 files changed, 4 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/flecsi/package.py b/var/spack/repos/builtin/packages/flecsi/package.py
index e10dfd88cf..2fd13d56b1 100644
--- a/var/spack/repos/builtin/packages/flecsi/package.py
+++ b/var/spack/repos/builtin/packages/flecsi/package.py
@@ -186,6 +186,9 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
if "+rocm" in self.spec:
options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
options.append(self.define("CMAKE_C_COMPILER", self.spec["hip"].hipcc))
+ if "backend=legion" in self.spec:
+ # CMake pulled in via find_package(Legion) won't work without this
+ options.append(self.define("HIP_PATH", "{0}/hip".format(spec["hip"].prefix)))
elif "+kokkos" in self.spec:
options.append(self.define("CMAKE_CXX_COMPILER", self.spec["kokkos"].kokkos_cxx))
else:
diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py
index 152aac297f..156eb24ef8 100644
--- a/var/spack/repos/builtin/packages/legion/package.py
+++ b/var/spack/repos/builtin/packages/legion/package.py
@@ -277,11 +277,6 @@ class Legion(CMakePackage, ROCmPackage):
description="Maximum number of nodes supported by Legion.",
)
- def setup_build_environment(self, build_env):
- spec = self.spec
- if "+rocm" in spec:
- build_env.set("HIP_PATH", "{0}/hip".format(spec["hip"].prefix))
-
def cmake_args(self):
spec = self.spec
cmake_cxx_flags = []
@@ -353,6 +348,7 @@ class Legion(CMakePackage, ROCmPackage):
options.append(from_variant("Legion_HIP_TARGET", "hip_target"))
options.append(from_variant("Legion_HIP_ARCH", "amdgpu_target"))
options.append(from_variant("Legion_HIJACK_HIP", "hip_hijack"))
+ options.append(self.define("HIP_PATH", "{0}/hip".format(spec["hip"].prefix)))
if "+fortran" in spec:
# default is off.