summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Rood <jon.rood@nrel.gov>2017-07-18 12:45:43 -0600
committerAdam J. Stewart <ajstewart426@gmail.com>2017-07-18 13:45:43 -0500
commit904f6f0572ca01eadeda8f54a4052b047b1a840a (patch)
tree22c6bc36a5dda29287cb8d46042a0cbc687aa9c1
parent0e28afef1e5632419b4516f62c42015b5cac5d6c (diff)
downloadspack-904f6f0572ca01eadeda8f54a4052b047b1a840a.tar.gz
spack-904f6f0572ca01eadeda8f54a4052b047b1a840a.tar.bz2
spack-904f6f0572ca01eadeda8f54a4052b047b1a840a.tar.xz
spack-904f6f0572ca01eadeda8f54a4052b047b1a840a.zip
Adding a bit more Mellanox MXM capability to OpenMPI. (#4762)
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index 85c99889da..30a70d948f 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -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 @@ class Openmpi(AutotoolsPackage):
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