Adding a bit more Mellanox MXM capability to OpenMPI. (#4762)

This commit is contained in:
Jon Rood 2017-07-18 12:45:43 -06:00 committed by Adam J. Stewart
parent 0e28afef1e
commit 904f6f0572

View File

@ -52,6 +52,18 @@ def _verbs_dir():
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):
"""The Open MPI Project is an open source Message Passing Interface
implementation that is developed and maintained by a consortium
@ -251,6 +263,17 @@ def with_or_without_verbs(self, activated):
line += '={0}'.format(path)
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')
def die_without_fortran(self):
# Until we can pass variants such as +fortran through virtual