Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update CUDA easyblock to add CUPTI and nvvm library directories to $LIBRARY_PATH #3516

Merged

Conversation

trz42
Copy link
Contributor

@trz42 trz42 commented Nov 24, 2024

When using RPATH linking (e.g., in EESSI) we need to ensure that all directories containing shared libraries must be listed in $LIBRARY_PATH. Otherwise the RPATH linker wrapper would not add these directories to the RPATH header, and thus the libraries cannot be resolved by the dynamic linker later.

Here, we add two directories to LIBRARY_PATH such that corresponding prepend_path commands are added to the module file for CUDA. These directories are known to the easyblock, but currently only added to $LD_LIBRARY_PATH which is filtered in EESSI.

To restrict the change to certain environments, it is only used when LD_LIBRARY_PATH is a filtered environment variable and LIBRARY_PATH is not.

@boegel boegel changed the title add CUPTI and nvvm lib dirs to LIBRARY_PATH update CUDA easyblock to add CUPTI and nvvm library directories to $LIBRARY_PATH Dec 3, 2024
@boegel boegel added bug fix EESSI Related to EESSI project labels Dec 3, 2024
@boegel boegel added this to the release after 4.9.4 milestone Dec 3, 2024
@boegel boegel requested a review from ocaisa December 3, 2024 20:37
@ocaisa
Copy link
Member

ocaisa commented Jan 8, 2025

This looks like it does what it should when testing via an extended dry run:

[make_module_step method]
List of paths that would be searched and added to module file:

 $ACLOCAL_PATH: share/aclocal
 $CLASSPATH: *.jar
 $CMAKE_LIBRARY_PATH: lib64
 $CMAKE_PREFIX_PATH:
 $CPATH: include, extras/CUPTI/include, nvvm/include
 $GI_TYPELIB_PATH: lib/girepository-*, lib32/girepository-*, lib64/girepository-*
 $LD_LIBRARY_PATH: lib64, extras/CUPTI/lib64, nvvm/lib64
 $LIBRARY_PATH: lib64, extras/CUPTI/lib64, nvvm/lib64, stubs/lib64
 $MANPATH: man, share/man
 $PATH: bin, nvvm/bin
 $PKG_CONFIG_PATH: pkgconfig
 $XDG_DATA_DIRS: share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix EESSI Related to EESSI project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants