Is OpenCL Necessary?

It seems that a lot of GPU problems revolve around specific versions of drivers. Though NVidia has their own support structure, you can often learn from information reported by others who fold.

Moderators: Site Moderators, FAHC Science Team

Post Reply
trleith
Posts: 14
Joined: Tue Mar 24, 2020 7:19 pm

Is OpenCL Necessary?

Post by trleith »

So FAHClient finds the GPU and it finds CUDA, but not OpenCL. But /etc/init.d/FAHClient start I think it is complains about respawning too fast, and FAHClient complains about some database being locked. It all exits in a couple minutes.

I have no idea what's happening. I had thought OpenCL was a second-choice kinda thing vs CUDA, but maybe it's necessary to have in order to run at all.

Can anybody help?

t

It's Ubuntu Server 20, fresh install.

I see this in my tty window

Code: Select all

trl@svr2:/etc/fahclient$ sudo /etc/init.d/FAHClient start
Starting fahclient ... 19:37:34:Read GPUs.txt
19:37:34:******************************* libFAH ********************************
19:37:34:         Date: Oct 20 2020
19:37:34:         Time: 20:36:39
19:37:34:     Revision: 5ca109d295a6245e2a2f590b3d0085ad5e567aeb
19:37:34:       Branch: master
19:37:34:     Compiler: GNU 8.3.0
19:37:34:      Options: -faligned-new -std=c++11 -fsigned-char -ffunction-sections
19:37:34:               -fdata-sections -O3 -funroll-loops -fno-pie
19:37:34:     Platform: linux2 5.8.0-1-amd64
19:37:34:         Bits: 64
19:37:34:         Mode: Release
19:37:34:****************************** FAHClient ******************************
19:37:34:      Version: 7.6.21
19:37:34:       Author: Joseph Coffland <[email protected]>
19:37:34:    Copyright: 2020 foldingathome.org
19:37:34:     Homepage: https://foldingathome.org/
19:37:34:         Date: Oct 20 2020
19:37:34:         Time: 20:39:00
19:37:34:     Revision: 6efbf0e138e22d3963e6a291f78dcb9c6422a278
19:37:34:       Branch: master
19:37:34:     Compiler: GNU 8.3.0
19:37:34:      Options: -faligned-new -std=c++11 -fsigned-char -ffunction-sections
19:37:34:               -fdata-sections -O3 -funroll-loops -fno-pie
19:37:34:     Platform: linux2 5.8.0-1-amd64
19:37:34:         Bits: 64
19:37:34:         Mode: Release
19:37:34:         Args: /etc/fahclient/config.xml --run-as fahclient
19:37:34:               --pid-file=/var/run/fahclient.pid --daemon
19:37:34:       Config: /etc/fahclient/config.xml
19:37:34:******************************** CBang ********************************
19:37:34:         Date: Oct 20 2020
19:37:34:         Time: 18:37:59
19:37:34:     Revision: 7e4ce85225d7eaeb775e87c31740181ca603de60
19:37:34:       Branch: master
19:37:34:     Compiler: GNU 8.3.0
19:37:34:      Options: -faligned-new -std=c++11 -fsigned-char -ffunction-sections
19:37:34:               -fdata-sections -O3 -funroll-loops -fno-pie -fPIC
19:37:34:     Platform: linux2 5.8.0-1-amd64
19:37:34:         Bits: 64
19:37:34:         Mode: Release
19:37:34:******************************* System ********************************
19:37:34:          CPU: Intel(R) Xeon(R) CPU E5405 @ 2.00GHz
19:37:34:       CPU ID: GenuineIntel Family 6 Model 23 Stepping 6
19:37:34:         CPUs: 8
19:37:34:       Memory: 49.03GiB
19:37:34:  Free Memory: 618.70MiB
19:37:34:      Threads: POSIX_THREADS
19:37:34:   OS Version: 5.4
19:37:34:  Has Battery: false
19:37:34:   On Battery: false
19:37:34:   UTC Offset: 0
19:37:34:          PID: 39194
19:37:34:          CWD: /var/lib/fahclient
19:37:34:           OS: Linux 5.4.0-74-generic x86_64
19:37:34:      OS Arch: AMD64
19:37:34:         GPUs: 1
19:37:34:        GPU 0: Bus:2 Slot:0 Func:0 NVIDIA:7 GP106 [GeForce GTX 1060 3GB] 3935
19:37:34:CUDA Device 0: Platform:0 Device:0 Bus:2 Slot:0 Compute:6.1 Driver:11.2
19:37:34:       OpenCL: Not detected: Failed to open dynamic library 'libOpenCL.so':
19:37:34:               libOpenCL.so: cannot open shared object file: No such file or
19:37:34:               directory
19:37:34:***********************************************************************
19:37:34:<config>
19:37:34:  <!-- Client Control -->
19:37:34:  <fold-anon v='true'/>
19:37:34:
19:37:34:  <!-- HTTP Server -->
19:37:34:  <allow v='192.168.0.0/24'/>
19:37:34:
19:37:34:  <!-- Process Control -->
19:37:34:  <fork v='true'/>
19:37:34:  <pid v='true'/>
19:37:34:  <respawn v='true'/>
19:37:34:  <service v='true'/>
19:37:34:
19:37:34:  <!-- Remote Command Server -->
19:37:34:  <password v='*****'/>
19:37:34:
19:37:34:  <!-- Slot Control -->
19:37:34:  <power v='full'/>
19:37:34:
19:37:34:  <!-- User Information -->
19:37:34:  <team v='nnnnn'/>
19:37:34:  <user v='xxxxx'/>
19:37:34:
19:37:34:  <!-- Web Server -->
19:37:34:  <web-allow v='192.168.0.0/24'/>
19:37:34:
19:37:34:  <!-- Folding Slots -->
19:37:34:  <slot id='0' type='GPU'/>
19:37:34:  <slot id='1' type='CPU'>
19:37:34:    <cpus v='4'/>
19:37:34:  </slot>
19:37:34:</config>
OK
trl@svr2:/etc/fahclient$ 19:38:04:Child exited with return code 1
19:38:34:Child exited with return code 1
19:39:04:Child exited with return code 1
19:39:34:Child exited with return code 1
19:40:04:Child exited with return code 1
19:40:04:ERROR:Respawning too fast. Exiting.
and this in /var/lib/fahclient/log.txt

Code: Select all

perfect replica of the above, plus
19:39:34:Trying to access database...
19:40:04:ERROR:Exception: Error executing: 'PRAGMA synchronous=NORMAL': database is locked
The following packages are installed. I guess they're all necessary. I see a mention of OpenGL but not OpenCL.

If I need another package, which one? I do NOT want X Windows on the machine. Already did one reinstall to get rid of that noise.

Code: Select all

libnvidia-cfg1-460 460.80-0ubuntu0.20.04.2	        K-O	NVIDIA binary OpenGL/GLX configuration library
libnvidia-compute-460 460.80-0ubuntu0.20.04.2	K-O	NVIDIA libcompute package
nvidia-dkms-460 460.80-0ubuntu0.20.04.2                 K-O	NVIDIA DKMS package
nvidia-kernel-common-460 460.80-0ubuntu0.20.04.2	K-O	Shared files used with the kernel module
nvidia-kernel-source-460 460.80-0ubuntu0.20.04.2	K-O	NVIDIA kernel source package
nvidia-utils-460 460.80-0ubuntu0.20.04.2	                K-O	NVIDIA driver support binaries
Joe_H
Site Admin
Posts: 7939
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: Is OpenCL Necessary?

Post by Joe_H »

Yes, OpenCL is necessary. The way the driver code is distributed by nVidia OpenCL is included as part of the CUDA support.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
JimboPalmer
Posts: 2522
Joined: Mon Feb 16, 2009 4:12 am
Location: Greenwood MS USA

Re: Is OpenCL Necessary?

Post by JimboPalmer »

I think of CUDA code as an enhancement to OpenCL for Nvidia, it starts with OpenCL and upgrades to CUDA if certain prerequisites are found. Some Nvidia GPUs will work, but not use CUDA as they don't meet the prerequisites.
Tsar of all the Rushers
I tried to remain childlike, all I achieved was childish.
A friend to those who want no friends
bikeaddict
Posts: 210
Joined: Sun May 03, 2020 1:20 am

Re: Is OpenCL Necessary?

Post by bikeaddict »

Someone has created a guide to installing F@H on Ubuntu.

See viewtopic.php?f=108&t=36824

If you want CUDA support for the GTX 1060, you will probably also need an xorg cuda package installed if Ubuntu dependencies are similar to Fedora.
trleith
Posts: 14
Joined: Tue Mar 24, 2020 7:19 pm

Re: Is OpenCL Necessary?

Post by trleith »

bikeaddict wrote:Someone has created a guide to installing F@H on Ubuntu.
Thanks much. Added it to my notebook. The sudo apt install ocl-icd-opencl-dev step is what I was missing.

FAHClient is chugging away trying to get an assignment. I guess the server's down.

Thanks again.

t
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Is OpenCL Necessary?

Post by bruce »

When FAHClient starts, it goes through a detection process to determine what hardware you have before it sets up the "slots" that download WUs that will be associated with specific hardware it what is called "slots" (Should have used a different word, since PCs have slots that mean something else). The following sequence of messages only occur at the very beginning of FAHClient's processing.08:04:23:******************************* System ********************************
08:04:23: CPU: AMD A8-5500 APU with Radeon(tm) HD Graphics
08:04:23: CPU ID: AuthenticAMD Family 21 Model 16 Stepping 1
08:04:23: CPUs: 4
08:04:23: Memory: 5.95GiB
08:04:23: Free Memory: 4.24GiB
08:04:23: Threads: WINDOWS_THREADS
08:04:23: OS Version: 6.2
08:04:23: Has Battery: false
08:04:23: On Battery: false
08:04:23: UTC Offset: -7
08:04:23: PID: 8924
08:04:23: CWD: C:\Users\ovies\AppData\Roaming\FAHClient
08:04:23: Win32 Service: false
08:04:23: OS: Windows 10 Home
08:04:23: OS Arch: AMD64
08:04:23: GPUs: 1
08:04:23: GPU 0: Bus:1 Slot:0 Func:0 NVIDIA:7 GP107 [GeForce GTX 1050 Ti] 2138
08:04:23: CUDA Device 0: Platform:0 Device:0 Bus:1 Slot:0 Compute:6.1 Driver:11.2
08:04:23:OpenCL Device 0: Platform:0 Device:0 Bus:1 Slot:0 Compute:1.2 Driver:462.31
08:04:23:***********************************************************************

The last four messages in this stanza make critical use of OpenCL, and in my case, determine that there is, in fact, only one GPU which can be populated bu ONE FAH work unit, either as a CUDA device or an OpenCL device. If OpenCL is not present, those steps do not complete properly. Naturally OpenCL is also required for AMD GPUs and for Intel iGPUs since neither ont of them supports CUDA.
gunnarre
Posts: 559
Joined: Sun May 24, 2020 7:23 pm
Location: Norway

Re: Is OpenCL Necessary?

Post by gunnarre »

trleith wrote:
bikeaddict wrote:FAHClient is chugging away trying to get an assignment. I guess the server's down.
Post the relevant part of the log - it might be something wrong with your firewall (on your machine, the router or the ISP) or anti-virus which is blocking downloads of WUs or folding cores.
Image
Online: GTX 1660 Super + occasional CPU folding in the cold.
Offline: Radeon HD 7770, GTX 1050 Ti 4G OC, RX580
Post Reply