mpich: add datatype engine variant (#30257)

Starting with MPICH 3.4, we offer different datatype engine options
(dataloop or yaksa). The default is 'auto', which will choose based on
the device configuration. Starting with MPICH 4.0, building against an
external yaksa library is supported.

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
Ken Raffenetti 2022-05-03 15:12:19 -05:00 committed by GitHub
parent a5e92893d3
commit 4c19410669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,19 @@ class Mpich(AutotoolsPackage, CudaPackage):
'communications. Set MPIR_CVAR_CH4_NUM_VCIS=<N> to ' 'communications. Set MPIR_CVAR_CH4_NUM_VCIS=<N> to '
'enable multiple vcis at runtime.') 'enable multiple vcis at runtime.')
variant(
'datatype-engine',
default='auto',
description='controls the datatype engine to use',
values=('dataloop', 'yaksa', 'auto'),
when='@3.4:',
multi=False
)
depends_on('yaksa', when='@4.0: device=ch4 datatype-engine=auto')
depends_on('yaksa', when='@4.0: device=ch4 datatype-engine=yaksa')
depends_on('yaksa+cuda', when='+cuda ^yaksa')
conflicts('datatype-engine=yaksa', when='device=ch3')
# Todo: cuda can be a conditional variant, but it does not seem to work when # Todo: cuda can be a conditional variant, but it does not seem to work when
# overriding the variant from CudaPackage. # overriding the variant from CudaPackage.
conflicts('+cuda', when='@:3.3') conflicts('+cuda', when='@:3.3')
@ -454,7 +467,9 @@ def configure_args(self):
'--{0}-romio'.format('enable' if '+romio' in spec else 'disable'), '--{0}-romio'.format('enable' if '+romio' in spec else 'disable'),
'--{0}-ibverbs'.format('with' if '+verbs' in spec else 'without'), '--{0}-ibverbs'.format('with' if '+verbs' in spec else 'without'),
'--enable-wrapper-rpath={0}'.format('no' if '~wrapperrpath' in '--enable-wrapper-rpath={0}'.format('no' if '~wrapperrpath' in
spec else 'yes') spec else 'yes'),
'--with-yaksa={0}'.format(
spec['yaksa'].prefix if '^yaksa' in spec else 'embedded'),
] ]
if '~fortran' in spec: if '~fortran' in spec:
@ -528,6 +543,13 @@ def configure_args(self):
config_args.append('--enable-thread-cs=per-vci') config_args.append('--enable-thread-cs=per-vci')
config_args.append('--with-ch4-max-vcis=default') config_args.append('--with-ch4-max-vcis=default')
if 'datatype-engine=yaksa' in spec:
config_args.append('--with-datatype-engine=yaksa')
elif 'datatype-engine=dataloop' in spec:
config_args.append('--with-datatype-engine=dataloop')
elif 'datatype-engine=auto' in spec:
config_args.append('--with-datatye-engine=auto')
return config_args return config_args
@run_after('install') @run_after('install')