summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorKen Raffenetti <raffenet@users.noreply.github.com>2022-05-05 16:49:41 -0500
committerGitHub <noreply@github.com>2022-05-05 15:49:41 -0600
commitb6e1cbd86d4156514aae432a7e8b4f67cddf7c49 (patch)
tree44e27938053297a4424fecbd3a954a06ee6631e3 /var
parente6d1c2d9f315d929e3a3bf2474b1d9fa7ff68ad5 (diff)
downloadspack-b6e1cbd86d4156514aae432a7e8b4f67cddf7c49.tar.gz
spack-b6e1cbd86d4156514aae432a7e8b4f67cddf7c49.tar.bz2
spack-b6e1cbd86d4156514aae432a7e8b4f67cddf7c49.tar.xz
spack-b6e1cbd86d4156514aae432a7e8b4f67cddf7c49.zip
mpich: Add ROCm variant (#30502)
* mpich: Add ROCm variant * fixup
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py11
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: