summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorBrian Van Essen <vanessen1@llnl.gov>2020-11-02 18:08:44 -0800
committerGitHub <noreply@github.com>2020-11-02 20:08:44 -0600
commitd38fdb3854cbcada368efd48c3faf44dea960e2f (patch)
treeb2ee72add9d488f4ed41539f7a9a16f779700077 /var
parentb4ea74c11bf6e444dda1b93f3b2c934fdde74a60 (diff)
downloadspack-d38fdb3854cbcada368efd48c3faf44dea960e2f.tar.gz
spack-d38fdb3854cbcada368efd48c3faf44dea960e2f.tar.bz2
spack-d38fdb3854cbcada368efd48c3faf44dea960e2f.tar.xz
spack-d38fdb3854cbcada368efd48c3faf44dea960e2f.zip
Update cuDNN packages to check Power installation (#19620)
* Updated cuDNN package to check to make sure that target directory exists before linking it. * Fixed flake8 * Fixed Flake8
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cudnn/package.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/cudnn/package.py b/var/spack/repos/builtin/packages/cudnn/package.py
index b8e45ce4b6..7b9e310524 100644
--- a/var/spack/repos/builtin/packages/cudnn/package.py
+++ b/var/spack/repos/builtin/packages/cudnn/package.py
@@ -257,8 +257,12 @@ class Cudnn(Package):
install_tree('.', prefix)
if 'target=ppc64le: platform=linux' in spec:
- symlink(os.path.join(prefix, 'targets', 'ppc64le-linux', 'lib'),
- prefix.lib)
- symlink(
- os.path.join(prefix, 'targets', 'ppc64le-linux', 'include'),
- prefix.include)
+ target_lib = os.path.join(prefix, 'targets',
+ 'ppc64le-linux', 'lib')
+ if os.path.isdir(target_lib) and not os.path.isdir(prefix.lib):
+ symlink(target_lib, prefix.lib)
+ target_include = os.path.join(prefix, 'targets',
+ 'ppc64le-linux', 'include')
+ if os.path.isdir(target_include) \
+ and not os.path.isdir(prefix.include):
+ symlink(target_include, prefix.include)