From 49f0e9640df0a8756e8c3d5be979819aeaa65776 Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez <30461003+jonglezb@users.noreply.github.com> Date: Fri, 22 Jan 2021 23:27:14 +0100 Subject: [PATCH] cuda: add installation workaround for version 10.1.243 on ppc64le (#21200) Fixes #21170 --- var/spack/repos/builtin/packages/cuda/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index 2da40d75d5..4e9cf41e7f 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -134,6 +134,15 @@ def install(self, spec, prefix): # https://gist.github.com/ax3l/9489132 # for details. + # CUDA 10.1 on ppc64le fails to copy some files, the workaround is adapted from + # https://forums.developer.nvidia.com/t/cuda-10-1-243-10-1-update-2-ppc64le-run-file-installation-issue/82433 + # See also #21170 + if spec.satisfies('@10.1.243') and platform.machine() == 'ppc64le': + includedir = "targets/ppc64le-linux/include" + os.makedirs(os.path.join(prefix, includedir)) + os.makedirs(os.path.join(prefix, "src")) + os.symlink(includedir, os.path.join(prefix, "include")) + # CUDA 10.1+ has different cmdline options for the installer arguments = [ runfile, # the install script