mpich: Add CUDA variant (#29901)
CUDA device memory is supported with the ch4 device. Update provides to include MPI-4.0 functionality
This commit is contained in:
parent
960b48b613
commit
a6a7c3ce88
@ -10,7 +10,7 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class Mpich(AutotoolsPackage):
|
||||
class Mpich(AutotoolsPackage, CudaPackage):
|
||||
"""MPICH is a high performance and widely portable implementation of
|
||||
the Message Passing Interface (MPI) standard."""
|
||||
|
||||
@ -94,7 +94,13 @@ class Mpich(AutotoolsPackage):
|
||||
'-Wl,-flat_namespace'.'''
|
||||
)
|
||||
|
||||
provides('mpi@:3.1')
|
||||
# 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')
|
||||
conflicts('+cuda', when='device=ch3')
|
||||
|
||||
provides('mpi@:4.0')
|
||||
provides('mpi@:3.1', when='@:3.2')
|
||||
provides('mpi@:3.0', when='@:3.1')
|
||||
provides('mpi@:2.2', when='@:1.2')
|
||||
provides('mpi@:2.1', when='@:1.1')
|
||||
@ -433,7 +439,6 @@ def die_without_fortran(self):
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
config_args = [
|
||||
'--without-cuda',
|
||||
'--disable-silent-rules',
|
||||
'--enable-shared',
|
||||
'--with-hwloc-prefix={0}'.format(
|
||||
@ -468,6 +473,8 @@ def configure_args(self):
|
||||
elif 'pmi=cray' in spec:
|
||||
config_args.append('--with-pmi=cray')
|
||||
|
||||
config_args += self.with_or_without('cuda', activation_value='prefix')
|
||||
|
||||
# setup device configuration
|
||||
device_config = ''
|
||||
if 'device=ch4' in spec:
|
||||
|
Loading…
Reference in New Issue
Block a user