summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Beckingsale <davidbeckingsale@gmail.com>2021-09-29 17:22:26 -0700
committerGitHub <noreply@github.com>2021-09-30 00:22:26 +0000
commitd31830eaf5d32ab513c2f295da58653d721ea437 (patch)
tree44ace655d79dd62691a334436ce41faec5c90ea8 /lib
parent2ea1bf84ece3175c78a0474a3d53b6814ba4850c (diff)
downloadspack-d31830eaf5d32ab513c2f295da58653d721ea437.tar.gz
spack-d31830eaf5d32ab513c2f295da58653d721ea437.tar.bz2
spack-d31830eaf5d32ab513c2f295da58653d721ea437.tar.xz
spack-d31830eaf5d32ab513c2f295da58653d721ea437.zip
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 <axel.huebl@plasma.ninja>
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_systems/cuda.py43
1 files 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:')