I was experimenting with CUDA support within EESSI and ran into the issue that, when using CUDA compiled with the EESSI stack, the CUDA libraries from the host are not seen by the executables created by nvcc. This is because it looks for the CUDA driver libraries in the prefix, where they do not exist. There are a few viable solutions:
I was experimenting with CUDA support within EESSI and ran into the issue that, when using CUDA compiled with the EESSI stack, the CUDA libraries from the host are not seen by the executables created by
nvcc. This is because it looks for the CUDA driver libraries in the prefix, where they do not exist. There are a few viable solutions:LD_PRELOAD...but this requires that you know exactly which libraries to preload.LD_LIBRARY_PATH...but in the system that I was on, the CUDA libraries are in/usr/lib64so this would drag in a lot of unwanted libraries. This could be worked around by symlinking the libraries to a more unique location in the host (Compute Canada uses/usr/lib64/nvidiaand has a script that creates the necessary symlinks).