summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorpsakievich <psakiev@sandia.gov>2020-11-19 17:24:42 -0700
committerGitHub <noreply@github.com>2020-11-19 19:24:42 -0500
commitf613e10f247eb3f1261f76f97787708501b39d08 (patch)
treeb2ab6ec37325b5421821a1b6713c05a69e7a649f /var
parentf92e52cdc8219e974b6c1bfa017f4c16fc5025f3 (diff)
downloadspack-f613e10f247eb3f1261f76f97787708501b39d08.tar.gz
spack-f613e10f247eb3f1261f76f97787708501b39d08.tar.bz2
spack-f613e10f247eb3f1261f76f97787708501b39d08.tar.xz
spack-f613e10f247eb3f1261f76f97787708501b39d08.zip
Trilinos: Add CUDA relocatable code flag (#19993)
* Add relocatable code flag to trilinos * Make CUDA RDC and varainat * adjust default of cuda_rdc
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 2d341b245a..50227fec2a 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -77,6 +77,8 @@ class Trilinos(CMakePackage, CudaPackage):
description='Compile with Fortran support')
variant('wrapper', default=False,
description="Use nvcc-wrapper for CUDA build")
+ variant('cuda_rdc', default=False,
+ description='turn on RDC for CUDA build')
variant('cxxstd', default='11', values=['11', '14', '17'], multi=False)
variant('hwloc', default=False,
description='Enable hwloc')
@@ -328,6 +330,7 @@ class Trilinos(CMakePackage, CudaPackage):
conflicts('+adios2', when='@:12.14.1')
conflicts('+adios2', when='@xsdk-0.2.0')
conflicts('+pnetcdf', when='~netcdf')
+ conflicts('+cuda_rdc', when='~cuda')
conflicts('+wrapper', when='~cuda')
conflicts('+wrapper', when='%clang')
conflicts('cxxstd=11', when='+wrapper ^cuda@6.5.14')
@@ -752,6 +755,10 @@ class Trilinos(CMakePackage, CudaPackage):
define('Kokkos_ENABLE_CUDA', True),
define('Kokkos_ENABLE_CUDA_UVM', True),
define('Kokkos_ENABLE_CUDA_LAMBDA', True)])
+ if '+cuda_rdc' in spec:
+ options.append(define(
+ 'Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE',
+ True))
for iArchCC in spec.variants['cuda_arch'].value:
options.append(define(
"Kokkos_ARCH_" +