# GarfieldGPU Elmer

**URL:** <https://root-forum.cern.ch/t/garfieldgpu-elmer/64965>\
**Category:** Garfield++\
**Created:** [August 6, 2026, 12:30pm UTC](https://root-forum.cern.ch/t/garfieldgpu-elmer/64965 "2026-08-06T12:30:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![malkaiser](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/malkaiser/32/40027_2.png) [@malkaiser](https://root-forum.cern.ch/u/malkaiser)\
**Post date:** [August 6, 2026, 12:30pm UTC](https://root-forum.cern.ch/t/garfieldgpu-elmer/64965/1 "2026-08-06T12:30:16Z")

</div>

Hi all,

I’d just like to confirm whether or not GPU acceleration works with Elmer at the minute - the GemGPU example with Ansys works fine, but modifying the Elmer lem example to use AvalancheMicroscopic with GPU via SetRunModeOptions(MPRunMode::GPUExclusive, 0); using gives me the below segmentation violation:

 ![Screenshot 2026-08-06 132950](https://root-forum.cern.ch/uploads/default/original/3X/1/1/11892e98106edf6a1a40fae2c3e362255600550a.png)

---

<div class="post-metadata">

**Author:** ![gabrielribcesario](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/gabrielribcesario/32/38927_2.png) [@gabrielribcesario](https://root-forum.cern.ch/u/gabrielribcesario)\
**Post date:** [August 6, 2026, 1:25pm UTC](https://root-forum.cern.ch/t/garfieldgpu-elmer/64965/2 "2026-08-06T13:25:47Z")

</div>

Hello,

I noticed that the `lem/avalanche.cc` example you ran doesn’t natively include a couple of function calls. Could you try adding

```cpp
gas.SetMaxElectronEnergy(400.0);
gas.Initialise(true);

```

after the other gas settings if you haven’t already?

IIRC, `AvalancheMicroscopicGPU` has no lazy initialization of the `MediumMagboltz` gas tables (unlike the CPU version), and `SetMaxElectronEnergy` also needs to be explicitly set since the collision-rate tables don’t grow dynamically on the GPU (OOB fault).

If that doesn’t work, could you attach your modified example and a backtrace from `gdb --args ./avalanche` (`run`, then `bt`)?

Cheers,

Gabriel

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [August 20, 2026, 1:26pm UTC](https://root-forum.cern.ch/t/garfieldgpu-elmer/64965/3 "2026-08-20T13:26:20Z")

</div>

Closed on August 20, 2026, 1:26pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
