From a6a7c3ce88ff68d859e8a84c786378ec90e59d73 Mon Sep 17 00:00:00 2001 From: Ken Raffenetti Date: Fri, 22 Apr 2022 10:02:27 -0500 Subject: mpich: Add CUDA variant (#29901) CUDA device memory is supported with the ch4 device. Update provides to include MPI-4.0 functionality --- var/spack/repos/builtin/packages/mpich/package.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'var') 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: -- cgit v1.2.3-60-g2f50