summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raffenetti <raffenet@users.noreply.github.com>2022-04-22 10:02:27 -0500
committerGitHub <noreply@github.com>2022-04-22 17:02:27 +0200
commita6a7c3ce88ff68d859e8a84c786378ec90e59d73 (patch)
treec9002254a0b752f859d8cfe9813218e86f0b12b3
parent960b48b61390f17bc8df71948ccb7d824e314057 (diff)
downloadspack-a6a7c3ce88ff68d859e8a84c786378ec90e59d73.tar.gz
spack-a6a7c3ce88ff68d859e8a84c786378ec90e59d73.tar.bz2
spack-a6a7c3ce88ff68d859e8a84c786378ec90e59d73.tar.xz
spack-a6a7c3ce88ff68d859e8a84c786378ec90e59d73.zip
mpich: Add CUDA variant (#29901)
CUDA device memory is supported with the ch4 device. Update provides to include MPI-4.0 functionality
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index e736634c5a..54dfda0bb5 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -10,7 +10,7 @@ import sys
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 @@ with '-Wl,-commons,use_dylibs' and without
'-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 @@ with '-Wl,-commons,use_dylibs' and without
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 @@ with '-Wl,-commons,use_dylibs' and without
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: