diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/mpich/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/mpich/package.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index d416016ad5..b758f5b720 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, CudaPackage): +class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): """MPICH is a high performance and widely portable implementation of the Message Passing Interface (MPI) standard.""" @@ -112,12 +112,16 @@ with '-Wl,-commons,use_dylibs' and without 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') + depends_on('yaksa+rocm', when='+rocm ^yaksa') conflicts('datatype-engine=yaksa', when='device=ch3') # 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') + conflicts('+rocm', when='@:4.0') + conflicts('+rocm', when='device=ch3') + conflicts('+cuda', when='+rocm', msg='CUDA must be disabled to support ROCm') provides('mpi@:4.0') provides('mpi@:3.1', when='@:3.2') @@ -497,6 +501,11 @@ with '-Wl,-commons,use_dylibs' and without config_args += self.with_or_without('cuda', activation_value='prefix') + if '+rocm' in spec: + config_args.append('--with-hip={0}'.format(spec['hip'].prefix)) + else: + config_args.append('--without-hip') + # setup device configuration device_config = '' if 'device=ch4' in spec: |