0

When running tensorflow on ubuntu 16.04 libcuda.so.1 isn't being found. This file is part of the CUDA tools which I should have installed ; maybe just no the right place? I tried searching for the files via this command:

find / -type f -name "libcuda.so.1

And I get back a list of files (shortened list):

ind: ‘/etc/cups/ssl’: Permission denied
find: ‘/etc/polkit-1/localauthority’: Permission denied
find: ‘/etc/ssl/private’: Permission denied
find: ‘/tmp/systemd-private-bfc953f066c54c8f8989b0585e58681d-colord.service-QhckWW’: Permission denied
find: ‘/tmp/systemd-private-bfc953f066c54c8f8989b0585e58681d-systemd-timesyncd.service-A46ooI’: Permission denied
find: ‘/tmp/systemd-private-bfc953f066c54c8f8989b0585e58681d-rtkit-daemon.service-pZ6U3J’: Permission denied
find: ‘/lost+found’: Permission denied
find: ‘/var/tmp/systemd-private-7216baf4e9e24f4b99aa9cd9d37e9779-rtkit-daemon.service-vEpGYO’: Permission denied
find: ‘/var/tmp/systemd-private-c9508c53c88848febd8d6b9c7758d44d-colord.service-6sVMbw’: Permission denied
find: ‘/var/tmp/systemd-private-7216baf4e9e24f4b99aa9cd9d37e9779-systemd-timesyncd.service-DifcXc’: Permission denied
find: ‘/var/tmp/systemd-private-7216baf4e9e24f4b99aa9cd9d37e9779-colord.service-j5hYyg’: Permission denied
find: ‘/var/tmp/systemd-private-81dcc732570e47799cb04c3cb0c5a2c6-systemd-timesyncd.service-dSg1Cz’: Permission denied
find: ‘/var/tmp/systemd-private-f72e80f0374645bda6c2d99c5628e374-colord.service-FbxlSK’: Permission denied
find: ‘/var/tmp/systemd-private-5065912711c44bfd880f3aca2d0008e7-colord.service-rq0MKq’: Permission denied
find: ‘/var/tmp/systemd-private-bfc953f066c54c8f8989b0585e58681d-rtkit-daemon.service-W2mqTy’: Permission denied
find: ‘/var/tmp/systemd-private-5065912711c44bfd880f3aca2d0008e7-rtkit-daemon.service-Nmhoc5’: Permission denied
find: ‘/var/tmp/systemd-private-bfc953f066c54c8f8989b0585e58681d-colord.service-yD6AKb’: Permission denied
find: ‘/var/tmp/systemd-private-310aa08f8dac48c087fb3d04eb13211d-rtkit-daemon.service-2aRSdk’: Permission denied
find: ‘/var/tmp/systemd-private-cc0e6bd6ee4c4e5a8e66d39c662b4262-systemd-timesyncd.service-cR7tKn’: Permission denied
find: ‘/var/tmp/systemd-private-81dcc732570e47799cb04c3cb0c5a2c6-colord.service-RpnOff’: Permission denied
find: ‘/var/tmp/systemd-private-93e35b4b8e084692829998454c625032-rtkit-daemon.service-FPP0C0’: Permission denied
find: ‘/var/tmp/systemd-private-f72e80f0374645bda6c2d99c5628e374-rtkit-daemon.service-KSb7II’: Permission denied
find: ‘/var/tmp/systemd-private-93e35b4b8e084692829998454c625032-colord.service-umcrrr’: Permission denied
find: ‘/var/tmp/systemd-private-bfc953f066c54c8f8989b0585e58681d-systemd-timesyncd.service-zCbfRG’: Permission denied
find: ‘/var/tmp/systemd-private-cc0e6bd6ee4c4e5a8e66d39c662b4262-rtkit-daemon.service-YUHCBb’: Permission denied
find: ‘/var/tmp/systemd-private-f72e80f0374645bda6c2d99c5628e374-systemd-timesyncd.service-3gwsBe’: Permission denied
find: ‘/var/tmp/systemd-private-c9508c53c88848febd8d6b9c7758d44d-systemd-timesyncd.service-9KAj0J’: Permission denied
find: ‘/var/tmp/systemd-private-81dcc732570e47799cb04c3cb0c5a2c6-rtkit-daemon.service-Lua60R’: Permission denied
find: ‘/var/tmp/systemd-private-cc0e6bd6ee4c4e5a8e66d39c662b4262-colord.service-9wRZuD’: Permission denied
find: ‘/var/tmp/systemd-private-310aa08f8dac48c087fb3d04eb13211d-systemd-timesyncd.service-1IVY9S’: Permission denied
find: ‘/var/tmp/systemd-private-310aa08f8dac48c087fb3d04eb13211d-colord.service-BcEhRd’: Permission denied

I'm not really sure what most of these files mean. Are these files part of the "libcuda" ? Or does this mean libcuda isn't installed.

Thank you.

After listening to what @ravery suggested:

I tried this:

ls /usr/local/cuda-8.0/doc/man/man7/libcuda.so.7 -la

which gave me an output of this:

-rw-r--r-- 1 root root 26 Jan 26  2017 /usr/local/cuda-8.0/doc/man/man7/libcuda.so.7

And if I run nvidia-smi I get back this:

------------------------------------------------------+                       
| NVIDIA-SMI 340.104    Driver Version: 340.104        |                       
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 260     Off  | 0000:01:00.0     N/A |                  N/A |
| 40%   46C   P12    N/A /  N/A |    226MiB /   895MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

    +-----------------------------------------------------------------------------+
    | Compute processes:                                               GPU Memory |
    |  GPU       PID  Process name                                     Usage      |
    |=============================================================================|
    |    0            Not Supported      

So I have to link my libdua.os.7 to my graphics card driver?

What's the best way to find this driver. Thank you.

I also tried this:

ln -s /usr/local/cuda-8.0/doc/man/man7/libcuda.so.7 /usr/local/cuda/lib/libcuda.so.1

output:

failed to create symbolic link '/usr/local/cuda/lib/libcuda.so.1': No such file or directory

EDIT: After playing around for a few days. I'm still stuck.

More info:

If I browse my computer directory, I noticed that there is a CUDA-8.0 at this location:

/usr/local/

I also see a CUDA folder with an arrow on it (which I presume represents a shorcut) here in

   /usr/local

Second Update:

Running this command:

export PATH=$PATH:/usr/local/cuda-8.0/bin

Now nvcc --version returns:

vcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

However,

locate libcuda.so.1

still returns an empty screen.

  • Your missing link is from the libcuda1-340 package, which probably gets added when you add the Ubuntu Nvidia drivers. If you added drivers any other way, well, there may be other problems too. You fixed PATH, now fix LD_LIBRARY_PATH with /usr/local/cuda-8.0/lib64, but that's unrelated to the libcuda.so.1 problem. – ubfan1 Jan 26 '18 at 22:57
  • @ubfan1 Thank you. I think I installed the Nvidia drivers which this way: sudo apt-get install nvidia-340 I remember I was having problems with some drivers causes the login screen to malfunction. – Sayaka Jan 27 '18 at 4:20
2

I had the same problem on an NVIDIA GPU Cloud Image on a Standard_NV6 on Azure, running inside Docker. For me, the problem was that I was running

docker run -it tensorflow/tensorflow:latest-gpu-py3 bash

and I should have run it with the flag --runtime=nvidia or nvidia-docker instead of docker:

nvidia-docker run -it tensorflow/tensorflow:latest-gpu-py3 bash
docker run --runtime=nvidia -it tensorflow/tensorflow:latest-gpu-py3 bash
| improve this answer | |
0

There might be various issues. Not only with CUDA but with Nvidia-drivers too.

My advice : Install tensorflow-gpu with conda.

If you have installed CUDA9.0, I don't think there is much you can do. Please check tensorflow website for supported CUDA versions.

| improve this answer | |
0

these are not files, they are directories that could not be opened due to permissions. Your file won't be there.

libcuda.so.1 is actually a link not a file. It links to your version file:for example, libcuda.so.1 links to libcuda.so.361.42.

The following commands will print the path where your link has to be located and find your version file.

echo $LD_LIBRARY_PATH #path
sudo find /usr/ -name 'libcuda.so.*' #version

If you find libcuda.so.1, then copy it into your path. If not make a link in your path that points to the version file.

| improve this answer | |
  • Thank you. The first echo doesn't have an output. So I'm assuming I have nothing stored in my PATH? As for the second command I get this output: /usr/local/cuda-8.0/doc/man/man7/libcuda.so.7 So this is my version file? Now I just need to make a link to this path? I'm not too familiar with makings links, so I'm just making a link with libcuda.so.1 to /usr/local/cuda-8.0/doc/man/man7/libcuda.so.7? If so I google making links in Ubuntu. Thank you. – Sayaka Jan 22 '18 at 20:02
  • try ln -s /usr/local/cuda-8.0/doc/man/man7/libcuda.so.7 /usr/local/cuda/lib/libcuda.so.1 – ravery Jan 22 '18 at 22:53
  • Thank you. The commmand doesn't seem to find /usr/local/cuda/lib/libcuda.so.1 . I've updated the OP, with some more info as it's hard to show via comments. Does all symbolic links end in .1? Is it possible that` .so.7 `could be a symbolic link? – Sayaka Jan 22 '18 at 23:16
0

It should link to /usr/local/lib/cuda/lib64/stubs/libcuda.so.1

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.