summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Van Essen <vanessen1@llnl.gov>2022-05-24 04:17:46 +0200
committerGitHub <noreply@github.com>2022-05-23 20:17:46 -0600
commit736fddc079663e10e0fa593efc78e1a5e2530605 (patch)
treeccf7baef29c373796e83ff1390c66d380632a1b9
parent036048c26fc1dabee8b361b030cbc83f9916ac8f (diff)
downloadspack-736fddc079663e10e0fa593efc78e1a5e2530605.tar.gz
spack-736fddc079663e10e0fa593efc78e1a5e2530605.tar.bz2
spack-736fddc079663e10e0fa593efc78e1a5e2530605.tar.xz
spack-736fddc079663e10e0fa593efc78e1a5e2530605.zip
Bugfix hwloc find cuda (#30788)
* Added autotools configure flags to ensure that hwloc finds the correct version of CUDA that it was concretized against, rather than the first one that package config finds. * Added support for finding the correct version of ROCm libraries. Fixed Flake8. * Fixed guard on finding ROCm library
-rw-r--r--var/spack/repos/builtin/packages/hwloc/package.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py
index 995f027e5b..0f412b4a12 100644
--- a/var/spack/repos/builtin/packages/hwloc/package.py
+++ b/var/spack/repos/builtin/packages/hwloc/package.py
@@ -156,6 +156,11 @@ class Hwloc(AutotoolsPackage):
if '+rocm' not in self.spec:
args.append('--disable-rsmi')
+ if '+rocm' in self.spec:
+ args.append('--with-rocm={0}'.format(self.spec['rocm'].prefix))
+ args.append('--with-rocm-version={0}'.format(
+ self.spec['rocm'].version))
+
if '+netloc' in self.spec:
args.append('--enable-netloc')
@@ -168,4 +173,9 @@ class Hwloc(AutotoolsPackage):
args.extend(self.enable_or_disable('pci'))
args.extend(self.enable_or_disable('shared'))
+ if '+cuda' in self.spec:
+ args.append('--with-cuda={0}'.format(self.spec['cuda'].prefix))
+ args.append('--with-cuda-version={0}'.format(
+ self.spec['cuda'].version))
+
return args