Cannot find

I am using CUDA Toolkit 9.1.85 in an HPC environment. I am encountering this issue:

$ nvcc -o foo -lcuda foo.c
$ ./foo
./foo: error while loading shared libraries: cannot open shared object file: No such file or directory

Indeed I cannot locate On normal installations, is this file usually a link to (which I can find, and is in my linker path)? What path does it live at?

The HPC system uses “modules” to install the CUDA Toolkit in a different directory, but I wouldn’t expect any files to be missing.

Hi @rgov,

It seems that the LD_LIBRARY_PATH is not configured properly. Did you load the module? Depending on the HPC facility, it is like module load cuda. You can search the proper module name by running module search cuda. It would be helpful to show us the LD_LIBRARY_PATH before and after loading the module to see if this variable is being modified properly.


Thanks Leon. Loading the CUDA Toolkit module prepends these directories to my LD_LIBRARY_PATH:


I think I’ve resolved the problem. I could not build on the login node, I had to build on the GPU node. On these nodes the resolves to /cm/local/apps/cuda/libs/current/lib64/ which is not available on the login node.

1 Like