From d31830eaf5d32ab513c2f295da58653d721ea437 Mon Sep 17 00:00:00 2001 From: David Beckingsale Date: Wed, 29 Sep 2021 17:22:26 -0700 Subject: Move new CUDA conflicts inside when('~allow-unsupported-compilers') block (#26132) * Move new CUDA conflicts inside when('~allow-unsupported-compilers') block Co-authored-by: Axel Huebl --- lib/spack/spack/build_systems/cuda.py | 43 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/lib/spack/spack/build_systems/cuda.py b/lib/spack/spack/build_systems/cuda.py index e7ae26f3c9..29ca46edff 100644 --- a/lib/spack/spack/build_systems/cuda.py +++ b/lib/spack/spack/build_systems/cuda.py @@ -13,7 +13,7 @@ class CudaPackage(PackageBase): """Auxiliary class which contains CUDA variant, dependencies and conflicts and is meant to unify and facilitate its usage. - Maintainers: ax3l, Rombur + Maintainers: ax3l, Rombur, davidbeckingsale """ # https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list @@ -86,30 +86,29 @@ class CudaPackage(PackageBase): # apply to platform=darwin. We currently do not provide conflicts for # platform=darwin with %apple-clang. - # GCC - # According to - # https://github.com/spack/spack/pull/25054#issuecomment-886531664 - # these conflicts are valid independently from the architecture - - # minimum supported versions - conflicts('%gcc@:4', when='+cuda ^cuda@11.0:') - conflicts('%gcc@:5', when='+cuda ^cuda@11.4:') - - # maximum supported version - # NOTE: - # in order to not constrain future cuda version to old gcc versions, - # it has been decided to use an upper bound for the latest version. - # This implies that the last one in the list has to be updated at - # each release of a new cuda minor version. - conflicts('%gcc@10:', when='+cuda ^cuda@:11.0') - conflicts('%gcc@11:', when='+cuda ^cuda@:11.4') - - # https://gist.github.com/ax3l/9489132#gistcomment-3860114 - conflicts('%gcc@10', when='+cuda ^cuda@:11.4.0') - # Linux x86_64 compiler conflicts from here: # https://gist.github.com/ax3l/9489132 with when('~allow-unsupported-compilers'): + # GCC + # According to + # https://github.com/spack/spack/pull/25054#issuecomment-886531664 + # these conflicts are valid independently from the architecture + + # minimum supported versions + conflicts('%gcc@:4', when='+cuda ^cuda@11.0:') + conflicts('%gcc@:5', when='+cuda ^cuda@11.4:') + + # maximum supported version + # NOTE: + # in order to not constrain future cuda version to old gcc versions, + # it has been decided to use an upper bound for the latest version. + # This implies that the last one in the list has to be updated at + # each release of a new cuda minor version. + conflicts('%gcc@10:', when='+cuda ^cuda@:11.0') + conflicts('%gcc@11:', when='+cuda ^cuda@:11.4') + + # https://gist.github.com/ax3l/9489132#gistcomment-3860114 + conflicts('%gcc@10', when='+cuda ^cuda@:11.4.0') conflicts('%gcc@5:', when='+cuda ^cuda@:7.5 target=x86_64:') conflicts('%gcc@6:', when='+cuda ^cuda@:8 target=x86_64:') conflicts('%gcc@7:', when='+cuda ^cuda@:9.1 target=x86_64:') -- cgit v1.2.3-70-g09d2