Compare commits

...

2 Commits

Author SHA1 Message Date
Satish Balay
2bda8e9f76 add cub-api 2024-12-10 09:12:33 -06:00
Satish Balay
852f248f2f 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
2024-12-02 11:05:51 -06:00
4 changed files with 45 additions and 1 deletions

View File

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

View File

@ -63,7 +63,7 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
variant("omptarget", default=False, description="Build with OpenMP Target support")
variant("sycl", default=False, description="Build with Sycl support")
depends_on("cub", when="+cuda")
depends_on("cub-api", when="+cuda")
depends_on("blt", type="build")
depends_on("blt@0.6.2:", type="build", when="@2024.02.1:")

View File

@ -42,6 +42,8 @@ class Cub(Package):
version("1.7.1", sha256="50b8777b83093fdfdab429a61fccdbfbbb991b3bbc08385118e5ad58e8f62e1d")
version("1.4.1", sha256="7c3784cf59f02d4a88099d6a11e357032bac9eac2b9c78aaec947d1270e21871")
provides("cub-api")
def setup_dependent_build_environment(self, env, dependent_spec):
env.set("CUB_DIR", self.prefix.include.cub.cmake)

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-api@{cub_ver}", when=f"@{cuda_ver}")
@classmethod
def determine_version(cls, exe):
output = Executable(exe)("--version", output=str, error=str)