intel-oneapi-mpi: external detection support
This commit is contained in:
parent
057b415074
commit
d92cea0a07
@ -4,6 +4,8 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
@ -137,6 +139,15 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage):
|
||||
provides("mpi@:3.1")
|
||||
conflicts("+generic-names +classic-names")
|
||||
|
||||
executables = [r"^mpiicpx$"]
|
||||
version_regex = r"Intel\(R\) MPI Library (\S+)"
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, exe):
|
||||
output = Executable(exe)("-v", output=str, error=str)
|
||||
match = re.search(cls.version_regex, output)
|
||||
return match.group(1) if match else None
|
||||
|
||||
@property
|
||||
def mpiexec(self):
|
||||
return self.component_prefix.bin.mpiexec
|
||||
|
Loading…
Reference in New Issue
Block a user