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 @@ class Mpich(AutotoolsPackage, CudaPackage): '-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= 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 @@ def configure_args(self): 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')