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:
		| @@ -280,7 +280,7 @@ def is_disabled(text): | |||||||
|         for exe in exes: |         for exe in exes: | ||||||
|             variants = [] |             variants = [] | ||||||
|             output = Executable(exe)(output=str, error=str) |             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") |                 variants.append("~hwloc") | ||||||
| 
 | 
 | ||||||
|             if re.search(r"--with-pm=hydra", output): |             if re.search(r"--with-pm=hydra", output): | ||||||
| @@ -457,9 +457,6 @@ def configure_args(self): | |||||||
|         config_args = [ |         config_args = [ | ||||||
|             "--disable-silent-rules", |             "--disable-silent-rules", | ||||||
|             "--enable-shared", |             "--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"), |             "--with-pm={0}".format("hydra" if "+hydra" in spec else "no"), | ||||||
|             "--{0}-romio".format("enable" if "+romio" in spec else "disable"), |             "--{0}-romio".format("enable" if "+romio" in spec else "disable"), | ||||||
|             "--{0}-ibverbs".format("with" if "+verbs" in spec else "without"), |             "--{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"), |             "--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: |         if "~fortran" in spec: | ||||||
|             config_args.append("--disable-fortran") |             config_args.append("--disable-fortran") | ||||||
| 
 | 
 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ken Raffenetti
					Ken Raffenetti