From 3f21b82815fc37edd56c24b89db0efbf8aaa52af Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 14 Apr 2017 10:14:19 -0500 Subject: Add variant to mvapich2 to control thread level (#3832) --- var/spack/repos/builtin/packages/mvapich2/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'var') 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: -- cgit v1.2.3-70-g09d2