sorting out OpenCL platforms on linux

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

Moderators: Site Moderators, FAHC Science Team

Post Reply
astrorob
Posts: 43
Joined: Sun Mar 15, 2020 7:59 pm

sorting out OpenCL platforms on linux

Post by astrorob »

hi all -

i managed to add an RX5500 to my ubuntu 18.04 linux box (which had previously only had an nvidia GTX 1060) with the help of this thread: viewtopic.php?f=81&t=33353

in the course of things i have ended up with 3 OpenCL platforms. 0 seems to be Clover/Mesa due to having installed mesa-opencl-icd, 1 seems to be AMD Accelerated Parallel Processing and 2 seems to be NVIDA CUDA, if the order presented in clinfo is 0..2.

when FAHClient starts up on the RX5500, it seems to be selecting platform 0. this may be OK, but Clover is openCL 1.1 while the AMD platform is openCL 2.1. assuming there is some advantage to running under openCL 2.1, is there a way to tell FAHClient to use platform 1 for the RX5500 card? seems like my PPD is a little under what this spreadsheet says (https://docs.google.com/spreadsheets/d/ ... edit#gid=0) and i wonder if that's due to the Clover driver.

or would removing the mesa-opencl-icd just fix this?

also as i posted in the above thread, despite the OpenCL devices being found OK after adding user fahclient to group video and changing how the service is started, when the indices are set to -1 in the FAHClient config, neither client will start. i've had to set both slots to 0 and 0 for opencl-index and cuda-index respectively. is this to be expected?

thanks
Image
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: sorting out OpenCL platforms on linux

Post by bruce »

OpenMM requires OpenCL 1.2 or greater. Some WUs will run if your GPU will only support OCL 1.1 but you'll get a number of errors. I know of no advantage to having greater that 1.2.

CUDA is not supported yet, but I understand it's coming soon. I'm not sure what the minimum CUDA version will be (Probably whatever supports Kepler) but I do know that higher versions will feature optimizations for later hardware generations. rather than specify a CUDA version number, I just let the NVidia installer decide. If it detects, say Kepler, it will provide a CUDA driver that supports Kepler or better and FAH will use whatever features i finds. If it detects, say a Pascal with the Kepler, That driver will support the Pascal features on that device and will support only the Kepler features that are functional on your other GPU.
astrorob
Posts: 43
Joined: Sun Mar 15, 2020 7:59 pm

Re: sorting out OpenCL platforms on linux

Post by astrorob »

well... so maybe i should just remove the mesa-opencl-icd package then? i shut down the machine mid-WU due to peak electricity time so i don't yet know if the RX5500 can produce a proper result... later tonight i'll know.
Image
mr_raider
Posts: 28
Joined: Tue Jan 26, 2010 9:21 pm

Re: sorting out OpenCL platforms on linux

Post by mr_raider »

For my RX5700 I had to manually set OpenCL to opencl-slot 0 in the the gPu slot options.
Regardless of the OpenCL platforms installed, FAH will use the AMD proprietary OpenCL driver only.

I also had to set the client to run as root user.
astrorob
Posts: 43
Joined: Sun Mar 15, 2020 7:59 pm

Re: sorting out OpenCL platforms on linux

Post by astrorob »

thanks - yeah it all seems to be working even though i had to set the slots manually.

the trick of adding "fahuser" to the "video" group seems to have worked for me rather than having to start as root. but i did need the alternate daemon startup script that allows fahclient to properly run as fahuser.
Image
JiiPee
Posts: 59
Joined: Sun Mar 09, 2008 4:09 pm
Location: FINLAND

Re: sorting out OpenCL platforms on linux

Post by JiiPee »

bruce wrote:OpenMM requires OpenCL 1.2 or greater. Some WUs will run if your GPU will only support OCL 1.1 but you'll get a number of errors. I know of no advantage to having greater that 1.2.

CUDA is not supported yet, but I understand it's coming soon. I'm not sure what the minimum CUDA version will be (Probably whatever supports Kepler) but I do know that higher versions will feature optimizations for later hardware generations. rather than specify a CUDA version number, I just let the NVidia installer decide. If it detects, say Kepler, it will provide a CUDA driver that supports Kepler or better and FAH will use whatever features i finds. If it detects, say a Pascal with the Kepler, That driver will support the Pascal features on that device and will support only the Kepler features that are functional on your other GPU.
CUDA has nothing to do with AMD cards. It will never gonna work on AMD cards unless nvidia open source it.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: sorting out OpenCL platforms on linux

Post by bruce »

And nVidia will never open-source it.

This topic is not restricted to AMD cards. If, at some time in the future, CUDA is supported, *AND* if someone happens to be running nV hardware, maybe a GPU that only supports OpenCL 1.1 can switch to CUDA 2.0 and regain support.
Post Reply