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
This commit is contained in:
parent
4aaa3841b8
commit
84073466e6
@ -280,7 +280,7 @@ def is_disabled(text):
|
||||
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 @@ def configure_args(self):
|
||||
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 @@ def configure_args(self):
|
||||
"--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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user