upcxx package: Add resilience to broken libfabric (#44618)
Some systems have a libfabric install that doesn't work, so don't drop dead if a call to `fi_info` fails (e.g. due to missing shared libraries)
This commit is contained in:
		| @@ -9,12 +9,14 @@ | ||||
| from spack.package import * | ||||
| 
 | ||||
| 
 | ||||
| @llnl.util.lang.memoized | ||||
| def is_CrayXC(): | ||||
|     return spack.platforms.host().name == "linux" and ( | ||||
|         os.environ.get("CRAYPE_NETWORK_TARGET") == "aries" | ||||
|     ) | ||||
| 
 | ||||
| 
 | ||||
| @llnl.util.lang.memoized | ||||
| def is_CrayEX(): | ||||
|     if spack.platforms.host().name == "linux": | ||||
|         target = os.environ.get("CRAYPE_NETWORK_TARGET") | ||||
| @@ -22,11 +24,15 @@ def is_CrayEX(): | ||||
|             return True | ||||
|         elif target is None:  # but some systems lack Cray PrgEnv | ||||
|             fi_info = which("fi_info") | ||||
|             if fi_info and fi_info("-l", output=str).find("cxi") >= 0: | ||||
|             if ( | ||||
|                 fi_info | ||||
|                 and fi_info("-l", output=str, error=str, fail_on_error=False).find("cxi") >= 0 | ||||
|             ): | ||||
|                 return True | ||||
|     return False | ||||
| 
 | ||||
| 
 | ||||
| @llnl.util.lang.memoized | ||||
| def cross_detect(): | ||||
|     if is_CrayXC(): | ||||
|         if which("srun"): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dan Bonachea
					Dan Bonachea