OpenMPI: add support for pbs/tm at configure. (#10620)

This commit is contained in:
Alberto Chiusole 2019-07-03 23:07:51 +02:00 committed by Peter Scheibel
parent 28949787e9
commit f3bf89ebfe

View file

@ -45,6 +45,18 @@ def _mxm_dir():
return None
def _tm_dir():
"""Look for default directory where the PBS/TM package is
installed. Return None if not found.
"""
# /opt/pbs from PBS 18+; make this more flexible in the future
paths_list = ("/opt/pbs", )
for path in paths_list:
if os.path.isdir(path) and os.path.isfile(path + "/include/tm.h"):
return path
return None
class Openmpi(AutotoolsPackage):
"""An open source Message Passing Interface implementation.
@ -344,7 +356,18 @@ def with_or_without_mxm(self, activated):
return '--without-{0}'.format(opt)
line = '--with-{0}'.format(opt)
path = _mxm_dir()
if (path is not None):
if path is not None:
line += '={0}'.format(path)
return line
def with_or_without_tm(self, activated):
opt = 'tm'
# If the option has not been activated return --without-tm
if not activated:
return '--without-{0}'.format(opt)
line = '--with-{0}'.format(opt)
path = _tm_dir()
if path is not None:
line += '={0}'.format(path)
return line