I am trying to compile my cuda code but this error message was shown :
./a.out: error while loading shared libraries: libnvJitLink.so.12: cannot open shared object file: No such file or directory
I have cuda 12.2 version with latest hpc toolkit installed. They both came bundled. I have installed it in a custom location instead of /opt/ .
Any help will be great for me!
Thanks and regards
You may need to set your
LD_LIBRARY_PATH variable correctly. Using a file find utility, locate where
libnvJitLink.so is on your system. Then set your
LD_LIBRARY_PATH to include that location.
I did same just now. The output of the find utility is this:
I then exported it as :
Error is still same. Is there any thing I am missing?
The app is expecting libnvJitLink.so.12
For some reason that does not appear to be in your
What is the result of:
If you have root privilege, you could try doing:
ln -s -T /data/nvhpc/Linux_x86_64/23.7/cuda/12.2/targets/x86_64-linux/lib/libnvJitLink.so.12.2.91 /data/nvhpc/Linux_x86_64/23.7/cuda/12.2/targets/x86_64-linux/lib/libnvJitLink.so.12
Thank you for the response!
The result of
l libnvJitLink* in that directory is :
You’re right, it is still unable to locate libnvJitLink.so.12
Here’s the output:
libcublas.so.12 => /data/nvhpc/Linux_x86_64/23.7/math_libs/12.2/lib64/libcublas.so.12 (0x00007ff5bb9cf000)
libcusolver.so.11 => /data/nvhpc/Linux_x86_64/23.7/math_libs/12.2/lib64/libcusolver.so.11 (0x00007ff5b49c8000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff5b49af000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff5b498c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff5b4986000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff5b47a2000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff5b4653000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff5b4638000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff5b4446000)
libcublasLt.so.12 => /data/nvhpc/Linux_x86_64/23.7/math_libs/12.2/lib64/libcublasLt.so.12 (0x00007ff59247c000)
libnvJitLink.so.12 => not found
libcusparse.so.12 => /data/nvhpc/Linux_x86_64/23.7/math_libs/12.2/lib64/libcusparse.so.12 (0x00007ff582733000)
what is the result of:
ls -l /data/nvhpc/Linux_x86_64/23.7/cuda/12.2/targets/x86_64-linux/lib/libnvJitLink*
Thank you @Robert_Crovella !
When I set the
/data/nvhpc/Linux_x86_64/23.7/cuda/12.2/targets/x86_64-linux/lib/, it worked! All other location where libnvJitLink.so.12 was located didn’t worked.
Thank you for the help!
I thought you had done that already:
I did same. But it worked this time. And I also tried to export all other locations of nvJitLink. Only difference between then and now is I downgraded my cuda version bundled with HPC toolkit from 23.7 to 23.1 which is bundled with cuda 12.1
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.