How to use Opencl in openSUSE tumbleweed?

Hi All,
I switch my distro from ubuntu to openSUSE today.
In ubuntu, I used

sudo apt update
sudo apt install ocl-icd-opencl-dev

Then opencl works in darktable.

But now, I don’t know how to do in openSUSE?
I already installed Nvidia driver. Is there anything I need to install?

kelvin@localhost:~> darktable -d opencl
0.052789 [opencl_init] opencl related configuration options:
0.052799 [opencl_init]
0.052800 [opencl_init] opencl: 1
0.052813 [opencl_init] opencl_scheduling_profile: ‘default’
0.052815 [opencl_init] opencl_library: ‘’
0.052817 [opencl_init] opencl_memory_requirement: 768
0.052821 [opencl_init] opencl_memory_headroom: 400
0.052824 [opencl_init] opencl_device_priority: ‘/!0,///!0,*’
0.052837 [opencl_init] opencl_mandatory_timeout: 200
0.052840 [opencl_init] opencl_size_roundup: 16
0.052842 [opencl_init] opencl_async_pixelpipe: 0
0.052855 [opencl_init] opencl_synch_cache: active module
0.052857 [opencl_init] opencl_number_event_handles: 25
0.052860 [opencl_init] opencl_micro_nap: 1000
0.052863 [opencl_init] opencl_use_pinned_memory: 0
0.052865 [opencl_init] opencl_use_cpu_devices: 0
0.052868 [opencl_init] opencl_avoid_atomics: 0
0.052870 [opencl_init]
0.052991 [opencl_init] could not find opencl runtime library ‘libOpenCL’
0.053045 [opencl_init] could not find opencl runtime library ‘libOpenCL.so’
0.053135 [opencl_init] found opencl runtime library ‘libOpenCL.so.1’
0.053175 [opencl_init] opencl library ‘libOpenCL.so.1’ found on your system and loaded
0.058214 [opencl_init] could not get platforms: -1001
0.058225 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.058227 [opencl_init] initial status of opencl enabled flag is OFF.

  • what graphics card?
  • what cpu?

It largely depends that.

Oh~ my bad. I forgot it.
My laptop is Dell M4800 with i7-4910MQ and Quadro K2100M.

Here is the driver I installed.
Screenshot_20200131_021715

if you run darktable-cltest what does it say about your device?
What drivers are you using?

and finally run following and see if output is similar:

$ darktable-cltest | grep FINALLY
0.262081 [opencl_init] FINALLY: opencl is AVAILABLE on this system.

Hi @johnny-bit
Here is the result

kelvin@localhost:~> darktable-cltest
0.022739 [opencl_init] opencl related configuration options:
0.022748 [opencl_init]
0.022749 [opencl_init] opencl: 1
0.022761 [opencl_init] opencl_scheduling_profile: ‘default’
0.022763 [opencl_init] opencl_library: ‘’
0.022765 [opencl_init] opencl_memory_requirement: 768
0.022768 [opencl_init] opencl_memory_headroom: 400
0.022770 [opencl_init] opencl_device_priority: ‘/!0,///!0,*’
0.022783 [opencl_init] opencl_mandatory_timeout: 200
0.022785 [opencl_init] opencl_size_roundup: 16
0.022788 [opencl_init] opencl_async_pixelpipe: 0
0.022791 [opencl_init] opencl_synch_cache: active module
0.022793 [opencl_init] opencl_number_event_handles: 25
0.022796 [opencl_init] opencl_micro_nap: 1000
0.022797 [opencl_init] opencl_use_pinned_memory: 0
0.022800 [opencl_init] opencl_use_cpu_devices: 0
0.022803 [opencl_init] opencl_avoid_atomics: 0
0.022805 [opencl_init]
0.022929 [opencl_init] could not find opencl runtime library ‘libOpenCL’
0.022999 [opencl_init] could not find opencl runtime library ‘libOpenCL.so’
0.024043 [opencl_init] found opencl runtime library ‘libOpenCL.so.1’
0.024072 [opencl_init] opencl library ‘libOpenCL.so.1’ found on your system and loaded
0.063415 [opencl_init] could not get platforms: -1001
0.063433 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.063436 [opencl_init] initial status of opencl enabled flag is OFF.

kelvin@localhost:~> darktable-cltest | grep FINALLY
0.025139 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.

My driver is Nvidia 440.44-22.1
Looks like I missing the library file “libOpenCL” and “libOpenCL.so”, how to install them?

zypper in nvidia-computeG05-440.44

1 Like

Hi @darix,

I’ve already installed it.

kelvin@localhost:~> sudo zypper in nvidia-computeG05-440.44
[sudo] password for root:
Loading repository data…
Reading installed packages…
‘nvidia-computeG05 = 440.44’ is already installed.
No update candidate for ‘nvidia-computeG05-440.44-22.1.x86_64’. The highest available version is already installed.
Resolving package dependencies…
Nothing to do.
kelvin@localhost:~>

Hi @Kelvin_Wu,
Long time since I used Tumbleweed – so I do not remember what action to take.
Even if this link primarily deals with Manjaro, you might get some ideas:
https://forum.manjaro.org/t/nvidia-opencl-issues/58058/5
Like “do you have opencl-headers, opencl-nvidia and ocl-icd installed?”

ocl-icd most likely is the culprit here…

Good luck!
Claes in Lund, Sweden

# rpmqpack| grep -iE '(opencl|ocl|nvidia)' | grep -Eiv '(geoclue|autoclean)'
kernel-firmware-nvidia
nvidia-computeG05
nvidia-gfxG05-kmp-default
nvidia-glG05
x11-video-nvidiaG05

and I get:

# darktable-cltest
0.837862 [opencl_init] opencl related configuration options:
0.837900 [opencl_init] 
0.837906 [opencl_init] opencl: 1
0.837912 [opencl_init] opencl_scheduling_profile: 'default'
0.837917 [opencl_init] opencl_library: ''
0.837923 [opencl_init] opencl_memory_requirement: 768
0.837944 [opencl_init] opencl_memory_headroom: 300
0.837951 [opencl_init] opencl_device_priority: '*/!0,*/*/*'
0.837958 [opencl_init] opencl_mandatory_timeout: 200
0.837965 [opencl_init] opencl_size_roundup: 16
0.837971 [opencl_init] opencl_async_pixelpipe: 0
0.837981 [opencl_init] opencl_synch_cache: false
0.837995 [opencl_init] opencl_number_event_handles: 25
0.838023 [opencl_init] opencl_micro_nap: 1000
0.838031 [opencl_init] opencl_use_pinned_memory: 0
0.838040 [opencl_init] opencl_use_cpu_devices: 0
0.838050 [opencl_init] opencl_avoid_atomics: 0
0.838057 [opencl_init] 
0.838317 [opencl_init] could not find opencl runtime library 'libOpenCL'
0.838443 [opencl_init] could not find opencl runtime library 'libOpenCL.so'
0.838725 [opencl_init] found opencl runtime library 'libOpenCL.so.1'
0.838786 [opencl_init] opencl library 'libOpenCL.so.1' found on your system and loaded
0.872006 [opencl_init] found 1 platform
0.872030 [opencl_init] found 1 device
0.872145 [opencl_init] device 0 `Quadro P600' has sm_20 support.
0.872213 [opencl_init] device 0 `Quadro P600' supports image sizes of 16384 x 32768
0.872219 [opencl_init] device 0 `Quadro P600' allows GPU memory allocations of up to 499MB
[opencl_init] device 0: Quadro P600 
     GLOBAL_MEM_SIZE:          1998MB
     MAX_WORK_GROUP_SIZE:      1024
     MAX_WORK_ITEM_DIMENSIONS: 3
     MAX_WORK_ITEM_SIZES:      [ 1024 1024 64 ]
     DRIVER_VERSION:           440.44
     DEVICE_VERSION:           OpenCL 1.2 CUDA
1.069714 [opencl_init] options for OpenCL compiler: -w  -DNVIDIA_SM_20=1 -DNVIDIA=1 -I"/usr/share/darktable/kernels"
[snip]
1.093731 [opencl_init] kernel loading time: 0.0239 
1.093741 [opencl_init] OpenCL successfully initialized.
1.093743 [opencl_init] here are the internal numbers and names of OpenCL devices available to darktable:
1.093746 [opencl_init]		0	'Quadro P600'
1.093750 [opencl_init] FINALLY: opencl is AVAILABLE on this system.
1.093753 [opencl_init] initial status of opencl enabled flag is ON.

looks similar for my nvidia GPU at home.

Hi @Claes,
Yes, I’ve installed opencl-headers, opencl-nvidia and ocl-icd. But still not worked…
Thanks for your reply.

Hi @darix, many thanks for your help.
I try to removed opencl-headers and ocl-icd.
Then I did the same thing like you, and I got the same result with you.

#rpmqpack| grep -iE ‘(opencl|ocl|nvidia)’ | grep -Eiv ‘(geoclue|autoclean)’
kernel-firmware-nvidia
nvidia-computeG05
nvidia-gfxG05-kmp-default
nvidia-glG05
x11-video-nvidiaG05

But, when I did this,I get:

#darktable-cltest
0.021861 [opencl_init] opencl related configuration options:
0.021870 [opencl_init]
0.021872 [opencl_init] opencl: 1
0.021884 [opencl_init] opencl_scheduling_profile: ‘default’
0.021886 [opencl_init] opencl_library: ‘’
0.021887 [opencl_init] opencl_memory_requirement: 768
0.021890 [opencl_init] opencl_memory_headroom: 400
0.021893 [opencl_init] opencl_device_priority: ‘/!0,///!0,*’
0.021906 [opencl_init] opencl_mandatory_timeout: 200
0.021909 [opencl_init] opencl_size_roundup: 16
0.021913 [opencl_init] opencl_async_pixelpipe: 0
0.021916 [opencl_init] opencl_synch_cache: active module
0.021920 [opencl_init] opencl_number_event_handles: 25
0.021923 [opencl_init] opencl_micro_nap: 1000
0.021936 [opencl_init] opencl_use_pinned_memory: 0
0.021939 [opencl_init] opencl_use_cpu_devices: 0
0.021942 [opencl_init] opencl_avoid_atomics: 0
0.021944 [opencl_init]
0.022067 [opencl_init] could not find opencl runtime library ‘libOpenCL’
0.022123 [opencl_init] could not find opencl runtime library ‘libOpenCL.so’
0.023548 [opencl_init] found opencl runtime library ‘libOpenCL.so.1’
0.023578 [opencl_init] opencl library ‘libOpenCL.so.1’ found on your system and loaded
0.064770 [opencl_init] could not get platforms: -1001
0.064792 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.064795 [opencl_init] initial status of opencl enabled flag is OFF.

No luck…
Ha~ I think maybe it’s time go back to Linux Mint, it more easier for me. I’m a super new user on Linux.

attach a “hwinfo --all” to the thread.

to me it really seems you have no nvidia GPU or installed the wrong driver. maybe your card needs the G04 or so.

Hi @darix,
Here is the result about video card.

26: PCI 100.0: 0300 VGA compatible controller (VGA)
[Created at pci.386]
Unique ID: VCu0.y_2Q1EhXrt7
Parent ID: vSkL.uHVYA+EuUr0
SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0
SysFS BusID: 0000:01:00.0
Hardware Class: graphics card
Model: “nVidia GK106GLM [Quadro K2100M]”
Vendor: pci 0x10de “nVidia Corporation”
Device: pci 0x11fc “GK106GLM [Quadro K2100M]”
SubVendor: pci 0x1028 “Dell”
SubDevice: pci 0x05cc
Revision: 0xa1
Driver: “nvidia”
Driver Modules: “nvidia”
Memory Range: 0xf4000000-0xf4ffffff (rw,non-prefetchable)
Memory Range: 0xe0000000-0xefffffff (ro,non-prefetchable)
Memory Range: 0xf0000000-0xf1ffffff (ro,non-prefetchable)
I/O Ports: 0xe000-0xefff (rw)
Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
IRQ: 39 (67634 events)
Module Alias: “pci:v000010DEd000011FCsv00001028sd000005CCbc03sc00i00”
Driver Info #0:
Driver Status: nouveau is not active
Driver Activation Cmd: “modprobe nouveau”
Driver Info #1:
Driver Status: nvidia_drm is active
Driver Activation Cmd: “modprobe nvidia_drm”
Driver Info #2:
Driver Status: nvidia is active
Driver Activation Cmd: “modprobe nvidia”
Config Status: cfg=no, avail=yes, need=no, active=unknown
Attached to: #23 (PCI bridge)

I tried the G04. It’s the same.

rpmqpack| grep -iE ‘(opencl|ocl|nvidia)’ | grep -Eiv ‘(geoclue|autoclean)’
kernel-firmware-nvidia
nvidia-computeG04
nvidia-gfxG04-kmp-default
nvidia-gfxG04-kmp-pae
nvidia-glG04
x11-video-nvidiaG04

darktable-cltest
0.020051 [opencl_init] opencl related configuration options:
0.020062 [opencl_init]
0.020064 [opencl_init] opencl: 1
0.020068 [opencl_init] opencl_scheduling_profile: ‘default’
0.020081 [opencl_init] opencl_library: ‘’
0.020085 [opencl_init] opencl_memory_requirement: 768
0.020089 [opencl_init] opencl_memory_headroom: 400
0.020102 [opencl_init] opencl_device_priority: ‘/!0,///!0,*’
0.020106 [opencl_init] opencl_mandatory_timeout: 200
0.020110 [opencl_init] opencl_size_roundup: 16
0.020113 [opencl_init] opencl_async_pixelpipe: 0
0.020125 [opencl_init] opencl_synch_cache: active module
0.020128 [opencl_init] opencl_number_event_handles: 25
0.020132 [opencl_init] opencl_micro_nap: 1000
0.020135 [opencl_init] opencl_use_pinned_memory: 0
0.020138 [opencl_init] opencl_use_cpu_devices: 0
0.020141 [opencl_init] opencl_avoid_atomics: 0
0.020144 [opencl_init]
0.020221 [opencl_init] could not find opencl runtime library ‘libOpenCL’
0.020275 [opencl_init] could not find opencl runtime library ‘libOpenCL.so’
0.020375 [opencl_init] found opencl runtime library ‘libOpenCL.so.1’
0.020399 [opencl_init] opencl library ‘libOpenCL.so.1’ found on your system and loaded
0.024409 [opencl_init] could not get platforms: -1001
0.024417 [opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
0.024422 [opencl_init] initial status of opencl enabled flag is OFF.

There are only show G04 and G05 drivers for install. I don’t have another choose.

Not sure if it helps, but
Nvidia says that 418.88 would fit?
https://www.nvidia.com/Download/driverResults.aspx/149219/en-us

/Claes

Hi @Claes,
I download and execute “NVIDIA-Linux-x86_64-418.88.run”. Not thing happen…

Thanks for all your helps. I don’t want to spend too much time on setup system. I decide go back to Linux Mint. Thanks a lot!

1 Like

Do you always run away if you hit a bump?

1 Like

Hi @asn
I love KDE, rolling release and cute green lizard logo of openSUSE.
But I already spent to much time on it. Is it worth? I don’t know.
I just a normal user, just want my PC runing satble and do that I want to do.
If you have any new way to setup opencl on openSUSE, I’ll be glad to try it.
Thanks for your comments.

I’m using ROCm, which provides a zypper repo for SUSE in the meantime. However @darix tried to help you but you ran away before he got to help you.

Hi @asn,

did you follow the whole procedure under New features and enhancements in ROCm 2.10 for SLES15 including groupchange of the user, dkms and modprobe or did you just added the mentioned repo and installed the four rpms

hsa-rocr-dev
hsakmt-roct
rocm-opencl
rocm-opencl-devel

manually without further configuration?

To install ROCm with OpenCL and OpenCL Image support, you have do the following five steps:

  1. Add the 2.10.0 repo to your package manager (3.0 doesn’t work). To do that for zypper on openSUSE create the following file:

    /etc/zypp/repos.d/rocm.repo

    [rocm]
    name=Radeon Open Compute
    enabled=1
    autorefresh=0
    baseurl=http://repo.radeon.com/rocm/zyp/2.10.0/
    type=rpm-md
    
  2. Install the required packages using:

    zypper in rocm-opencl hsa-ext-rocr-dev
    
  3. Create /etc/ld.so.conf.d/rocm-opencl.conf with the following content:

    /opt/rocm/hsa/lib/
    /opt/rocm/lib
    /opt/rocm/lib64
    /opt/rocm/opencl/lib/x86_64
    
  4. To load the new paths into the linker run: ldconfig

  5. And last but not least create an OpenCL ICD file using:

    echo libamdocl64.so > /etc/OpenCL/vendors/amdocl64.icd
    

I’m on Kernel 5.4.14.

2 Likes