7

No matter how I try to get OpenCL working (sgminer, cgminer, c programming examples, clinfo)

I only get a result when I run as root.

When I run clinfo not as root I get:

terminate called after throwing an instance of 'cl::Error'
what():  clGetPlatformIDs
Aborted (core dumped)

I am using the AMD opencl implementation, and the correct ICD file does exist under /etc/OpenCL/vendors. I have changing the permissions of various files with no success.

How can I get this to work without root access

3 Answers3

4

make sure that your user is added to the video group:

sudo adduser $USER video
waltinator
  • 37,856
1

Follow steps 9-11 of this answer

  1. Optional: make symbolic links for desired system installed platforms: $ ln -s /etc/OpenCL/vendors/nvidia.icd /local/install/path/etc/vendors/nvidia.icd
  2. export OPENCL_VENDOR_PATH=/local/install/path/etc/vendors
  3. export LD_LIBRARY_PATH=/local/install/path/lib/x86_64:$LD_LIBRARY_PATH
Synergist
  • 315
1

ubuntu 14.04

same errormessage. GPU not recognised.

symptom-no files in /etc/OpenCL/vendors

create files by

sudo gedit /etc/OpenCL/vendors/amdocl64.icd

enter/paste libamdocl64.so

save

sudo gedit /etc/OpenCL/vendors/amdocl32.icd

enter/paste libamdocl32.so

save

sudo gedit /etc/OpenCL/vendors/inteocl.icd

enter/paste libintelocl.so

save

sudo gedit /etc/OpenCL/vendors/nvidia.icd

enter/paste libcuda.so

save

This worked for me. I did a lot of other things also- symlinc and xhost- but they did not fix the problem finally.

Jari
  • 11