projectchrono / chrono

High-performance C++ library for multiphysics and multibody dynamics simulations
http://projectchrono.org
BSD 3-Clause "New" or "Revised" License
2.25k stars 469 forks source link

Algebraic Multigrid GPU integration #527

Open MRiabov opened 3 weeks ago

MRiabov commented 3 weeks ago

Hello Project Chrono, I'm digging deep on how to make Project Chrono faster, and work on GPUs.

Is there a reason Chrono does not use Nvidia AmgX instead of it's CPU solvers? Algebraic multigrid on GPUs is 10-100x faster than the CPU solvers, and considering that solving equations takes around 70% of the solution time (to my knowledge), it's the easiest way to increase performance. I know Algebraic Multigrid is successfully used in Comsol, for example, where it is a standard because of it's speed. Ansys uses it too.

Is there anything that stops us from integrating it to Chrono? All FSI, FEA, magnetic and other simulations can be vastly sped up with a simple API connection. Do I not know something?

Cheers.

MRiabov commented 3 weeks ago

I've also talked with @rserban over a month ago about porting FEM to GPU, he said:

But even more importantly, it is not clear to me that it is worth it and that one would get the performance gains you seem to expect from a port to GPU. FEA does not map well to the GPU programming paradigm (unlike granular dynamics or SPH). For the types and sizes of FEA problems we’re interested in, it is unlikely a port to GPU is worth it.

Because, as far as I understand, he means that it because FEM is traditionally a sequential execution program, not parallel execution. But AMG methods are parallel for whichever equations are given. OK, I'm not super-versed in FEM solver mathematics, but from what I've explored in FEM (and I explored thoroughly), there is nothing that can't be done.

Are we stopped by literally anything but plugging it in? Cheers.