Adding a bit more Mellanox MXM capability to OpenMPI. (#4762)
This commit is contained in:
parent
0e28afef1e
commit
904f6f0572
@ -52,6 +52,18 @@ def _verbs_dir():
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _mxm_dir():
|
||||||
|
"""Look for default directory where the Mellanox package is
|
||||||
|
installed. Return None if not found.
|
||||||
|
"""
|
||||||
|
# Only using default directory; make this more flexible in the future
|
||||||
|
path = "/opt/mellanox/mxm"
|
||||||
|
if os.path.isdir(path):
|
||||||
|
return path
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
class Openmpi(AutotoolsPackage):
|
class Openmpi(AutotoolsPackage):
|
||||||
"""The Open MPI Project is an open source Message Passing Interface
|
"""The Open MPI Project is an open source Message Passing Interface
|
||||||
implementation that is developed and maintained by a consortium
|
implementation that is developed and maintained by a consortium
|
||||||
@ -251,6 +263,17 @@ def with_or_without_verbs(self, activated):
|
|||||||
line += '={0}'.format(path)
|
line += '={0}'.format(path)
|
||||||
return line
|
return line
|
||||||
|
|
||||||
|
def with_or_without_mxm(self, activated):
|
||||||
|
opt = 'mxm'
|
||||||
|
# If the option has not been activated return --without-mxm
|
||||||
|
if not activated:
|
||||||
|
return '--without-{0}'.format(opt)
|
||||||
|
line = '--with-{0}'.format(opt)
|
||||||
|
path = _mxm_dir()
|
||||||
|
if (path is not None):
|
||||||
|
line += '={0}'.format(path)
|
||||||
|
return line
|
||||||
|
|
||||||
@run_before('autoreconf')
|
@run_before('autoreconf')
|
||||||
def die_without_fortran(self):
|
def die_without_fortran(self):
|
||||||
# Until we can pass variants such as +fortran through virtual
|
# Until we can pass variants such as +fortran through virtual
|
||||||
|
Loading…
Reference in New Issue
Block a user