summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHervé Yviquel <hyviquel@gmail.com>2022-04-25 12:31:13 -0300
committerGitHub <noreply@github.com>2022-04-25 17:31:13 +0200
commitc1ed51e767267422c503515789327c794bca2db6 (patch)
treeeb22f875d1f70da4db39cef1f5a6e7274ab88797
parent2a8a0aa1564a413ef921e20c44f9eccdc3aedd2f (diff)
downloadspack-c1ed51e767267422c503515789327c794bca2db6.tar.gz
spack-c1ed51e767267422c503515789327c794bca2db6.tar.bz2
spack-c1ed51e767267422c503515789327c794bca2db6.tar.xz
spack-c1ed51e767267422c503515789327c794bca2db6.zip
mpich: add variant to enable per VCI critical sections (#27840)
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 54dfda0bb5..ec8cdd8f19 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -94,6 +94,13 @@ with '-Wl,-commons,use_dylibs' and without
'-Wl,-flat_namespace'.'''
)
+ variant('vci', default=False, when='@4: device=ch4',
+ description='Enable multiple VCI (virtual communication '
+ 'interface) critical sections to improve performance '
+ 'of applications that do heavy concurrent MPI'
+ 'communications. Set MPIR_CVAR_CH4_NUM_VCIS=<N> to '
+ 'enable multiple vcis at runtime.')
+
# Todo: cuda can be a conditional variant, but it does not seem to work when
# overriding the variant from CudaPackage.
conflicts('+cuda', when='@:3.3')
@@ -517,6 +524,10 @@ with '-Wl,-commons,use_dylibs' and without
if '+two_level_namespace' in spec:
config_args.append('--enable-two-level-namespace')
+ if '+vci' in spec:
+ config_args.append('--enable-thread-cs=per-vci')
+ config_args.append('--with-ch4-max-vcis=default')
+
return config_args
@run_after('install')