Hi,

When I run an opencl-related program as root, the devide node changes.

[ROOT USER]
eagle ~ # modprobe nvidia-331-uvm
eagle ~ # ls -l /dev|grep nvidia
crw-rw-rw-  1 root root    195,   0 Jul 26 20:22 nvidia0
crw-rw-rw-  1 root root    195, 255 Jul 26 20:22 nvidiactl
eagle ~ # mknod -m 666 /dev/nvidia-uvm c 249 0
eagle ~ # ls -l /dev/ >/tmp/dev-before

-- at this point, running darktable as non-root user results in
[NORMAL USER]
[opencl_init] opencl library 'libOpenCL' found on your system and loaded
[opencl_init] could not get platforms: -1001
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.

[ROOT USER]
eagle ~ # clinfo
clinfo: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1: no version
information available (required by clinfo)
E: -30

-- despite this error, darktable can now be run as normal user

-- Comparing devices: it's not a permission issue, rather the device
major code is modified:
eagle ~ # ls -l /dev/ >/tmp/dev-after
eagle ~ # diff /tmp/dev-before /tmp/dev-after
47c47
< crw-rw-rw-  1 root root    249,   0 Jul 26 22:24 nvidia-uvm
---
> crw-rw-rw-  1 root root    250,   0 Jul 26 22:24 nvidia-uvm

Kofa


On 24 July 2014 22:11, Ulrich Pegelow <[email protected]> wrote:
> Am 24.07.2014 21:41, schrieb KOVÁCS István:
>> Ulrich,
>>
>> thanks for the info.
>> I did not have libOpenCL.so; it's contained in nvidia-opencl-dev,
>> which I have now installed.
>> The nvidia-uvm module was present on my system, but not loaded. I've
>> loaded it with modprobe, now it's present in the result of lsmod.
>> The /dev/nvidia-uvm mode was also missing; I've created it using mknod:
>> crw-rw-rw- 1 root root 195,   0 Jul 24 16:10 /dev/nvidia0
>> crw-rw-rw- 1 root root 195, 255 Jul 24 16:10 /dev/nvidiactl
>> crw-rw-rw- 1 root root 249,   0 Jul 24 21:29 /dev/nvidia-uvm
>>
>> Now I get:
>> [opencl_init] trying to load opencl library: '<system default>'
>> [opencl_init] opencl library 'libOpenCL' found on your system and loaded
>> [opencl_init] could not get platforms: -1001
>>
>> If I run darktable as root (sudo), OpenCL works:
>> [opencl_init] trying to load opencl library: '<system default>'
>> [opencl_init] opencl library 'libOpenCL' found on your system and loaded
>> [opencl_init] found 1 platform
>> [opencl_init] found 1 device
>> [...]
>> [opencl_init] FINALLY: opencl is AVAILABLE on this system.
>> [opencl_init] initial status of opencl enabled flag is ON.
>>
>> If subsequently I run darktable without sudo, OpenCL works again.
>
> Seems to be a permission issue. When run as root some change to the
> permissions in /dev might be generated. You should check before/after.
>
> Ulrich
>
>>
>> Some people have suggested creating an udev rule to create the device:
>> https://devtalk.nvidia.com/default/topic/699610/334-21-driver-returns-999-on-cuinit-cuda-/
>>
>> Kofa
>>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Darktable-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/darktable-users

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Darktable-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/darktable-users

Reply via email to