I am attempting to verify the installation of CUDA and am running into some issues. I have successfully built all of the examples that come with the GPU computing SDK. When I try to run deviceQuery however, I get an error saying that libcudart.so.4 can not be found.
Inside of that directory is a file:
What other sort of errors could be causing the library to not be located?
EDIT for Fran's answer:
- Yes, I am exporting the variable
- I am not sure if the program is 64-bit, however it came as part of a 64-bit SDK install, so I would like to assume it is
Output of ldd:
#ldd deviceQuery linux-vdso.so.1 => (0x00007fff94ecc000) libcudart.so.4 => /usr/local/cuda/lib64/libcudart.so.4 (0x00007f2d4658a000) libcuda.so.1 => /usr/lib64/libcuda.so.1 (0x00007f2d45b1e000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00000037f1200000) libm.so.6 => /lib64/libm.so.6 (0x00000037e5e00000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00000037f0600000) libc.so.6 => /lib64/libc.so.6 (0x00000037e5600000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00000037e5a00000) libdl.so.2 => /lib64/libdl.so.2 (0x00000037e5200000) librt.so.1 => /lib64/librt.so.1 (0x00000037e6200000) libz.so.1 => /lib64/libz.so.1 (0x00000037e6e00000) /lib64/ld-linux-x86-64.so.2 (0x00000037e4e00000)
I have found that I can run it as a normal user, but doing so causes it to fail since the user does not have access to the GPU. Running it with sudo causes the missing file error.
sudo ldd deviceQuery
confirms the missing libcudart.so.4 on the second line of the output.