Page 1 of 1

AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Buster

Posted: Wed Mar 18, 2020 12:27 pm
by rantoie
Hi,

I've installed every package I could find to get my GPU to work, I can get FAH to detect my GPU and it even downloads work for it but it says "BAD_WORK_UNIT" and "FAULTY project". It also says, "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." I'm sure this has to do with "ERROR:exception: Error initializing context: clGetDeviceIDs (-1)" but even after trying to set the gpu-index and opencl-index in my config, this is as far as I can get.

This is the config I was using:

Code: Select all

  <!-- Folding Slots -->
  <slot id='0' type='CPU'/>
  <slot id='1' type='GPU'>
    <gpu-index v='0'/>
    <opencl-index v='0'/>
  </slot>
I've tried it with '1' set for both the indexes, but same problem.

This is the log:

Code: Select all

12:14:27:******************************* System ********************************
12:14:27:        CPU: Intel(R) Xeon(R) CPU E3-1241 v3 @ 3.50GHz
12:14:27:     CPU ID: GenuineIntel Family 6 Model 60 Stepping 3
12:14:27:       CPUs: 8
12:14:27:     Memory: 31.38GiB
12:14:27:Free Memory: 29.83GiB
12:14:27:    Threads: POSIX_THREADS
12:14:27: OS Version: 4.19
12:14:27:Has Battery: false
12:14:27: On Battery: false
12:14:27: UTC Offset: -4
12:14:27:        PID: 3648
12:14:27:        CWD: /var/lib/fahclient
12:14:27:         OS: Linux 4.19.0-8-amd64 x86_64
12:14:27:    OS Arch: AMD64
12:14:27:       GPUs: 1
12:14:27:      GPU 0: Bus:1 Slot:0 Func:0 AMD:5 Ellesmere XT [Radeon RX 470/480/570/580]
12:14:27:       CUDA: Not detected: Failed to open dynamic library 'libcuda.so':
12:14:27:             libcuda.so: cannot open shared object file: No such file or
12:14:27:             directory
12:14:27:     OpenCL: Not detected: clGetDeviceIDs() returned -1
12:14:27:***********************************************************************
...
12:14:27:Enabled folding slot 00: READY cpu:7
12:14:27:Enabled folding slot 01: READY gpu:0:Ellesmere XT [Radeon RX 470/480/570/580]
12:14:27: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.ESC
12:14:31:WU01:FS01:Assigned to work server 140.163.4.241
12:14:31:WU01:FS01:Requesting new work unit for slot 01: READY gpu:0:Ellesmere XT [Radeon RX 470/480/570/580] from 140.163.4.241
12:15:31:WU01:FS01:Connecting to 140.163.4.241:8080
12:16:14:WU01:FS01:Downloading 11.98MiB
12:16:21:WU01:FS01:Download 13.05%
12:16:27:WU01:FS01:Download 25.05%
12:16:33:WU01:FS01:Download 54.80%
12:16:39:WU01:FS01:Download 69.93%
12:16:46:WU01:FS01:Download 93.42%
12:16:47:WU01:FS01:Download complete
12:16:47:WU01:FS01:Received Unit: id:01 state:DOWNLOAD error:NO_ERROR project:11741 run:0 clone:4677 gen:5 core:0x22 unit:0x0000000e8ca304f15e6985d4f81e0341
12:16:54:WU01:FS01:0x22:ERROR:exception: Error initializing context: clGetDeviceIDs (-1)
12:16:54:WU01:FS01:0x22:Saving result file ../logfile_01.txt
12:16:54:WU01:FS01:0x22:Saving result file science.log
12:16:54:WU01:FS01:0x22:Folding@home Core Shutdown: BAD_WORK_UNIT
12:16:54:WARNING:WU01:FS01:FahCore returned: BAD_WORK_UNIT (114 = 0x72)
12:16:54:WU01:FS01:Sending unit results: id:01 state:SEND error:FAULTY project:11741 run:0 clone:4677 gen:5 core:0x22 unit:0x0000000e8ca304f15e6985d4f81e0341
So close, yet so far...

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Wed Mar 18, 2020 4:50 pm
by Joe_H
It looks like there is a problem with your install of OpenCL support. There have been some posts about needing to install both the runtime and dev kit for OpenCL on Linux systems. I am mentioning it to bump your post where someone familiar with the issue will see it, or so I can come back if I find the other posts and add that information.

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Thu Mar 19, 2020 11:03 am
by rantoie
Thanks for the reply. I do have both the OpenCL runtime and dev packages instaled, this is what I have:

Code: Select all

ii  libopencl1-amdgpu-pro:amd64                         19.50-967956                        amd64        AMD OpenCL ICD Loader library
ii  mesa-opencl-icd:amd64                               18.3.6-2+deb10u1                    amd64        free implementation of the OpenCL API -- ICD runtime
ii  ocl-icd-libopencl1:amd64                            2.2.12-2                            amd64        Generic OpenCL ICD Loader
ii  ocl-icd-opencl-dev:amd64                            2.2.12-2                            amd64        OpenCL development files
ii  opencl-amdgpu-pro-comgr                             19.50-967956                        amd64        non-free AMD OpenCL ICD Loaders
ii  opencl-amdgpu-pro-icd                               19.50-967956                        amd64        non-free AMD OpenCL ICD Loaders
ii  opencl-c-headers                                    2.2~2019.01.17-g49f07d3-1           all          OpenCL (Open Computing Language) C header files
ii  opencl-orca-amdgpu-pro-icd:amd64                    19.50-967956                        amd64        non-free AMD OpenCL ICD Loaders

Here is the startup log:

Code: Select all

*********************** Log Started 2020-03-19T11:10:39Z ***********************
11:10:39:************************* Folding@home Client *************************
11:10:39:    Website: https://foldingathome.org/
11:10:39:  Copyright: (c) 2009-2018 foldingathome.org
11:10:39:     Author: Joseph Coffland <joseph@cauldrondevelopment.com>
11:10:39:       Args: --child --lifeline 4872 /etc/fahclient/config.xml --run-as
11:10:39:             fahclient --pid-file=/var/run/fahclient.pid --daemon
11:10:39:     Config: /etc/fahclient/config.xml
11:10:39:******************************** Build ********************************
11:10:39:    Version: 7.5.1
11:10:39:       Date: May 11 2018
11:10:39:       Time: 19:59:04
11:10:39: Repository: Git
11:10:39:   Revision: 4705bf53c635f88b8fe85af7675557e15d491ff0
11:10:39:     Branch: master
11:10:39:   Compiler: GNU 6.3.0 20170516
11:10:39:    Options: -std=gnu++98 -O3 -funroll-loops
11:10:39:   Platform: linux2 4.14.0-3-amd64
11:10:39:       Bits: 64
11:10:39:       Mode: Release
11:10:39:******************************* System ********************************
11:10:39:        CPU: Intel(R) Xeon(R) CPU E3-1241 v3 @ 3.50GHz
11:10:39:     CPU ID: GenuineIntel Family 6 Model 60 Stepping 3
11:10:39:       CPUs: 8
11:10:39:     Memory: 31.38GiB
11:10:39:Free Memory: 14.98GiB
11:10:39:    Threads: POSIX_THREADS
11:10:39: OS Version: 4.19
11:10:39:Has Battery: false
11:10:39: On Battery: false
11:10:39: UTC Offset: -4
11:10:39:        PID: 4874
11:10:39:        CWD: /var/lib/fahclient
11:10:39:         OS: Linux 4.19.0-8-amd64 x86_64
11:10:39:    OS Arch: AMD64
11:10:39:       GPUs: 1
11:10:39:      GPU 0: Bus:1 Slot:0 Func:0 AMD:5 Ellesmere XT [Radeon RX 470/480/570/580]
11:10:39:       CUDA: Not detected: Failed to open dynamic library 'libcuda.so':
11:10:39:             libcuda.so: cannot open shared object file: No such file or
11:10:39:             directory
11:10:39:     OpenCL: Not detected: clGetDeviceIDs() returned -1
11:10:39:***********************************************************************
11:10:39:<config>
11:10:39:  <!-- Client Control -->
11:10:39:  <fold-anon v='true'/>
11:10:39:
11:10:39:  <!-- Slot Control -->
11:10:39:  <power v='FULL'/>
11:10:39:
11:10:39:  <!-- User Information -->
11:10:39:  <team v='241799'/>
11:10:39:  <user v='micah'/>
11:10:39:
11:10:39:  <!-- Folding Slots -->
11:10:39:  <slot id='0' type='CPU'/>
11:10:39:  <slot id='1' type='GPU'>
11:10:39:    <gpu-index v='0'/>
11:10:39:    <opencl-index v='0'/>
11:10:39:  </slot>
11:10:39:</config>
11:10:39:Switching to user fahclient
11:10:39:Trying to access database...
11:10:39:Successfully acquired database lock
11:10:39:Enabled folding slot 00: READY cpu:7
11:10:39:Enabled folding slot 01: READY gpu:0:Ellesmere XT [Radeon RX 470/480/570/580]
11:10:39: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.
11:10:39:WU02:FS00:Starting
11:10:39:WU02:FS00:Running FahCore: /usr/bin/FAHCoreWrapper /var/lib/fahclient/cores/cores.foldingathome.org/v7/lin/64bit/avx/Core_a7.fah/FahCore_a7 -dir 02 -suffix 01 -version 705 -lifeline 4874 -checkpoint 15 -np 7
11:10:39:WU02:FS00:Started FahCore on PID 4891
11:10:39:WU02:FS00:Core PID:4895
11:10:39:WU02:FS00:FahCore 0xa7 started
11:10:39:WU00:FS01:Connecting to 65.254.110.245:8080
11:10:39:WU02:FS00:0xa7:*********************** Log Started 2020-03-19T11:10:39Z ***********************
11:10:39:WU02:FS00:0xa7:************************** Gromacs Folding@home Core ***************************
11:10:39:WU02:FS00:0xa7:       Type: 0xa7
11:10:39:WU02:FS00:0xa7:       Core: Gromacs
11:10:39:WU02:FS00:0xa7:       Args: -dir 02 -suffix 01 -version 705 -lifeline 4891 -checkpoint 15 -np 7
11:10:39:WU02:FS00:0xa7:************************************ CBang *************************************
11:10:39:WU02:FS00:0xa7:       Date: Nov 5 2019
11:10:39:WU02:FS00:0xa7:       Time: 06:06:57
11:10:39:WU02:FS00:0xa7:   Revision: 46c96f1aa8419571d83f3e63f9c99a0d602f6da9
11:10:39:WU02:FS00:0xa7:     Branch: master
11:10:39:WU02:FS00:0xa7:   Compiler: GNU 8.3.0
11:10:39:WU02:FS00:0xa7:    Options: -std=c++11 -O3 -funroll-loops -fno-pie -fPIC
11:10:39:WU02:FS00:0xa7:   Platform: linux2 4.19.0-5-amd64
11:10:39:WU02:FS00:0xa7:       Bits: 64
11:10:39:WU02:FS00:0xa7:       Mode: Release
11:10:39:WU02:FS00:0xa7:************************************ System ************************************
11:10:39:WU02:FS00:0xa7:        CPU: Intel(R) Xeon(R) CPU E3-1241 v3 @ 3.50GHz
11:10:39:WU02:FS00:0xa7:     CPU ID: GenuineIntel Family 6 Model 60 Stepping 3
11:10:39:WU02:FS00:0xa7:       CPUs: 8
11:10:39:WU02:FS00:0xa7:     Memory: 31.38GiB
11:10:39:WU02:FS00:0xa7:Free Memory: 14.95GiB
11:10:39:WU02:FS00:0xa7:    Threads: POSIX_THREADS
11:10:39:WU02:FS00:0xa7: OS Version: 4.19
11:10:39:WU02:FS00:0xa7:Has Battery: false
11:10:39:WU02:FS00:0xa7: On Battery: false
11:10:39:WU02:FS00:0xa7: UTC Offset: -4
11:10:39:WU02:FS00:0xa7:        PID: 4895
11:10:39:WU02:FS00:0xa7:        CWD: /var/lib/fahclient/work
11:10:39:WU02:FS00:0xa7:******************************** Build - libFAH ********************************
11:10:39:WU02:FS00:0xa7:    Version: 0.0.18
11:10:39:WU02:FS00:0xa7:     Author: Joseph Coffland <joseph@cauldrondevelopment.com>
11:10:39:WU02:FS00:0xa7:  Copyright: 2019 foldingathome.org
11:10:39:WU02:FS00:0xa7:   Homepage: https://foldingathome.org/
11:10:39:WU02:FS00:0xa7:       Date: Nov 5 2019
11:10:39:WU02:FS00:0xa7:       Time: 06:13:26
11:10:39:WU02:FS00:0xa7:   Revision: 490c9aa2957b725af319379424d5c5cb36efb656
11:10:39:WU02:FS00:0xa7:     Branch: master
11:10:39:WU02:FS00:0xa7:   Compiler: GNU 8.3.0
11:10:39:WU02:FS00:0xa7:    Options: -std=c++11 -O3 -funroll-loops -fno-pie
11:10:39:WU02:FS00:0xa7:   Platform: linux2 4.19.0-5-amd64
11:10:39:WU02:FS00:0xa7:       Bits: 64
11:10:39:WU02:FS00:0xa7:       Mode: Release
11:10:39:WU02:FS00:0xa7:************************************ Build *************************************
11:10:39:WU02:FS00:0xa7:       SIMD: avx_256
11:10:39:WU02:FS00:0xa7:********************************************************************************
11:10:39:WU02:FS00:0xa7:Project: 14328 (Run 9, Clone 2490, Gen 11)
11:10:39:WU02:FS00:0xa7:Unit: 0x0000000d9bf7a4d65e6d0b57c2a5e665
11:10:39:WU02:FS00:0xa7:Digital signatures verified
11:10:39:WU02:FS00:0xa7:Reducing thread count from 7 to 6 to avoid domain decomposition by a prime number > 3
11:10:39:WU02:FS00:0xa7:Calling: mdrun -s frame11.tpr -o frame11.trr -cpi state.cpt -cpt 15 -nt 6
11:10:39:WU02:FS00:0xa7:Steps: first=2750000 total=250000
11:10:40:WU02:FS00:0xa7:Completed 96092 out of 250000 steps (38%)

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Thu Mar 19, 2020 4:23 pm
by DarkFoss
Hi, Did you set yourself to the video group? Also I've just found a link that states * Caveats:In Ubuntu 20.04 /dev/kfd is owned by root.render, not by root.video. Add user intended to use OpenCL to render group.
Did the latest Buster make that change too ?

Code: Select all

$ ls -la /dev | grep kfd
should tell you I think. Caveat taken from https://math.dartmouth.edu/~sarunas/amdgpu.html Nice looking quick guide for Navi 10+ Ubuntu's btw. :)

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Thu Mar 19, 2020 10:54 pm
by rantoie
DarkFoss wrote:Hi, Did you set yourself to the video group? Also I've just found a link that states * Caveats:In Ubuntu 20.04 /dev/kfd is owned by root.render, not by root.video. Add user intended to use OpenCL to render group.
Did the latest Buster make that change too ?

Code: Select all

$ ls -la /dev | grep kfd
should tell you I think. Caveat taken from https://math.dartmouth.edu/~sarunas/amdgpu.html Nice looking quick guide for Navi 10+ Ubuntu's btw. :)
Nice find! That was the page that I used to install everything, but I didn't notice the /dev/kfd note... It looks like in Buster, it is also the 'render' group, but unfortunately, I tried adding fahclient to the render group (adduser fahclient render), and then restarted it, but it still doesn't seem to work, same issue. I tried also to make the /dev/kfd device mode from 0760 to 0770, so it was also group executable, but that didn't change anything.

I'll note that clinfo does seem to work fine :o

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Fri Mar 20, 2020 1:53 pm
by DarkFoss
Thanks. :) I have a feeling that little change will trip a few people up over the coming months.
Aren't you supposed to add your username to the render group not fahclient btw ?

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Fri Mar 20, 2020 5:11 pm
by Joe_H
I don't have my linux system running to check, but on the Mac OS X install it uses user fahclient to run the background FAHClient process and the processes it starts that run the actual folding cores which process the WU's. The linux and OS X installs are very similar, Darwin which underlies the rest of OS X descended from FreeBSD Unix by way of NeXTSTEP. So you may run FAHControl or Web Control to monitor folding under your username, but the rest is running on another username set up with as few privileges as possible, as I recall less than a normal user.

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Fri Mar 20, 2020 5:45 pm
by bruce
Joe_H is right. The normal Linux installation creates a new user called "fahclient" which runs the FAHClient daemon in the background and owns FAH's work files. "He" should have permission to use OpenCL.

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Fri Mar 20, 2020 5:52 pm
by DarkFoss
Joe_H wrote:I don't have my linux system running to check, but on the Mac OS X install it uses user fahclient to run the background FAHClient process and the processes it starts that run the actual folding cores which process the WU's. The linux and OS X installs are very similar, Darwin which underlies the rest of OS X descended from FreeBSD Unix by way of NeXTSTEP. So you may run FAHControl or Web Control to monitor folding under your username, but the rest os running on another username set up with as few privileges as possible, as I recall less than a normal user.
Ahh Thank you. I'd completely forgotten about Web Control, it may come in handy!

I haven't made the move to a newer Linux yet still trying to document potential trip ups just seen 3 so far. Other than kfd there is also the removal pf python2 https://github.com/FoldingAtHome/fah-control/issues/46 User didn't specify what version(s) the --ignore-depends= works on . The removal of an older Openssl FAH depends on from the upcoming distro's being the biggest hurdle so far. The last resulting in requests for Snap/Flatpack/Docker clients on github https://github.com/FoldingAtHome/fah-issues/issues

My current Linux is just a bit too Frankenstein to bother with. :lol:

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Fri Mar 20, 2020 6:54 pm
by Joe_H
Mine is an Ubuntu 16.04 install on a separate drive in my hackintosh. Mostly leave it booted into OS X, sometimes switch to Ubuntu for folding or other work.

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Fri Mar 20, 2020 9:55 pm
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: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Fri Mar 20, 2020 10:07 pm
by Joe_H
Others have posted that some of the newer Linux versions out need the fahclient user added to the video group, and on even newer ones added to the render group. If you can take a look for those posts and see if they apply to your setup.

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Sat Mar 21, 2020 12:28 pm
by rantoie
I tried to add the fahclient to the video and render group (see above posts).

However, what *did* actually end up working was to make fahclient run as root! I had to change the initscript to run as root, and then adjust it because it expects configs and logs etc. to be triggered off of the user's directory... but now my graphics card is finally working! Time to turn off the heater, and let this thing warm my office!

Thanks everyone who replied...this took me days of trying things every day, so I'm happy to finally have it working.

Re: AMD:5 Ellesmere XT [Radeon RX 470/480/570/580] Debian Bu

Posted: Sat Mar 21, 2020 4:01 pm
by Paragon
rantoie wrote:I tried to add the fahclient to the video and render group (see above posts).

However, what *did* actually end up working was to make fahclient run as root! I had to change the initscript to run as root, and then adjust it because it expects configs and logs etc. to be triggered off of the user's directory... but now my graphics card is finally working! Time to turn off the heater, and let this thing warm my office!

Thanks everyone who replied...this took me days of trying things every day, so I'm happy to finally have it working.
Glad that fixed it. I keep hoping someone comes up with a better fix, but this seems to be the only way at the moment for AMD cards on Linux (at least Ubuntu). Now, if only I could figure out how to switch the card into "compute" mode. AMD Drivers in windows have an option to change the GPU workload from Graphics to Compute within the GUI, and this can give you an extra boost. I've been poking at this in Linux for a while but haven't found a way to pull it off.