summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-04-14 10:14:19 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2017-04-14 08:14:19 -0700
commit3f21b82815fc37edd56c24b89db0efbf8aaa52af (patch)
treec6485ed86dbed415daa3ac9e1a5281c1373669a7 /var
parent331f42b9911b0348cf287a5239d7d50cbdcd0ee5 (diff)
downloadspack-3f21b82815fc37edd56c24b89db0efbf8aaa52af.tar.gz
spack-3f21b82815fc37edd56c24b89db0efbf8aaa52af.tar.bz2
spack-3f21b82815fc37edd56c24b89db0efbf8aaa52af.tar.xz
spack-3f21b82815fc37edd56c24b89db0efbf8aaa52af.zip
Add variant to mvapich2 to control thread level (#3832)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mvapich2/package.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py
index 7c10287729..e3f6e5f6a6 100644
--- a/var/spack/repos/builtin/packages/mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2/package.py
@@ -49,6 +49,15 @@ class Mvapich2(Package):
variant('debug', default=False,
description='Enable debug info and error messages at run-time')
+ # Accepted values are:
+ # single - No threads (MPI_THREAD_SINGLE)
+ # funneled - Only the main thread calls MPI (MPI_THREAD_FUNNELED)
+ # serialized - User serializes calls to MPI (MPI_THREAD_SERIALIZED)
+ # multiple - Fully multi-threaded (MPI_THREAD_MULTIPLE)
+ # runtime - Alias to "multiple"
+ variant('threads', default='multiple',
+ description='Control the level of thread support')
+
##########
# TODO : Process managers should be grouped into the same variant,
# as soon as variant capabilities will be extended See
@@ -252,6 +261,7 @@ class Mvapich2(Package):
"--enable-shared",
"--enable-romio",
"--disable-silent-rules",
+ "--enable-threads={0}".format(spec.variants['threads'].value),
]
if self.compiler.f77 and self.compiler.fc: