diff options
author | Brian Van Essen <vanessen1@llnl.gov> | 2022-06-22 22:41:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-23 07:41:25 +0200 |
commit | c64298a1835d51389ad5ed46a2713ba266a5c93b (patch) | |
tree | 1941cdee354c9308640a40326410e08e558a7d0a | |
parent | 31d89e80bc0324339ac5e2f0c3631bec8983214f (diff) | |
download | spack-c64298a1835d51389ad5ed46a2713ba266a5c93b.tar.gz spack-c64298a1835d51389ad5ed46a2713ba266a5c93b.tar.bz2 spack-c64298a1835d51389ad5ed46a2713ba266a5c93b.tar.xz spack-c64298a1835d51389ad5ed46a2713ba266a5c93b.zip |
Enable MVAPICH2 to use the mpichversion executable to detect externals (#31245)
This is an an alternative to mpiname.
-rw-r--r-- | var/spack/repos/builtin/packages/mvapich2/package.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 3da7094dc2..df71d0496c 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -21,7 +21,7 @@ class Mvapich2(AutotoolsPackage): maintainers = ['natshineman', 'harisubramoni', 'ndcontini'] - executables = ['^mpiname$'] + executables = ['^mpiname$', '^mpichversion$'] # Prefer the latest stable release version('2.3.7', sha256='4b6ad2c8c270e1fabcd073c49edb6bf95af93780f4a487bc48404a8ca384f34e') @@ -137,8 +137,12 @@ class Mvapich2(AutotoolsPackage): @classmethod def determine_version(cls, exe): - output = Executable(exe)('-a', output=str, error=str) - match = re.search(r'^MVAPICH2 (\S+)', output) + if exe.endswith('mpichversion'): + output = Executable(exe)(output=str, error=str) + match = re.search(r'^MVAPICH2 Version:\s*(\S+)', output) + elif exe.endswith('mpiname'): + output = Executable(exe)('-a', output=str, error=str) + match = re.search(r'^MVAPICH2 (\S+)', output) return match.group(1) if match else None @classmethod @@ -152,7 +156,10 @@ class Mvapich2(AutotoolsPackage): results = [] for exe in exes: variants = '' - output = Executable(exe)('-a', output=str, error=str) + if exe.endswith('mpichversion'): + output = Executable(exe)(output=str, error=str) + elif exe.endswith('mpiname'): + output = Executable(exe)('-a', output=str, error=str) if re.search(r'--enable-wrapper-rpath=yes', output): variants += '+wrapperrpath' |