GPU support for FEniCS?

High-level question: is it possible that GPU might accelerate FEniCS in a more significant way than CPU?

2 Likes

There has been some GPU support in the past:

https://fenicsproject.org/qa/13347/is-there-a-gpu-version-of-fenics-available/

Apparently it was not really worth the effort:

https://fenicsproject.org/qa/789/can-i-use-gpu-acceleration-in-fenics/

1 Like

There is some current Research on the subject, see the FEniCS 19 conference program: https://easychair.org/smart-program/FEniCS19/2019-06-12.html#session:35209

3 Likes

Look Here

1 Like

Recent Ubuntu (Debian) packages of PETSc since version 3.11.4+dfsg1-1 have been built with opencl support. It’s provided as an additional capability and has not been tested directly. It “might” work.

If you do try it and find it improves dolfin performance, it’d be great if you could report your experience here.

How did you set it up? Navier_GPU.py runs much slower than Navier_CPU.py on my laptop so I suspect my setup is wrong. Had to import linalg explicitly too:

import cupyx.scipy.sparse.linalg

It depends on your GPU
Since we do FP64 computations our laptops CPU usually performs better than any gaming GPU in our Laptop.
Try to run code on server class GPU’s such as V100 or A100.
I’m rewriting the complete solver interface with CPU+GPU AMG solvers so that you can utilise both CPU and GPU effectively.

Thanks & Regards
Ghanshyam Chandra

Thanks, looking forward to try the new interface. Do you have a timeline?

I observe the same. I adapted @Ghanshyam_Chandra code to create a simple cupy-based newton solver but it performed much worse that the FEniCS blackbox solver. Is there any update on the possibility to accelerate fenics with GPUs?