# GPU acceleration in GetFEM

**URL:** <https://getfem.discourse.group/t/gpu-acceleration-in-getfem/121>\
**Category:** General\
**Created:** [September 14, 2026, 8:01am UTC](https://getfem.discourse.group/t/gpu-acceleration-in-getfem/121 "2026-09-14T08:01:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Djoumessi](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Djoumessi](https://getfem.discourse.group/u/Djoumessi)\
**Post date:** [September 14, 2026, 8:01am UTC](https://getfem.discourse.group/t/gpu-acceleration-in-getfem/121/1 "2026-09-14T08:01:52Z")

</div>

Hi everyone,

I would like to know if anyone has already successfully run **GetFEM on a GPU** , or integrated GetFEM with a GPU-based computing framework.

My goal is to accelerate computationally intensive FEM simulations by taking advantage of GPU parallelization. In particular, I am interested in knowing whether there is currently a way to offload parts of the GetFEM computation (assembly, linear algebra, nonlinear solver, etc.) to a GPU, for example using CUDA, HIP, PETSc, or another framework.

Has anyone already experimented with this, or developed a working implementation?

I would be very interested in hearing about your experience, including any practical approach, limitations, or recommendations on where to start.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Konstantinos.Poulios](https://avatars.discourse-cdn.com/v4/letter/k/ac91a4/32.png) [@Konstantinos.Poulios](https://getfem.discourse.group/u/Konstantinos.Poulios)\
**Post date:** [September 21, 2026, 7:53am UTC](https://getfem.discourse.group/t/gpu-acceleration-in-getfem/121/2 "2026-09-21T07:53:32Z")

</div>

Assembly and linsolve are 2 very distinct areas.

For linsolve, you do not need to use the solvers provided by GetFEM. With very small adaptations you can couple it to any linear solver, also the ones that use GPU. GetFEM is mainly an assembler for linear and nonlinear problem it will give you a matrix and a rhs.

Regarding assembly, this is where we could talk about GPU offloading in GetFEM. Currently there is no support for performing the assembly on a GPU. The computation graph produced by GWFL in GetFEM has two modes:

- printing to std out (for debugging)
- compute on CPU

it is not unthinkable to support a GPU compute path as well, but it would require quite some work. I would rather base such an implementation on some portable GPU framework (not CUDA). From what I see, Vulkan is becoming more and more viable as an alternative for GPU compute.

---

<div class="post-metadata">

**Author:** ![Djoumessi](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Djoumessi](https://getfem.discourse.group/u/Djoumessi)\
**Post date:** [September 21, 2026, 8:22am UTC](https://getfem.discourse.group/t/gpu-acceleration-in-getfem/121/3 "2026-09-21T08:22:18Z")

</div>

Thank you very much for your detailed explanation and for the suggestion regarding Vulkan.

My current idea is to keep the assembly process in GetFEM++, extract the assembled matrix and right-hand side, and then pass them to a custum GPU-based solver. This seems like a reasonable starting point for exploring GPU acceleration without having to modify GetFEM++'s assembly framework.

I will also look into Vulkan as a potential alternative to CUDA, as you suggested.

---

<div class="post-metadata">

**Author:** ![Konstantinos.Poulios](https://avatars.discourse-cdn.com/v4/letter/k/ac91a4/32.png) [@Konstantinos.Poulios](https://getfem.discourse.group/u/Konstantinos.Poulios)\
**Post date:** [September 25, 2026, 11:10am UTC](https://getfem.discourse.group/t/gpu-acceleration-in-getfem/121/4 "2026-09-25T11:10:29Z")

</div>

I suspect you are currently using GetFEM in its fully sequential version, which is quite slow. You can try to enable openmp, so that at least assemblies will be run on several threads.

---

<div class="post-metadata">

**Author:** ![Djoumessi](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Djoumessi](https://getfem.discourse.group/u/Djoumessi)\
**Post date:** [September 25, 2026, 2:57pm UTC](https://getfem.discourse.group/t/gpu-acceleration-in-getfem/121/5 "2026-09-25T14:57:15Z")

</div>

Yes, I have already parallelized my code. The main issue is that the problem is multiphysics and computationally very large, which is why I am considering using the GPU to further improve the computational performance.

---

<div class="post-metadata">

**Author:** ![Djoumessi](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@Djoumessi](https://getfem.discourse.group/u/Djoumessi)\
**Post date:** [October 1, 2026, 5:17pm UTC](https://getfem.discourse.group/t/gpu-acceleration-in-getfem/121/6 "2026-10-01T17:17:25Z")

</div>

Hello Konstantinos,

Following the instructions from a previous discussion, I had installed the dependencies for GetFEM using the following command:

```bash
sudo apt install libmumps-ptscotch-dev libmumps-ptscotch-5.6t64 libopenmpi-dev libopenblas-serial-dev libqhull-dev autoconf automake libtool python3-dev

```

I had then configured, compiled, and installed GetFEM as follows:

```bash
./autogen.sh
./configure --prefix=/opt/gf20251104_libmumps_ptscotch --with-blas=openblas --with-optimization=-O3 --with-pic --enable-python --disable-matlab --disable-superlu LIBS="-lmumps_common_ptscotch -lpord_ptscotch" --enable-paralevel=2 --with-mumps="-lsmumps_ptscotch -ldmumps_ptscotch -lcmumps_ptscotch -lzmumps_ptscotch"
make -j4
make install

```

Could you please confirm whether these dependencies and configuration options are sufficient to build and use GetFEM with its Python interface and parallel MUMPS support? Are any additional packages or configuration steps required?

Thank you for your help.
