Used os.path.join in cuda.py, and added ldconfig to post_install_step#1473
Used os.path.join in cuda.py, and added ldconfig to post_install_step#1473boegel merged 2 commits intoeasybuilders:developfrom
Conversation
| 'files': [os.path.join("bin", "%s") % x for x in ["fatbinary", "nvcc", "nvlink", "ptxas"]] + | ||
| [os.path.join("%s", "lib%s.%s") % (x, y, shlib_ext) for x in chk_libdir for y in ["cublas", | ||
| "cudart", "cufft", "curand", | ||
| "cusparse"]], |
There was a problem hiding this comment.
continuation line under-indented for visual indent
| "curand", "cusparse"]], | ||
| 'files': [os.path.join("bin", "%s") % x for x in ["fatbinary", "nvcc", "nvlink", "ptxas"]] + | ||
| [os.path.join("%s", "lib%s.%s") % (x, y, shlib_ext) for x in chk_libdir for y in ["cublas", | ||
| "cudart", "cufft", "curand", |
There was a problem hiding this comment.
continuation line under-indented for visual indent
| ["%s/lib%s.%s" % (x, y, shlib_ext) for x in chk_libdir for y in ["cublas", "cudart", "cufft", | ||
| "curand", "cusparse"]], | ||
| 'files': [os.path.join("bin", "%s") % x for x in ["fatbinary", "nvcc", "nvlink", "ptxas"]] + | ||
| [os.path.join("%s", "lib%s.%s") % (x, y, shlib_ext) for x in chk_libdir for y in ["cublas", |
There was a problem hiding this comment.
continuation line unaligned for hanging indent
|
@akesandgren could you review this PR? |
| ["%s/lib%s.%s" % (x, y, shlib_ext) for x in chk_libdir for y in ["cublas", "cudart", "cufft", | ||
| "curand", "cusparse"]], | ||
| 'files': [os.path.join("bin", "%s") % x for x in ["fatbinary", "nvcc", "nvlink", "ptxas"]] + | ||
| [os.path.join("%s", "lib%s.%s") % (x, y, shlib_ext) for x in chk_libdir for y in ["cublas", |
There was a problem hiding this comment.
A variant of writing this is:
[os.path.join("bin", x) for x in [...]]
[os.path.join(x, "lib%s.%s") % (y, shlib_ext) for x in ...
At least the first one is slightly easier to read
There was a problem hiding this comment.
probably easier to lift the ["cublas", ...] list into a variable:
culibs = ["cublas", "cudart", "cufft", "curand", "cusparse"]
...
[os.path.join("%s", "lib%s.%s") % (d, l, shlib_ext) for d in chk_libdir for l in culibs] | ["%s/lib%s.%s" % (x, y, shlib_ext) for x in chk_libdir for y in ["cublas", "cudart", "cufft", | ||
| "curand", "cusparse"]], | ||
| 'files': [os.path.join("bin", "%s") % x for x in ["fatbinary", "nvcc", "nvlink", "ptxas"]] + | ||
| [os.path.join("%s", "lib%s.%s") % (x, y, shlib_ext) for x in chk_libdir for y in ["cublas", |
There was a problem hiding this comment.
probably easier to lift the ["cublas", ...] list into a variable:
culibs = ["cublas", "cudart", "cufft", "curand", "cusparse"]
...
[os.path.join("%s", "lib%s.%s") % (d, l, shlib_ext) for d in chk_libdir for l in culibs] |
other than the minor style issues that @houndci-bot is tripping over: lgtm |
|
@boegel @akesandgren any other comments? |
|
lgtm, tested with a bunch of existing Going in, thanks @damianam! |
This PR makes the easyblock use
os.path.joininstead of/, but more importantly, runsldconfig -Nin the stubs directory, to create the proper symlinks. This is necessary to deal with binaries created outside of EB, which might be linked againstlibcuda.so.1instead oflibcuda.so, like, for instance,MVAPICH2-GDR