summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralbestro <9337627+albestro@users.noreply.github.com>2021-09-10 00:03:16 +0200
committerGitHub <noreply@github.com>2021-09-09 15:03:16 -0700
commit59d8031076b438007d1a9293d51f5b7e32e07820 (patch)
treea044d56beb84dc28b73b57d5dd9e984ae777c335
parent5fddd48f801616326b5dd6acb9e14879affb8da5 (diff)
downloadspack-59d8031076b438007d1a9293d51f5b7e32e07820.tar.gz
spack-59d8031076b438007d1a9293d51f5b7e32e07820.tar.bz2
spack-59d8031076b438007d1a9293d51f5b7e32e07820.tar.xz
spack-59d8031076b438007d1a9293d51f5b7e32e07820.zip
CUDA official GCC conflicts (#25054)
* update CUDA 11 / GCC compatibility range * additional unofficial conflict * minor changes to comments
-rw-r--r--lib/spack/spack/build_systems/cuda.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/lib/spack/spack/build_systems/cuda.py b/lib/spack/spack/build_systems/cuda.py
index 79d63fab10..e7ae26f3c9 100644
--- a/lib/spack/spack/build_systems/cuda.py
+++ b/lib/spack/spack/build_systems/cuda.py
@@ -86,6 +86,27 @@ 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'):
@@ -94,9 +115,6 @@ class CudaPackage(PackageBase):
conflicts('%gcc@7:', when='+cuda ^cuda@:9.1 target=x86_64:')
conflicts('%gcc@8:', when='+cuda ^cuda@:10.0.130 target=x86_64:')
conflicts('%gcc@9:', when='+cuda ^cuda@:10.2.89 target=x86_64:')
- conflicts('%gcc@:4', when='+cuda ^cuda@11.0.2: target=x86_64:')
- conflicts('%gcc@10:', when='+cuda ^cuda@:11.0.3 target=x86_64:')
- conflicts('%gcc@11:', when='+cuda ^cuda@:11.1.0 target=x86_64:')
conflicts('%pgi@:14.8', when='+cuda ^cuda@:7.0.27 target=x86_64:')
conflicts('%pgi@:15.3,15.5:', when='+cuda ^cuda@7.5 target=x86_64:')
conflicts('%pgi@:16.2,16.0:16.3', when='+cuda ^cuda@8 target=x86_64:')
@@ -130,9 +148,6 @@ class CudaPackage(PackageBase):
conflicts('%gcc@8:', when='+cuda ^cuda@:10.0.130 target=ppc64le:')
conflicts('%gcc@9:', when='+cuda ^cuda@:10.1.243 target=ppc64le:')
# officially, CUDA 11.0.2 only supports the system GCC 8.3 on ppc64le
- conflicts('%gcc@:4', when='+cuda ^cuda@11.0.2: target=ppc64le:')
- conflicts('%gcc@10:', when='+cuda ^cuda@:11.0.2 target=ppc64le:')
- conflicts('%gcc@11:', when='+cuda ^cuda@:11.1.0 target=ppc64le:')
conflicts('%pgi', when='+cuda ^cuda@:8 target=ppc64le:')
conflicts('%pgi@:16', when='+cuda ^cuda@:9.1.185 target=ppc64le:')
conflicts('%pgi@:17', when='+cuda ^cuda@:10 target=ppc64le:')