I have a desktop computer with an Nvidia GPU, and the Python machine learning library Theano installed on it. Theano uses the GPU for carrying out certain computations.
When I start IPython and import Theano, I get a notification that the GPU is being used. Likewise, when I run a test script, I get a confirmation about the same. However, I recently added a new user to my computer as follows:
sudo useradd -m -g fbar -G plugdev -s /bin/bash -c "Foo Bar" fbar
This user is unable to access the GPU in the same two cases I just described which worked for me.
I'll also post this in the Theano users group as I'm not sure whether it's a problem with access at the OS level or Python level or the module level. Please let me know if you need any additional information.
On Rich's suggestion, I tried id with both users. Initially the second user (who cannot access the GPU) was not in some of the groups the first one was in. I made them both the members of the same groups. So now id returns the following for both users:
uid=1000(myusername) gid=1000(myusername) groups=1000(myusername),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare)
Only difference is that for the second user uid and gid are 1001. Still he cannot access the GPU.
The output of
$ ls -l /dev/nvidia*
looks like this:
crw-rw-rw- 1 root root 195, 0 May 30 17:42 /dev/nvidia0 crw-rw-rw- 1 root root 195, 255 May 30 17:42 /dev/nvidiactl
Any other suggestions? I'll go read what those columns mean. Thanks!