Page 1 of 1

OpenCL: Not detected: clGetDeviceIDs() returned -1

Posted: Thu Apr 09, 2020 10:59 am
by nadirian
Hello,

I am running a GTX1050-card on Fedora31, the CPU folding is working but not the GPU.
The log says "OpenCL: Not detected: clGetDeviceIDs() returned -1", and as far as i've read, ive installed the missing packages "ocl-icd" and "ocl-icd-devel", restarted the process and yeah.
Im out of ideas and google is not giving me any solution...

What happens is that the GPU is found, but it never receives a WU (it has been sitting 12 hrs without any WU).

Re: OpenCL: Not detected: clGetDeviceIDs() returned -1

Posted: Thu Apr 09, 2020 11:14 am
by PantherX
Welcome to the F@H Forum nadirian,

Can you please post your log file. Ensure that you have copied the System configuration which is present at the start of the log file (viewtopic.php?f=80&t=26036).

Re: OpenCL: Not detected: clGetDeviceIDs() returned -1

Posted: Thu Apr 09, 2020 11:20 am
by nadirian
Absolutely!

Code: Select all

*********************** Log Started 2020-04-09T10:05:54Z ***********************
10:05:54:************************* Folding@home Client *************************
10:05:54:      Website: https://foldingathome.org/
10:05:54:    Copyright: (c) 2009-2018 foldingathome.org
10:05:54:       Author: Joseph Coffland <[email protected]>
10:05:54:         Args: --child --lifeline 477478 /etc/fahclient/config.xml --run-as
10:05:54:               fahclient --pid-file=/var/run/fahclient.pid --daemon
10:05:54:       Config: /etc/fahclient/config.xml
10:05:54:******************************** Build ********************************
10:05:54:      Version: 7.5.1
10:05:54:         Date: May 12 2018
10:05:54:         Time: 22:51:07
10:05:54:   Repository: Git
10:05:54:     Revision: 4705bf53c635f88b8fe85af7675557e15d491ff0
10:05:54:       Branch: master
10:05:54:     Compiler: GNU 4.4.7 20120313 (Red Hat 4.4.7-18)
10:05:54:      Options: -std=gnu++98 -O3 -funroll-loops
10:05:54:     Platform: linux2 4.14.0-3-amd64
10:05:54:         Bits: 64
10:05:54:         Mode: Release
10:05:54:******************************* System ********************************
10:05:54:          CPU: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
10:05:54:       CPU ID: GenuineIntel Family 6 Model 158 Stepping 10
10:05:54:         CPUs: 12
10:05:54:       Memory: 15.55GiB
10:05:54:  Free Memory: 6.06GiB
10:05:54:      Threads: POSIX_THREADS
10:05:54:   OS Version: 5.5
10:05:54:  Has Battery: false
10:05:54:   On Battery: false
10:05:54:   UTC Offset: 2
10:05:54:          PID: 477480
10:05:54:          CWD: /var/lib/fahclient
10:05:54:           OS: Linux 5.5.10-200.fc31.x86_64 x86_64
10:05:54:      OS Arch: AMD64
10:05:54:         GPUs: 1
10:05:54:        GPU 0: Bus:1 Slot:0 Func:0 NVIDIA:7 GP107 [GeForce GTX 1050 LP] 1862
10:05:54:CUDA Device 0: Platform:0 Device:0 Bus:1 Slot:0 Compute:6.1 Driver:10.2
10:05:54:       OpenCL: Not detected: clGetDeviceIDs() returned -1
10:05:54:***********************************************************************
10:05:54:<config>
10:05:54:
10:05:54:  <!-- Network -->
10:05:54:  <proxy v=':8080'/>
10:05:54:
10:05:54:  <!-- User Information -->
10:05:54:  <passkey v='********************************'/>
10:05:54:  <team v='foo'/>
10:05:54:  <user v='bar'/>
10:05:54:
10:05:54:
10:05:54:  <!-- Folding Slots -->
10:05:54:  <slot id='0' type='GPU'>
10:05:54:    <opencl-index v='0'/>
10:05:54:  </slot>
10:05:54:</config>
10:05:54:Switching to user fahclient
10:05:54:Trying to access database...
10:05:54:Successfully acquired database lock
10:05:54:Enabled folding slot 00: READY gpu:0:GP107 [GeForce GTX 1050 LP] 1862
10:05:54:WU00:FS00:Connecting to 65.254.110.245:8080
10:05:55:WARNING:WU00:FS00:Failed to get assignment from '65.254.110.245:8080': No WUs available for this configuration
10:05:55:WU00:FS00:Connecting to 18.218.241.186:80
10:05:56:WARNING:WU00:FS00:Failed to get assignment from '18.218.241.186:80': No WUs available for this configuration
10:05:56:ERROR:WU00:FS00:Exception: Could not get an assignment
10:05:56:WU00:FS00:Connecting to 65.254.110.245:8080
10:05:56:WARNING:WU00:FS00:Failed to get assignment from '65.254.110.245:8080': No WUs available for this configuration
10:05:56:WU00:FS00:Connecting to 18.218.241.186:80
10:05:57:WARNING:WU00:FS00:Failed to get assignment from '18.218.241.186:80': No WUs available for this configuration
10:05:57:ERROR:WU00:FS00:Exception: Could not get an assignment
10:06:56:WU00:FS00:Connecting to 65.254.110.245:8080
10:06:56:WARNING:WU00:FS00:Failed to get assignment from '65.254.110.245:8080': No WUs available for this configuration

Re: OpenCL: Not detected: clGetDeviceIDs() returned -1

Posted: Thu Apr 09, 2020 11:27 am
by PantherX
Thanks for your log... while I am not an expert in Linux, you might find this thread useful as it does mention Fedora 31 in it: viewtopic.php?f=106&t=33345

Re: OpenCL: Not detected: clGetDeviceIDs() returned -1

Posted: Thu Apr 09, 2020 12:05 pm
by nadirian
Thanks for that post.
But sadly there wasnt anything for me there.
The "python2"-fix is more for the FAHControl, and not the FAHClient (which i have problem with).

Re: OpenCL: Not detected: clGetDeviceIDs() returned -1

Posted: Sun Apr 12, 2020 1:24 pm
by MarcvdM
read my post in this forum, had the same issue. caused by multiple .icd's in /etc/OpenCL/vendors. clinfo goes trough the list one by one, FAHClient doesn't know what to do. Rename all .icd files to something not ending in ".icd" and just leave the nvidia.icd

viewtopic.php?f=80&t=34020

Re: OpenCL: Not detected: clGetDeviceIDs() returned -1

Posted: Mon Apr 13, 2020 1:03 am
by 58Enfield
Thank You , MarcvdM

This is a great deal easier than mindlessly wiping and re-installing nvidia drivers over and over and over until nvidia, opencl and FAH deign to recognise each other. There have been times I have just walked away and let a machine not fold for a couple of days instead of re-installing one.....more......family blog....adjective-deleted time.

The works on Xubuntu 18.04 Various Nvidia Cards

Thank You

Re: OpenCL: Not detected: clGetDeviceIDs() returned -1

Posted: Tue Apr 14, 2020 8:19 am
by nadirian
MarcvdM wrote:read my post in this forum, had the same issue. caused by multiple .icd's in /etc/OpenCL/vendors. clinfo goes trough the list one by one, FAHClient doesn't know what to do. Rename all .icd files to something not ending in ".icd" and just leave the nvidia.icd

viewtopic.php?f=80&t=34020
Thanks alot!
This made me realise that i didnt have cuda-drivers installed
'sudo dnf install xorg-x11-drv-nvidia-cuda' (because i was missing the nvidia.icd).

But as you said, i had to remove (rename) the mesa.icd and pool.icd and FAHclient were working!

Lets see if it gets any WUs now then.

Re: OpenCL: Not detected: clGetDeviceIDs() returned -1

Posted: Tue Apr 14, 2020 9:12 am
by nadirian
Ah yes! It took some time, but now it has a job! :)

Re: OpenCL: Not detected: clGetDeviceIDs() returned -1

Posted: Tue Apr 14, 2020 9:20 am
by Neil-B
GZ … but don't tell everyone you got a GPU WU - they might try to steal it ;)