diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2019-05-15 04:59:12 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-15 04:59:12 +0900 |
commit | c54f23d405bf468e348ebba7e6ded48dc9a8ff9b (patch) | |
tree | 5240ce38be46472e0d475f7a3a583ec309fa2c77 /var | |
parent | a5cf50df2e509328b0cd08b5a9e35ed8068de1c4 (diff) | |
download | spack-c54f23d405bf468e348ebba7e6ded48dc9a8ff9b.tar.gz spack-c54f23d405bf468e348ebba7e6ded48dc9a8ff9b.tar.bz2 spack-c54f23d405bf468e348ebba7e6ded48dc9a8ff9b.tar.xz spack-c54f23d405bf468e348ebba7e6ded48dc9a8ff9b.zip |
CUDA package: exclude compat libs (#11449)
CUDA 10.0 provides Compatability libraries for running newer versions
of CUDA with older drivers. These do not work with newer drivers.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/cuda/package.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index 3e4316b7af..2ad654bbc0 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -5,6 +5,8 @@ from spack import * from glob import glob +from llnl.util.filesystem import LibraryList +import os class Cuda(Package): @@ -58,3 +60,22 @@ class Cuda(Package): '--toolkit', # install CUDA Toolkit '--toolkitpath=%s' % prefix ) + + @property + def libs(self): + prefix = self.prefix + search_paths = [(prefix.lib, False), (prefix.lib64, False), + (prefix, True)] + for search_root, recursive in search_paths: + libs = find_libraries( + 'libcuda', root=search_root, shared=True, recursive=recursive) + if libs: + break + + filtered_libs = [] + # CUDA 10.0 provides Compatability libraries for running newer versions + # of CUDA with older drivers. These do not work with newer drivers. + for lib in libs: + if 'compat' not in lib.split(os.sep): + filtered_libs.append(lib) + return LibraryList(filtered_libs) |