nvprof not working in Ubuntu 12.04

I’m having a problem getting nvprof working under Ubuntu 12.04. I posted about it over at http://askubuntu.com/q/278845/88229 but I suspect it’s really a problem with nvprof itself and not Ubuntu so I’ll ask here as well.

The short of it is this: I have the latest CUDA toolkit up and running on an Ubuntu 12.04 server. I can compile and run the sample code and have written, compiled, and run some code of my own as well. cuda-memcheck works just fine as well as the older command line profiler. I have not tried the nvvp because I don’t have a GUI installed on this system. So, by all accounts everything is running just fine except nvprof.

When I run nvprof I get this error

Error: unable to locate profiling library libcuinj64.so.5.0.35.

I am 99.9% certain that library is properly installed (see the askubuntu link if you want to know more) and now I’m at a loss as to what to do next. Anyone have any thoughts?

Can you verify that you have /usr/local/cuda/lib64 in your LD_LIBRARY_PATH? If not, please add it and try again.

Yes. It’s there. Running

ldconfig -v

shows all the CUDA libraries properly loaded.

/usr/local/cuda-5.0/lib:
    libcurand.so.5.0 -> libcurand.so.5.0.35
    libnpp.so.5.0 -> libnpp.so.5.0.35
    libcusparse.so.5.0 -> libcusparse.so.5.0.35
    libcufft.so.5.0 -> libcufft.so.5.0.35
    **libcuinj32.so.5.0 -> libcuinj32.so.5.0.35**
    libcudart.so.5.0 -> libcudart.so.5.0.35
    libnvToolsExt.so.5.0 -> libnvToolsExt.so.5.0.35
    libcublas.so.5.0 -> libcublas.so.5.0.35
/usr/local/cuda-5.0/lib64:
    libcurand.so.5.0 -> libcurand.so.5.0.35
    libcuinj64.so.5.0 -> libcuinj64.so.5.0.35
    libnpp.so.5.0 -> libnpp.so.5.0.35
    libcusparse.so.5.0 -> libcusparse.so.5.0.35
    libcufft.so.5.0 -> libcufft.so.5.0.35
    libcudart.so.5.0 -> libcudart.so.5.0.35
    libnvToolsExt.so.5.0 -> libnvToolsExt.so.5.0.35
    libcublas.so.5.0 -> libcublas.so.5.0.35

I’ve even tried running nvprof with the LD_PRELOAD trick (

LD_PRELOAD=/path/to/lib nvprof myprogram

I am also facing the same issue. @jlmayfield4 please let me know if you have resolved the issue. Thanks!

There is a solution to this problem over here [url]http://askubuntu.com/a/305097/88229[/url] on askubuntu.

Thank you Logan for the solution to fix the nvprof error unable to locate profiling library libcuinj64.so.5.0.35. I followed the solution and now I am able to run nvprof, but only as the root or super user. Any idea how to enable it for all users? Thanks for your time and help!

The problem mentioned above is related to sudo use permissions. One needs to add the user to the sudo users group and everything should be good to go.