summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raffenetti <raffenet@users.noreply.github.com>2022-08-03 02:21:50 -0500
committerGitHub <noreply@github.com>2022-08-03 09:21:50 +0200
commit84073466e61f5c4074e5fba4e41c008f9c38ff61 (patch)
treefe5a6093b1db19cc46480433e70fea8ded547d64
parent4aaa3841b8a60387a1c1e25c2c03dbcf22f74964 (diff)
downloadspack-84073466e61f5c4074e5fba4e41c008f9c38ff61.tar.gz
spack-84073466e61f5c4074e5fba4e41c008f9c38ff61.tar.bz2
spack-84073466e61f5c4074e5fba4e41c008f9c38ff61.tar.xz
spack-84073466e61f5c4074e5fba4e41c008f9c38ff61.zip
mpich: fix hwloc config option for version >= 4.0 (#31874)
In MPICH 4.0, the config option for external hwloc changed from --with-hwloc-prefix to --with-hwloc
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 2167ebbfd9..88c84de801 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -280,7 +280,7 @@ with '-Wl,-commons,use_dylibs' and without
for exe in exes:
variants = []
output = Executable(exe)(output=str, error=str)
- if re.search(r"--with-hwloc-prefix=embedded", output):
+ if re.search(r"--with-hwloc(-prefix)*=embedded", output):
variants.append("~hwloc")
if re.search(r"--with-pm=hydra", output):
@@ -457,9 +457,6 @@ with '-Wl,-commons,use_dylibs' and without
config_args = [
"--disable-silent-rules",
"--enable-shared",
- "--with-hwloc-prefix={0}".format(
- spec["hwloc"].prefix if "^hwloc" in spec else "embedded"
- ),
"--with-pm={0}".format("hydra" if "+hydra" in spec else "no"),
"--{0}-romio".format("enable" if "+romio" in spec else "disable"),
"--{0}-ibverbs".format("with" if "+verbs" in spec else "without"),
@@ -467,6 +464,18 @@ with '-Wl,-commons,use_dylibs' and without
"--with-yaksa={0}".format(spec["yaksa"].prefix if "^yaksa" in spec else "embedded"),
]
+ # hwloc configure option changed in 4.0
+ if spec.satisfies("@4.0:"):
+ config_args.append(
+ "--with-hwloc={0}".format(spec["hwloc"].prefix if "^hwloc" in spec else "embedded")
+ )
+ else:
+ config_args.append(
+ "--with-hwloc-prefix={0}".format(
+ spec["hwloc"].prefix if "^hwloc" in spec else "embedded"
+ )
+ )
+
if "~fortran" in spec:
config_args.append("--disable-fortran")