From 3f1762bcc2d2346feb6ab381d8c29d40d21e4bb0 Mon Sep 17 00:00:00 2001 From: Janne Blomqvist Date: Tue, 10 Sep 2019 20:52:55 +0300 Subject: cuda: New version 10.1.243 (#12777) * cuda: New version 10.1.243 Adds CUDA 10.1.243. The installer command-line arguments have slightly changed, hence in the install method the version needs to be inspected in order to give the correct arguments for the new installer. * cuda: Combine common command-line arguments The CUDA 10.1+ installer has slightly different command-line arguments than previous versions. Keep the common parts together and only split where they are different. * Make flake8 happy --- var/spack/repos/builtin/packages/cuda/package.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index b87c2bb024..a1c80f5a83 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -20,6 +20,10 @@ class Cuda(Package): homepage = "https://developer.nvidia.com/cuda-zone" + version('10.1.243', + sha256='e7c22dc21278eb1b82f34a60ad7640b41ad3943d929bebda3008b72536855d31', + expand=False, + url="https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run") version('10.0.130', sha256='92351f0e4346694d0fcb4ea1539856c9eb82060c25654463bfd8574ec35ee39a', expand=False, url="https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux") version('9.2.88', 'dd6e33e10d32a29914b7700c7b3d1ca0', expand=False, @@ -64,13 +68,19 @@ class Cuda(Package): # https://gist.github.com/ax3l/9489132 # for details. - runfile( + # CUDA 10.1+ has different cmdline options for the installer + arguments = [ '--silent', # disable interactive prompts - '--verbose', # create verbose log file '--override', # override compiler version checks '--toolkit', # install CUDA Toolkit - '--toolkitpath=%s' % prefix - ) + ] + if spec.satisfies('@10.1:'): + arguments.append('--installpath=%s' % prefix) # Where to install + else: + arguments.append('--verbose') # Verbose log file + arguments.append('--toolkitpath=%s' % prefix) # Where to install + + runfile(*arguments) @property def libs(self): -- cgit v1.2.3-70-g09d2