cuda: provides cub - so prevent build errors with having incompatible version of cub - when cuda is a dependency

-       ^hiop@1.1.0%gcc@11.4.0+cuda~cusolver_lu~deepchecking~ginkgo~ipo~jsrun~kron+mpi+raja~rocm~shared~sparse build_system=cmake build_type=Release cuda_arch=70 generator=make arch=linux-ubuntu22.04-x86_64
 -           ^camp@0.2.3%gcc@11.4.0+cuda~ipo~omptarget~openmp~rocm~sycl~tests build_system=cmake build_type=Release cuda_arch=70 generator=make patches=cb9e25b arch=linux-ubuntu22.04-x86_64
[+]              ^blt@0.4.1%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64
[+]              ^cub@2.1.0%gcc@11.4.0 build_system=generic arch=linux-ubuntu22.04-x86_64
 -           ^raja@0.14.0%gcc@11.4.0+cuda~desul+examples+exercises~ipo~omptarget~omptask~openmp~plugins~rocm~run-all-tests~shared~sycl~tests~vectorization build_system=cmake build_type=Release cuda_arch=70 generator=make arch=linux-ubuntu22.04-x86_64

raja build:
-- Found CUB: /scratch/svcpetsc/spack.a/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.4.0/cuda-11.7.1-nnyolmrglspl7fm2exxhwlhzplopqeuf/include
vs (triggered by #47720)
-- Found CUB: /scratch/svcpetsc/spack.a/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.4.0/cub-2.1.0-jeuemk56wefipunpzgxndxhqusj7ybfj/include
This commit is contained in:
Satish Balay 2024-11-29 10:40:55 -06:00
parent 66055f903c
commit 852f248f2f
2 changed files with 42 additions and 0 deletions

View File

@ -21,6 +21,7 @@ packages:
armci: [armcimpi]
blas: [openblas, amdblis]
c: [gcc]
cub: [cub]
cxx: [gcc]
D: [ldc]
daal: [intel-oneapi-daal]

View File

@ -702,6 +702,47 @@ class Cuda(Package):
provides("opencl@:1.2", when="@7:")
provides("opencl@:1.1", when="@:6")
for cuda_ver, cub_ver in [
["12.6.3", "2.5.0"],
["12.6.2", "2.5.0"],
["12.6.1", "2.5.0"],
["12.6.0", "2.5.0"],
["12.5.1", "2.4.0"],
["12.5.0", "2.4.0"],
["12.4.1", "2.3.1"],
["12.4.0", "2.3.1"],
["12.3.2", "2.2.0"],
["12.3.1", "2.2.0"],
["12.3.0", "2.2.0"],
["12.2.2", "2.1.0"],
["12.2.1", "2.1.0"],
["12.2.0", "2.0.1"],
["12.1.1", "2.0.1"],
["12.1.0", "2.0.1"],
["12.0.1", "2.0.1"],
["12.0.0", "2.0.1"],
["11.8.0", "1.15.1"],
["11.7.1", "1.15.0"],
["11.7.0", "1.15.0"],
["11.6.2", "1.15.0"],
["11.6.1", "1.15.0"],
["11.6.0", "1.15.0"],
["11.5.2", "1.13.1"],
["11.5.1", "1.13.1"],
["11.5.0", "1.13.1"],
["11.4.4", "1.12.1"],
["11.4.3", "1.12.1"],
["11.4.2", "1.12.1"],
["11.4.1", "1.12.1"],
["11.4.0", "1.12.1"],
["11.3.1", "1.11.0"],
["11.3.0", "1.11.0"],
["11.2.2", "1.10.0"],
["11.2.1", "1.10.0"],
["11.2.0", "1.10.0"],
]:
provides(f"cub@{cub_ver}", when=f"@{cuda_ver}")
@classmethod
def determine_version(cls, exe):
output = Executable(exe)("--version", output=str, error=str)