Enable MVAPICH2 to use the mpichversion executable to detect externals (#31245)
This is an an alternative to mpiname.
This commit is contained in:
parent
31d89e80bc
commit
c64298a183
@ -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,6 +137,10 @@ class Mvapich2(AutotoolsPackage):
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, exe):
|
||||
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
|
||||
@ -152,6 +156,9 @@ def get_spack_compiler_spec(path):
|
||||
results = []
|
||||
for exe in exes:
|
||||
variants = ''
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user