Trying to get GPU Folding (OpenCL) running on Fedora

unfortunately that’s exactly the part I’m struggling with :stuck_out_tongue:
I’m just wondering if it’s something I can do about or if FAH just needs an update. If it’s the latter then I’ll just forget about it for now since they haven’t even managed to Update to Python3 even though 2 is EOL :frowning:

Hello @mihawk90

I was hitting the same issues on Fedora, although this is using a 1070GTX with rpmfussion drivers.
Like you (the same error) the OpenCl.so isn’t actually missing, it was simply a permission issue.
FIX: Needed to change the ‘USER’ set in /etc/init.d/FAHClient to ‘root’ instead of ‘fahclient’.

Also, the /usr/bin/FAHControl script requires deprecated python2.7 so you may need to install that and then run the script: python2.7 /usr/bin/FAHControl

Double checked SeLinux, perms, and a few other things till I just applied the easy dirty fix.
May get back to the issue later on for deepdive.

https://fedora.pkgs.org/31/fedora-aarch64/ocl-icd-2.2.12-6.fc31.aarch64.rpm.html

did you get this working? also, Where did you get the Nvidia driver from? I get mine from Negativo17 repo

No, unfortunately.
As mentioned installing both of them yields the same result.

I’m using AMD, so nvidia drivers aren’t that terribly useful for me :wink:

Thanks for the suggestion. I’ll try that although I’d much rather like to fix the actual permission issue then randomly running under root.
edit: tried, did not work. And I checked if it actually started as root:

PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                          
1523 root      20   0 4736740  98632  77388 S   0.0   0.6   0:00.43 FAHClient                                        
1521 root      20   0 4220072  25164   4024 S   0.0   0.2   0:00.04 FAHClient     

That is not the issue, and in fact that is what I suggested on our Folding@Home Team thread

Alright, so after reinstalling fresh F30 and rpmfussion nvidia drivers (also getting passed perm issue) I’m now failing detection like you. This error “OpenCL Not detected: clGetDeviceIDs() returned -1”

Thinking since I upgrade from F22 to 30 (over the years) I must of had some old lib or something that gave it compliance.

clinfo works fine as intended:

  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [NV]

Thinking their client is failing to associate the correct extension for OpenCL, in my case needing to use cl_nv_device_attribute_query and the correct token. I’ll do some more digging, but this might be an issue on them as they’re using ancient libs.

Same for me:

  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [MESA]

Yeah that’s what I suspect as well. It might be that the bindings for Python2 are just not working anymore and it would be fixed by just using Python3. I’m not about to port their client tho.

It’s definitely an AMDGPU vs. AMDGPU-PRO thing on the AMD side.

OpenCL does not work unless you have rocm working and currently rocm is only part of the pro driver.

Until that changes, your choices are (as i understnad it)

  • figure out how to compile/install amd-gpu pro on your distro of choice
  • figure out how to compile rocm yourself on your distro of choice
  • run an amdgpu-pro supported platform (e.g., ubuntu lts, centos), and install amdgpu-pro

I’m definitely migrating to 20.04 LTS when it drops, specifically for this. Currently no GPU folding, no blender GPU rendering, etc.

1 Like

That’s kind of a bummer… wonder why they did that. I mean those cards are so fast in Compute Tasks and then you can’t use it.

Getting the Driver to install shouldn’t be that much of a problem since it is available for CentOS, but I don’t really want to tank my game-performance…

You and me both. Which is why i’m eagerly awaiting Ubuntu 20.04 LTS.

Zfs, amdgpu-pro, etc.

AMDGPU-PRO shouldn’t tank performance itself, as it just builds on teh open source driver to my knowledge, however running CentOS would :smiley:

Maybe roll centos with a custom kernel? Probably break the centos AMDGPU package then though…

From what I understand the AMDGPU-Pro doesn’t work well with games because even though it builds on top of AMDGPU, it optimizes stuff differently or something…

Well… yes, but I meant running the CentOS package on Fedora. The kernel for Fedora and CentOS should be similar enough (except for the version of course) to run it, but I’m not really comfortable enough to f**k with that really :confused:

Hmm you’d be surprised.

CentOS 7 was still shipping kernel 3.1 or something last i ran it.
CentOS 8 ships with 4.18

They get security updates.

stability etc…

Reality is, centos 7 sucked with AMDGPU when i was running it. crashes, etc. that never happen in Fedora 28+ (RX550 in both) - work machine with crap power supply. I suspect because the kernel is that ancient in CentOS 7.

Yeah the Kernel Version is what I’m most worried about. I guess installing the package itself wouldn’t be a big deal, getting it to run is a whole different thing I imagine :confused:

I suggest just waiting for Ubuntu 20.04. Unless you’re super bound to Fedora.

IMHO … meh. They’re both good enough, and Ubuntu LTS is better supported by this sort of third party stuff. I originally went to fedora for better Vega 64 support than Ubuntu 18.04. But now that’s not a thing in 20.04 presumably.

edit:
or Pop! perhaps. I really should check Pop! out seriously.

I tried Ubuntu various times and it always gave me one issue or another, not gonna f**k with that again anytime soon unless I absolutely have to. And if it’s “just” folding that’s missing I can live with that, if it’s not possible to do at all.

Wierd. I’ve had less issues with Ubuntu over the years than Fedora.

shrug

I had this same issue with the gfx1010 bitcode missing. I downloaded the llvm-project source code from github and was able to compile it to get the missing bitcode files. I had to alter the libclc/CMakeLists.txt file to build the required targets. The code is there to support the gfx1010 and has been updated as recently as March 29th. I still have an issue with the FAHClient though. The error message is different though. Now it says:
ERROR:exception: Error initializing context: clGetDeviceIDs (-1)

I am going to see if there is any change when I set the opencl index and gpu index.

1 Like

Did you manage to get some OpenCL example code running? That’s sounds promising, I might jump back into that in that case.

I got some OpenCL python example code to run but it wasn’t very stable and FAH_Core will not run. I think it might be something to do with either the bitcode from libclc or the missing kernel/initrd firmware. The one for mesa isn’t available in the linux-firmware git repository yet so apparently AMD hasn’t released it for some reason.

I documented how I got FAH working on Fedora 31 in the Ask Fedora forums. I’m using the CentOS packages.

https://ask.fedoraproject.org/t/setting-up-folding-home-to-use-opencl-with-the-amdgpu-drivers/6132

1 Like

Thanks! I think it is the trick of removing everything except the one provider that I needed.