Page 1 of 1

Can all projects run on GPU?

Posted: Wed Aug 23, 2023 6:50 pm
by Peter_Hucker
This has probably been asked before, but ducking (the official replacement for googling) for it didn't produce any results.

Can all projects run on GPU and you're handing the tasks out to whatever's available? Or can some work only use CPUs?

I ask because I'm trying to decide if it's worth running my CPUs on here aswell. If the work is the same, it would provide very little help, so I'd prefer to use the CPUs on CPU-only projects like Rosetta and World Community Grid. If the work is different it will be useful to add my CPUs to the mix.

Re: Can all projects run on GPU?

Posted: Thu Aug 24, 2023 10:29 pm
by JimboPalmer
I am wildly out of date, but this is what I recall from a decade ago.

CPUs can model the solvent (usually water) as individual atoms, while GPUs use an continuous approximation which is less accurate.

In all honesty, that was once true, but I have not heard it mentioned in years.

Real!isticly, GPUs will be severely underutilized by smaller molecules

Re: Can all projects run on GPU?

Posted: Fri Aug 25, 2023 12:04 am
by Joe_H
Actually in 2013 is when the GPU Core_17 was released. That was the first GPU core that included explicit modeling of the solvent around the protein. Previous GPU cores were limited to implicit solvent values as part of the folding simulation. Core_17 also was the first GPU folding core to support both AMD and Nvidia GPUs doing the calculations with OpenCL.

Getting back to the initial question, in theory all projects could be done on GPUs. But the data organization within the WU is different for GPU folding using OpenMM as compared to CPU folding using GROMACS. So a separate project would need to be set up to be assigned to GPUs or CPUs depending on what the original project was configured for. There are some calculations available in OpenMM that are not available in GROMACS and vice versa. But that rarely comes into consideration. Also as mentioned, fast wide GPUs like a 4080 or 4090 can be underutilized when the WU is for a smaller protein system, so many of those smaller projects get assigned to CPUs.

Re: Can all projects run on GPU?

Posted: Fri Aug 25, 2023 12:37 am
by Peter_Hucker
Ok, I'll take that to mean it's useful to you to run my CPUs aswell, to do the small protein projects.

Not that I have such a thing yet, but I can foresee it (yes I asked this before but never got a definitive answer). I currently have a fast CPU and a slow GPU, and the CPU only just feeds it fast enough. With a fast GPU, I can't see it being fully used. Unless Folding is redesigned to use more than one core, or allow us to run two tasks at once on a GPU, how does it work? Does anyone have a phenominally fast GPU on here? Is it fully used? Is more of the work perhaps offloaded to GPU for more modern ones? I've found people talking about running more than one copy of the Folding client on the same machine, is this possible?

Re: Can all projects run on GPU?

Posted: Fri Aug 25, 2023 4:02 am
by JimboPalmer
At least on Nvidia, the GPU driver running on the CPU sadly uses a busy wait, an infinite loop waiting for dara. This !makes it hard to judge how much is useful.

While we have 75 years experience running multitasking on CPUs, there is little demand for multitasking on GPUs, gamers want every last cycle to speed their games. I do not see running multiple Work Units on the sàme GPU any time soon. If you have more than one video card, each will run a separate WU.

As GPUs get faster, the time needed to transfer data from the CPUs RAM to the GPUs VRAM over the PCIE bus gets to be a larger percentage of WU time.

Re: Can all projects run on GPU?

Posted: Fri Aug 25, 2023 9:41 pm
by Peter_Hucker
On the AMD GPU on this machine, it's currently using a quarter of a core. Just aswell, because it means I can have more GPUs than cores on a machine. I thought Nvidia tended to make better drivers not worse?

Well I and most Boinc users have always run multiple WUs per GPU, even from different projects, completely different programs. It really can be done and it requires nothing special. The GPU shares itself between the programs just like a CPU.