summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Rood <jon.rood@nrel.gov>2022-02-10 16:53:22 -0700
committerGitHub <noreply@github.com>2022-02-10 16:53:22 -0700
commite9b50324cfefe49643b542248d3d27f193be247c (patch)
treeb12c8e4906056388da70daac1921732c21b4077c
parent8d8822f749f1fa86973122a735fb683bb37cfb89 (diff)
downloadspack-e9b50324cfefe49643b542248d3d27f193be247c.tar.gz
spack-e9b50324cfefe49643b542248d3d27f193be247c.tar.bz2
spack-e9b50324cfefe49643b542248d3d27f193be247c.tar.xz
spack-e9b50324cfefe49643b542248d3d27f193be247c.zip
trilinos: add rocm_rdc variant (#28873)
* Add rocm_rdc variant to trilinos. * Fix syntax error.
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 9e990c6b49..0edff65624 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -63,7 +63,8 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
# Build options
variant('complex', default=False, description='Enable complex numbers in Trilinos')
- variant('cuda_rdc', default=False, description='turn on RDC for CUDA build')
+ variant('cuda_rdc', default=False, description='Turn on RDC for CUDA build')
+ variant('rocm_rdc', default=False, description='Turn on RDC for ROCm build')
variant('cxxstd', default='14', values=['11', '14', '17'], multi=False)
variant('debug', default=False, description='Enable runtime safety and debug checks')
variant('explicit_template_instantiation', default=True, description='Enable explicit template instantiation (ETI)')
@@ -276,6 +277,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
msg='trilinos~wrapper+cuda can only be built with the '
'Clang compiler')
conflicts('+cuda_rdc', when='~cuda')
+ conflicts('+rocm_rdc', when='~rocm')
conflicts('+wrapper', when='~cuda')
conflicts('+wrapper', when='%clang')
@@ -748,7 +750,8 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
if '+rocm' in spec:
options.extend([
define_kok_enable('ROCM', False),
- define_kok_enable('HIP', True)
+ define_kok_enable('HIP', True),
+ define_kok_enable('HIP_RELOCATABLE_DEVICE_CODE', 'rocm_rdc')
])
if '+tpetra' in spec:
options.append(define('Tpetra_INST_HIP', True))