You are not logged in.

#1 2017-07-08 18:34:11

Xum
Member
Registered: 2017-07-08
Posts: 12

[SOLVED] OpenCL not available

I was trying to compile and run an example OpenCL code but it was giving errors on runtime. I tried other programs using OpenCL and they didn't work either.
I installed clinfo-git from AUR and got the following output:

clinfo: /opt/cuda/lib64/libOpenCL.so.1: no version information available (required by clinfo)
Number of platforms                               0

I tried uninstalling cuda and the first line in the output vanishes but it still is unable to find any platforms. Cuda works fine ohterwise.
My graphics card is an NVIDIA GeForce GTX 1060. I installed these packages for OpenCL:

ocl-icd 2.2.11-1
opencl-nvidia 381.22-1
nvidia 381.22-4

Last edited by Xum (2017-07-09 08:20:18)

Offline

#2 2017-07-08 21:45:35

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,446

Re: [SOLVED] OpenCL not available

you are aware clinfo is in community ?

Maybe https://wiki.archlinux.org/index.php/GP … enCL.so.29 helps ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2017-07-09 07:14:54

Xum
Member
Registered: 2017-07-08
Posts: 12

Re: [SOLVED] OpenCL not available

I have ocl-icd installed and tried the 00-usrlib.conf thing mentioned in the article without success.
I found that ocl-icd had  a debug environment variable called OCL_ICD_DEBUG and so I set it to 255. clinfo output looks like this then:

ocl-icd(ocl_icd_loader.c:587): __initClIcd: OPENCL_VENDOR_PATH unset or empty. Using hard-coded path '/etc/OpenCL/vendors'
ocl-icd(ocl_icd_loader.c:593): __initClIcd: OCL_ICD_VENDORS empty or not defined, using vendors path '/etc/OpenCL/vendors'
ocl-icd(ocl_icd_loader.c:612): __initClIcd: Reading icd list from '/etc/OpenCL/vendors'
ocl-icd(ocl_icd_loader.c:177): _find_num_icds: return: 1/0x1
ocl-icd(ocl_icd_loader.c:208): _open_driver: Considering file '/etc/OpenCL/vendors/nvidia.icd'
ocl-icd(ocl_icd_loader.c:182): _load_icd: Loading ICD 'libnvidia-opencl.so.1'
ocl-icd(ocl_icd_loader.c:186): _load_icd: ICD[0] loaded
ocl-icd(ocl_icd_loader.c:240): _open_driver: return: 1/0x1
ocl-icd(ocl_icd_loader.c:253): _open_drivers: return: 1/0x1
ocl-icd(ocl_icd_loader.c:410): _find_and_check_platforms: Checking ICD 0/1
ocl-icd(ocl_icd_loader.c:58): dump_vendor_icd: before looking for platforms 0x13cb460={ num=0, handle=0x13cb4e0, f=(nil)}

ocl-icd(ocl_icd_loader.c:258): _get_function_addr: Looking for function clGetExtensionFunctionAddress
ocl-icd(ocl_icd_loader.c:276): _get_function_addr: return: 139741836846896/0x7f182e8ba730
ocl-icd(ocl_icd_loader.c:258): _get_function_addr: Looking for function clIcdGetPlatformIDsKHR
ocl-icd(ocl_icd_loader.c:261): _get_function_addr: Missing global symbol 'clIcdGetPlatformIDsKHR' in ICD, should be skipped
ocl-icd(ocl_icd_loader.c:276): _get_function_addr: return: 139741836734848/0x7f182e89f180
ocl-icd(ocl_icd_loader.c:258): _get_function_addr: Looking for function clGetPlatformInfo
ocl-icd(ocl_icd_loader.c:267): _get_function_addr: Missing function 'clGetPlatformInfo' in ICD, should be skipped
ocl-icd(ocl_icd_loader.c:276): _get_function_addr: return: 139741836735328/0x7f182e89f360
ocl-icd(ocl_icd_loader.c:447): _find_and_check_platforms: No platform in ICD, skipping it
ocl-icd(ocl_icd_loader.c:364): _sort_platforms: Nb platefroms: 0
ocl-icd(ocl_icd_loader.c:854): clGetPlatformIDs: return: -1001/0xfffffffffffffc17
Number of platforms                               0

Offline

#4 2017-07-09 08:18:59

Xum
Member
Registered: 2017-07-08
Posts: 12

Re: [SOLVED] OpenCL not available

Okay, solved it by restarting my system. I have no idea what the cause was and I didn't change anything.

Offline

#5 2020-02-01 10:29:53

cherrot
Member
From: Beijing, China
Registered: 2014-10-22
Posts: 3
Website

Re: [SOLVED] OpenCL not available

Maybe you has the same issue as mine:

https://askubuntu.com/questions/607118/ … 38#1043538

sudo rmmod nvidia_uvm
sudo modprobe nvidia_uvm

Offline

Board footer

Powered by FluxBB