Use of nvprof is broken in dev-util/nvidia-cuda-toolkit-5.0.35-r2. When running it on an executable, it reports that it cannot find libcuinj64.so.5.0.35 $ nvprof /bin/ls ======== NVPROF is profiling ls... ======== Command: ls ======== Error: unable to locate profiling library libcuinj64.so.5.0.35. This is strange, because the file is installed in /opt/cuda/lib64/libcuinj64.so.5.0.35 and /opt/cuda/lib64 is in the ld search path. Despite being on the ld search path, nvprof apparently doesn't even look in that directory: any ideas? $ strace nvprof /bin/ls open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 10 fstat(10, {st_mode=S_IFREG|0644, st_size=98572, ...}) = 0 mmap(NULL, 98572, PROT_READ, MAP_PRIVATE, 10, 0) = 0x7fd0a1909000 close(10) = 0 open("/lib64/tls/x86_64/libcuinj64.so.5.0.35", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64/tls/x86_64", 0x7fff45497f20) = -1 ENOENT (No such file or directory) open("/lib64/tls/libcuinj64.so.5.0.35", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64/tls", 0x7fff45497f20) = -1 ENOENT (No such file or directory) open("/lib64/x86_64/libcuinj64.so.5.0.35", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64/x86_64", 0x7fff45497f20) = -1 ENOENT (No such file or directory) open("/lib64/libcuinj64.so.5.0.35", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/usr/lib64/tls/x86_64/libcuinj64.so.5.0.35", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/tls/x86_64", 0x7fff45497f20) = -1 ENOENT (No such file or directory) open("/usr/lib64/tls/libcuinj64.so.5.0.35", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/tls", 0x7fff45497f20) = -1 ENOENT (No such file or directory) open("/usr/lib64/x86_64/libcuinj64.so.5.0.35", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/x86_64", 0x7fff45497f20) = -1 ENOENT (No such file or directory) open("/usr/lib64/libcuinj64.so.5.0.35", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64", {st_mode=S_IFDIR|0755, st_size=61440, ...}) = 0 Right now, the only workaround I know of is to set LD_LIBRARY_PATH. $ export LD_LIBRARY_PATH=/opt/cuda/lib64 $ nvprof /bin/ls ======== NVPROF is profiling ls... ======== Command: ls cron devel hoomd-test-install hs_err_pid2495.log lj.py NVIDIA_GPU_Computing_SDK test cuda-workspace fix-nvvp-nsight.patch hs_err_pid2451.log lj2.5.py local nvvp_workspace test2 Data hoomd-dart-tests hs_err_pid2473.log lj_liquid_bmark.hoomd mpi_scaling2 r_buff-autotuning validation2 ======== Warning: No CUDA application was profiled, exiting Note: I'm using /bin/ls as a test because I know everyone will have it. nvprof works correctly on real CUDA applications too, when LD_LIBRARY_PATH is set.
Additional note: I can file this bug upstream if there is no simple solution that can be done in gentoo. However, I'd need reproduce it on one of NVIDIA's supported platforms first.
Thanks for the report, I will look into it.
+*nvidia-cuda-toolkit-5.0.35-r3 (13 Feb 2013) + + 13 Feb 2013; Justin Lecher <jlec@gentoo.org> + +nvidia-cuda-toolkit-5.0.35-r3.ebuild: + Fix various typos and logic errors, #456950 & #456956 +