summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Chiusole <bebosudo@users.noreply.github.com>2019-07-03 23:07:51 +0200
committerPeter Scheibel <scheibel1@llnl.gov>2019-07-03 14:07:51 -0700
commitf3bf89ebfecb54cb3fc246ccbc19ffd9a6233679 (patch)
tree66994c062088b4eb1949cecc0a67a293093b770f
parent28949787e903813b652deab1fcfce42d718d3258 (diff)
downloadspack-f3bf89ebfecb54cb3fc246ccbc19ffd9a6233679.tar.gz
spack-f3bf89ebfecb54cb3fc246ccbc19ffd9a6233679.tar.bz2
spack-f3bf89ebfecb54cb3fc246ccbc19ffd9a6233679.tar.xz
spack-f3bf89ebfecb54cb3fc246ccbc19ffd9a6233679.zip
OpenMPI: add support for pbs/tm at configure. (#10620)
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index 4b054cf610..ef5a788c5e 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -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 @@ class Openmpi(AutotoolsPackage):
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