Page 1 of 1

sorting out OpenCL platforms on linux

PostPosted: Tue Jun 16, 2020 8:59 pm
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

Re: sorting out OpenCL platforms on linux

PostPosted: Tue Jun 16, 2020 9:23 pm
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.

Re: sorting out OpenCL platforms on linux

PostPosted: Tue Jun 16, 2020 11:11 pm
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.

Re: sorting out OpenCL platforms on linux

PostPosted: Wed Jun 24, 2020 8:56 pm
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.

Re: sorting out OpenCL platforms on linux

PostPosted: Thu Jun 25, 2020 10:45 pm
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.

Re: sorting out OpenCL platforms on linux

PostPosted: Sun Jul 19, 2020 2:13 am
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.

Re: sorting out OpenCL platforms on linux

PostPosted: Sun Jul 19, 2020 9:21 am
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.