diff options
author | Dan Bonachea <dobonachea@lbl.gov> | 2024-06-18 21:10:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 18:10:04 -0700 |
commit | 3b78515fd4ba929cc6823a0222ed14105ccea9a1 (patch) | |
tree | dfe939b9816a35e6854d1a37e24efd6e9ce4b412 | |
parent | 6b052c3af9c9b868f0bb4d75d532ab8540d43a0d (diff) | |
download | spack-3b78515fd4ba929cc6823a0222ed14105ccea9a1.tar.gz spack-3b78515fd4ba929cc6823a0222ed14105ccea9a1.tar.bz2 spack-3b78515fd4ba929cc6823a0222ed14105ccea9a1.tar.xz spack-3b78515fd4ba929cc6823a0222ed14105ccea9a1.zip |
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)
-rw-r--r-- | var/spack/repos/builtin/packages/upcxx/package.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/upcxx/package.py b/var/spack/repos/builtin/packages/upcxx/package.py index 482655464f..bed87b848d 100644 --- a/var/spack/repos/builtin/packages/upcxx/package.py +++ b/var/spack/repos/builtin/packages/upcxx/package.py @@ -9,12 +9,14 @@ import re 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"): |