Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 456956 - dev-util/nvidia-cuda-toolkit-5.0.35-r2: nvprof cannot locate libcuinj64.so.5.0.35
Summary: dev-util/nvidia-cuda-toolkit-5.0.35-r2: nvprof cannot locate libcuinj64.so.5....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Justin Lecher (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-12 15:20 UTC by Joshua Anderson
Modified: 2013-02-13 22:02 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Anderson 2013-02-12 15:20:51 UTC
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.
Comment 1 Joshua Anderson 2013-02-12 15:23:17 UTC
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.
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2013-02-13 19:45:42 UTC
Thanks for the report, I will look into it.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2013-02-13 22:02:22 UTC
+*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
+