diff options
author | Danny Taller <66029857+dtaller@users.noreply.github.com> | 2021-04-08 13:54:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 20:54:37 +0000 |
commit | e21e26094e8ea8779878f50ad2992a59858a213c (patch) | |
tree | e9b32beb059b102d18aab214ea3f38869282a255 /var | |
parent | 1c5c53f505bcc0052e81c62a8a030bc5ee5f37e9 (diff) | |
download | spack-e21e26094e8ea8779878f50ad2992a59858a213c.tar.gz spack-e21e26094e8ea8779878f50ad2992a59858a213c.tar.bz2 spack-e21e26094e8ea8779878f50ad2992a59858a213c.tar.xz spack-e21e26094e8ea8779878f50ad2992a59858a213c.zip |
CARE and dependencies fixed to work with +cuda (#22874)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/camp/package.py | 1 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/care/package.py | 15 |
2 files changed, 11 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/camp/package.py b/var/spack/repos/builtin/packages/camp/package.py index f34b47f02b..f27565ad26 100644 --- a/var/spack/repos/builtin/packages/camp/package.py +++ b/var/spack/repos/builtin/packages/camp/package.py @@ -24,6 +24,7 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage): depends_on('blt', type='build') depends_on('blt@0.3.7:', type='build', when='+rocm') + depends_on('cub', when='+cuda') def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/care/package.py b/var/spack/repos/builtin/packages/care/package.py index 3cc6b5f691..fa8997df1a 100644 --- a/var/spack/repos/builtin/packages/care/package.py +++ b/var/spack/repos/builtin/packages/care/package.py @@ -41,9 +41,10 @@ class Care(CMakePackage, CudaPackage, ROCmPackage): # package that uses cub. TODO: have all packages point to the same external # cub package. depends_on('camp+cuda', when='+cuda') - depends_on('umpire+cuda', when='+cuda') + depends_on('umpire+cuda~shared', when='+cuda') + depends_on('cub', when='+cuda') depends_on('raja+cuda~openmp', when='+cuda') - depends_on('chai+cuda', when='+cuda') + depends_on('chai+cuda~shared', when='+cuda') # variants +rocm and amdgpu_targets are not automatically passed to # dependencies, so do it manually. @@ -69,13 +70,17 @@ class Care(CMakePackage, CudaPackage, ROCmPackage): if '+cuda' in spec: options.extend([ '-DENABLE_CUDA=ON', - '-DCUDA_TOOLKIT_ROOT_DIR=' + spec['cuda'].prefix]) + '-DCUDA_TOOLKIT_ROOT_DIR=' + spec['cuda'].prefix, + '-DNVTOOLSEXT_DIR=' + spec['cuda'].prefix, + '-DCUB_DIR=' + spec['cub'].prefix]) if not spec.satisfies('cuda_arch=none'): cuda_arch = spec.variants['cuda_arch'].value + # Please note that within care, CUDA_ARCH is assigned to -code + # and likewise CUDA_CODE is assigned to -arch, so these are + # intentionally flipped here. options.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch[0])) - flag = '-arch sm_{0}'.format(cuda_arch[0]) - options.append('-DCMAKE_CUDA_FLAGS:STRING={0}'.format(flag)) + options.append('-DCUDA_CODE=compute_{0}'.format(cuda_arch[0])) else: options.append('-DENABLE_CUDA=OFF') |