Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.04

Moderators: Site Moderators, FAHC Science Team

Post Reply
LavaDrop
Posts: 4
Joined: Sat Mar 14, 2020 12:59 am

Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.04

Post 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.
foldy
Posts: 2061
Joined: Sat Dec 01, 2012 3:43 pm
Hardware configuration: Folding@Home Client 7.6.13 (1 GPU slots)
Windows 7 64bit
Intel Core i5 2500k@4Ghz
Nvidia gtx 1080ti driver 441

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

Post by foldy »

Try that first:
sudo apt-get install ocl-icd-libopencl1
sudo apt-get install ocl-icd-opencl-dev
LavaDrop
Posts: 4
Joined: Sat Mar 14, 2020 12:59 am

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

Post 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.
Burstaholic
Posts: 6
Joined: Tue Mar 10, 2020 2:28 pm

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

Post by Burstaholic »

You need the AMD proprietary OpenCL driver: https://www.amd.com/en/support/kb/relea ... fied-linux
LavaDrop
Posts: 4
Joined: Sat Mar 14, 2020 12:59 am

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

Post 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.
John_D
Posts: 33
Joined: Fri Mar 13, 2020 11:32 pm

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

Post 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.
LavaDrop
Posts: 4
Joined: Sat Mar 14, 2020 12:59 am

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

Post 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.
Paragon
Posts: 139
Joined: Fri Oct 21, 2011 3:24 am
Hardware configuration: Rig1 (Dedicated SMP): AMD Phenom II X6 1100T, Gigabyte GA-880GMA-USB3 board, 8 GB Kingston 1333 DDR3 Ram, Seasonic S12 II 380 Watt PSU, Noctua CPU Cooler

Rig2 (Part-Time GPU): Intel Q6600, Gigabyte 965P-S3 Board, EVGA 460 GTX Graphics, 8 GB Kingston 800 DDR2 Ram, Seasonic Gold X-650 PSU, Artic Cooling Freezer 7 CPU Cooler
Location: United States

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

Post 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).
Joe_H
Site Admin
Posts: 7870
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: Configuring FAHClient to use my AMD RX 580 on Ubuntu 18.

Post 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.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
Post Reply