Page 1 of 1

Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.04

Posted: Sat Mar 14, 2020 1:38 am
by LavaDrop
Hi!
I've been scratching my head for several days trying to figure out the Linux client and it's configuration. :e?:
I've tried several suggestions:
  • Add FAHClient to video group
    Verify I've a correct installation of drivers (AMDGPUPRO) and OpenCL (clinfo)
    Correct expert flag setup script put incorrectly because the installer is expecting the client to be properly configured (gpu=false flag)
    Change opencl index from -1 to 0
However, the client still states it can't find my OpenCL device and produces Bad Work Units (it does detect the actual GPU, though).

This is the log:

Code: Select all

*********************** Log Started 2020-03-14T01:28:59Z ***********************
01:28:59:************************* Folding@home Client *************************
01:28:59:    Website: https://foldingathome.org/
01:28:59:  Copyright: (c) 2009-2018 foldingathome.org
01:28:59:     Author: Joseph Coffland <joseph@cauldrondevelopment.com>
01:28:59:       Args: --child --lifeline 6467 /etc/fahclient/config.xml --run-as
01:28:59:             fahclient --pid-file=/var/run/fahclient.pid --daemon
01:28:59:     Config: /etc/fahclient/config.xml
01:28:59:******************************** Build ********************************
01:28:59:    Version: 7.5.1
01:28:59:       Date: May 11 2018
01:28:59:       Time: 19:59:04
01:28:59: Repository: Git
01:28:59:   Revision: 4705bf53c635f88b8fe85af7675557e15d491ff0
01:28:59:     Branch: master
01:28:59:   Compiler: GNU 6.3.0 20170516
01:28:59:    Options: -std=gnu++98 -O3 -funroll-loops
01:28:59:   Platform: linux2 4.14.0-3-amd64
01:28:59:       Bits: 64
01:28:59:       Mode: Release
01:28:59:******************************* System ********************************
01:28:59:        CPU: AMD Ryzen 7 2700X Eight-Core Processor
01:28:59:     CPU ID: AuthenticAMD Family 23 Model 8 Stepping 2
01:28:59:       CPUs: 16
01:28:59:     Memory: 15.67GiB
01:28:59:Free Memory: 7.53GiB
01:28:59:    Threads: POSIX_THREADS
01:28:59: OS Version: 5.0
01:28:59:Has Battery: false
01:28:59: On Battery: false
01:28:59: UTC Offset: -6
01:28:59:        PID: 6495
01:28:59:        CWD: /var/lib/fahclient
01:28:59:         OS: Linux 5.0.0-23-generic x86_64
01:28:59:    OS Arch: AMD64
01:28:59:       GPUs: 1
01:28:59:      GPU 0: Bus:28 Slot:0 Func:0 AMD:5 Ellesmere XT [Radeon RX 470/480/570/580]
01:28:59:       CUDA: Not detected: cuInit() returned 100
01:28:59:     OpenCL: Not detected: clGetDeviceIDs() returned -1
01:28:59:***********************************************************************
01:28:59:<config>
01:28:59:  <!-- Network -->
01:28:59:  <proxy v=':8080'/>
01:28:59:
01:28:59:  <!-- User Information -->
01:28:59:  <passkey v='********************************'/>
01:28:59:  <team v='75655'/>
01:28:59:  <user v='LavaDrop'/>
01:28:59:
01:28:59:  <!-- Folding Slots -->
01:28:59:  <slot id='0' type='CPU'/>
01:28:59:  <slot id='1' type='GPU'>
01:28:59:    <opencl-index v='0'/>
01:28:59:  </slot>
01:28:59:</config>
01:28:59:Switching to user fahclient
01:28:59:Trying to access database...
01:29:16:Successfully acquired database lock
01:29:16:Enabled folding slot 00: READY cpu:14
01:29:16:Enabled folding slot 01: READY gpu:0:Ellesmere XT [Radeon RX 470/480/570/580]
01:29:16:ERROR:No compute devices matched GPU #0 AMD:5 Ellesmere XT [Radeon RX 470/480/570/580].  You may need to update your graphics drivers.
01:29:16:WU01:FS00:Starting
01:29:16:WU01:FS00:Running FahCore: /usr/bin/FAHCoreWrapper /var/lib/fahclient/cores/cores.foldingathome.org/v7/lin/64bit/avx/Core_a7.fah/FahCore_a7 -dir 01 -suffix 01 -version 705 -lifeline 6495 -checkpoint 15 -np 14
01:29:16:WU01:FS00:Started FahCore on PID 6557
01:29:16:WU01:FS00:Core PID:6561
01:29:16:WU01:FS00:FahCore 0xa7 started
01:29:17:WU00:FS01:Connecting to 65.254.110.245:8080
01:29:17:WU01:FS00:0xa7:*********************** Log Started 2020-03-14T01:29:16Z ***********************
01:29:17:WU01:FS00:0xa7:************************** Gromacs Folding@home Core ***************************
01:29:17:WU01:FS00:0xa7:       Type: 0xa7
01:29:17:WU01:FS00:0xa7:       Core: Gromacs
01:29:17:WU01:FS00:0xa7:       Args: -dir 01 -suffix 01 -version 705 -lifeline 6557 -checkpoint 15 -np
01:29:17:WU01:FS00:0xa7:             14
01:29:17:WU01:FS00:0xa7:************************************ CBang *************************************
01:29:17:WU01:FS00:0xa7:       Date: Nov 5 2019
01:29:17:WU01:FS00:0xa7:       Time: 06:06:57
01:29:17:WU01:FS00:0xa7:   Revision: 46c96f1aa8419571d83f3e63f9c99a0d602f6da9
01:29:17:WU01:FS00:0xa7:     Branch: master
01:29:17:WU01:FS00:0xa7:   Compiler: GNU 8.3.0
01:29:17:WU01:FS00:0xa7:    Options: -std=c++11 -O3 -funroll-loops -fno-pie -fPIC
01:29:17:WU01:FS00:0xa7:   Platform: linux2 4.19.0-5-amd64
01:29:17:WU01:FS00:0xa7:       Bits: 64
01:29:17:WU01:FS00:0xa7:       Mode: Release
01:29:17:WU01:FS00:0xa7:************************************ System ************************************
01:29:17:WU01:FS00:0xa7:        CPU: AMD Ryzen 7 2700X Eight-Core Processor
01:29:17:WU01:FS00:0xa7:     CPU ID: AuthenticAMD Family 23 Model 8 Stepping 2
01:29:17:WU01:FS00:0xa7:       CPUs: 16
01:29:17:WU01:FS00:0xa7:     Memory: 15.67GiB
01:29:17:WU01:FS00:0xa7:Free Memory: 8.00GiB
01:29:17:WU01:FS00:0xa7:    Threads: POSIX_THREADS
01:29:17:WU01:FS00:0xa7: OS Version: 5.0
01:29:17:WU01:FS00:0xa7:Has Battery: false
01:29:17:WU01:FS00:0xa7: On Battery: false
01:29:17:WU01:FS00:0xa7: UTC Offset: -6
01:29:17:WU01:FS00:0xa7:        PID: 6561
01:29:17:WU01:FS00:0xa7:        CWD: /var/lib/fahclient/work
01:29:17:WU01:FS00:0xa7:******************************** Build - libFAH ********************************
01:29:17:WU01:FS00:0xa7:    Version: 0.0.18
01:29:17:WU01:FS00:0xa7:     Author: Joseph Coffland <joseph@cauldrondevelopment.com>
01:29:17:WU01:FS00:0xa7:  Copyright: 2019 foldingathome.org
01:29:17:WU01:FS00:0xa7:   Homepage: https://foldingathome.org/
01:29:17:WU01:FS00:0xa7:       Date: Nov 5 2019
01:29:17:WU01:FS00:0xa7:       Time: 06:13:26
01:29:17:WU01:FS00:0xa7:   Revision: 490c9aa2957b725af319379424d5c5cb36efb656
01:29:17:WU01:FS00:0xa7:     Branch: master
01:29:17:WU01:FS00:0xa7:   Compiler: GNU 8.3.0
01:29:17:WU01:FS00:0xa7:    Options: -std=c++11 -O3 -funroll-loops -fno-pie
01:29:17:WU01:FS00:0xa7:   Platform: linux2 4.19.0-5-amd64
01:29:17:WU01:FS00:0xa7:       Bits: 64
01:29:17:WU01:FS00:0xa7:       Mode: Release
01:29:17:WU01:FS00:0xa7:************************************ Build *************************************
01:29:17:WU01:FS00:0xa7:       SIMD: avx_256
01:29:17:WU01:FS00:0xa7:********************************************************************************
01:29:17:WU01:FS00:0xa7:Project: 13831 (Run 874, Clone 2, Gen 103)
01:29:17:WU01:FS00:0xa7:Unit: 0x0000007680fccb095d693a481c2d4be8
01:29:17:WU01:FS00:0xa7:Digital signatures verified
01:29:17:WU01:FS00:0xa7:Reducing thread count from 14 to 13 to avoid domain decomposition with large prime factor 7
01:29:17:WU01:FS00:0xa7:Reducing thread count from 13 to 12 to avoid domain decomposition by a prime number > 3
01:29:17:WU01:FS00:0xa7:Calling: mdrun -s frame103.tpr -o frame103.trr -x frame103.xtc -cpi state.cpt -cpt 15 -nt 12
01:29:17:WU01:FS00:0xa7:Steps: first=12875000 total=12875000
01:29:17:WU00:FS01:Assigned to work server 140.163.4.231
01:29:17:WU00:FS01:Requesting new work unit for slot 01: READY gpu:0:Ellesmere XT [Radeon RX 470/480/570/580] from 140.163.4.231
01:29:17:WU00:FS01:Connecting to 140.163.4.231:8080
01:29:19:WU01:FS00:0xa7:Completed 53022 out of 12875000 steps (0%)
I can run GPU work units on BOINC.

Re: Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.

Posted: Sat Mar 14, 2020 10:46 am
by foldy
Try that first:
sudo apt-get install ocl-icd-libopencl1
sudo apt-get install ocl-icd-opencl-dev

Re: Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.

Posted: Tue Mar 17, 2020 4:15 pm
by LavaDrop
foldy wrote:Try that first:
sudo apt-get install ocl-icd-libopencl1
sudo apt-get install ocl-icd-opencl-dev
Thank you, however it made no change at all. GPU still stuck on Ready.

Code: Select all

16:13:05:ERROR:No compute devices matched GPU #0 AMD:5 Ellesmere XT [Radeon RX 470/480/570/580].  You may need to update your graphics drivers.

Re: Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.

Posted: Tue Mar 17, 2020 4:37 pm
by Burstaholic
You need the AMD proprietary OpenCL driver: https://www.amd.com/en/support/kb/relea ... fied-linux

Re: Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.

Posted: Tue Mar 17, 2020 7:27 pm
by LavaDrop
Burstaholic wrote:You need the AMD proprietary OpenCL driver: https://www.amd.com/en/support/kb/relea ... fied-linux
I have the proprietary driver installed and properly configured.
BOINC detects and works with my GPU.

Re: Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.

Posted: Tue Mar 17, 2020 7:56 pm
by John_D
Since the client looks set up ok, try this:
set the client to medium in FAHControl.
Are you running two clients, one for your CPU and one for your graphics card.

Re: Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.

Posted: Wed Mar 18, 2020 1:58 am
by LavaDrop
FAHControl is set to medium.

BOINC is only running CPU tasks because Rosetta doesn't use GPUs. I was running SETI and then they announced they were putting the program on hibernation, so I paused SETI. I set it up to use 8 threads at 50% CPU time.

Re: Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.

Posted: Wed Mar 18, 2020 2:56 am
by Paragon
I've run into this with my RX 480s and RX580s. You've probably done everything right. There's a weird permissions issue, where the FAH Client just can't access the open CL libraries.

See this thread...it's a long read.

viewtopic.php?f=81&t=31293&start=15

In summary, the key bit is a workaround based on this other thread

viewtopic.php?f=74&t=31096

Basically you need to tweak the startup script for the client (/etc/init.d/FAHClient), changing the username from "fahclient" to "root". The client can then see Open CL devices and fold correctly. This seems like a problem unique to AMD GPUs on Linux, since Nvidia GPUs work fine (once open CL is installed).

Re: Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.

Posted: Wed Mar 18, 2020 3:13 am
by Joe_H
For some Linux distros you may need to add the fahclient username to be part of the video group. I recall coming across that posted at one time. I personally have not needed to do that, the newest Linux setup I have currently is running on Ubuntu 16.04.