From 1a95b979d87cd9c25c7f1f5dda51d0278c9f71d1 Mon Sep 17 00:00:00 2001 From: Mahendra Paipuri <44365948+mahendrapaipuri@users.noreply.github.com> Date: Mon, 22 Nov 2021 10:47:56 +0100 Subject: Disable rsmi for hwloc when rocm is not enabled (#27547) Co-authored-by: mahendrapaipuri --- var/spack/repos/builtin/packages/hwloc/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index a3a8597236..3efa4cd5a2 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -135,6 +135,14 @@ class Hwloc(AutotoolsPackage): if '+opencl' not in self.spec: args.append('--disable-opencl') + # If ROCm libraries are found in system /opt/rocm + # during config stage, hwloc builds itself with + # librocm_smi support. + # This can fail the config tests while building + # OpenMPI due to lack of rpath to librocm_smi + if '+rocm' not in self.spec: + args.append('--disable-rsmi') + if '+netloc' in self.spec: args.append('--enable-netloc') -- cgit v1.2.3-60-g2f50