# Gas File: PROGRAM STOPPED TOO MANY PRIMARIES IPRIM

**URL:** <https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088>\
**Category:** Garfield++\
**Created:** [August 27, 2025, 7:41pm UTC](https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088 "2025-08-27T19:41:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathan-owens](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jonathan-owens/32/39294_2.png) [@jonathan-owens](https://root-forum.cern.ch/u/jonathan-owens)\
**Post date:** [August 27, 2025, 7:41pm UTC](https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088/1 "2025-08-27T19:41:56Z")

</div>

I am facing the situation first documented here in this issue: GarField++ Gas File Error: “PROGRAM STOPPED TOO MANY PRIMARIES IPRIM” (I am a new user and so can’t put links in posts)

It exits with the following error:

```auto
  MEAN ELECTRON ENERGY = 0.0369 EV. ERROR = +- 0.08%

  SOLUTION FOR STEADY STATE TOWNSEND PARAMETERS
  -------------------------------------------------

 SPACE STEP BETWEEN SAMPLING PLANES = 0.40843D-03 MICRONS.

   PROGRAM STOPPED TOO MANY PRIMARIES IPRIM= *******

```

This is when running the file garfieldpp/Examples/Paschen/gastable.C, with the only modification being that I change the gas to pure SF6.

Following the suggestion in the above post to lower the lower bound of the electric field does not work: I’ve gone as low as 1 eV/cm.

Does anyone have any additional tips? @Khalil_Alashy did you ever get this resolved?

Thanks!

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [August 28, 2025, 4:45am UTC](https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088/2 "2025-08-28T04:45:35Z")

</div>

Hi,

at what electric field does this happen?

---

<div class="post-metadata">

**Author:** ![jonathan-owens](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jonathan-owens/32/39294_2.png) [@jonathan-owens](https://root-forum.cern.ch/u/jonathan-owens)\
**Post date:** [August 28, 2025, 9:41am UTC](https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088/3 "2025-08-28T09:41:30Z")

</div>

It happens at all field values I have tried, including 0.1, 1, 10, 100, and 1000 kV/cm

---

<div class="post-metadata">

**Author:** ![Piet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/piet/32/12536_2.png) [@Piet](https://root-forum.cern.ch/u/Piet)\
**Post date:** [September 1, 2025, 10:54am UTC](https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088/4 "2025-09-01T10:54:56Z")

</div>

For reference, this was reported earlier by @Khalil_Alashy in [this post](https://root-forum.cern.ch/t/garfield-gas-file-error-program-stopped-too-many-primaries-iprim/55615)

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [September 1, 2025, 12:53pm UTC](https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088/5 "2025-09-01T12:53:54Z")

</div>

Hi,

at 100 kV/cm and 1000 kV/cm, Magboltz seems to run ok for me, but at 1 kV/cm and 10 kV/cm it stops indeed with the same error message that you got.

At these fields the attachment rate is extremely large: from the output of Magboltz (the first part, before running the steady-state Townsend simulation) I got η ~ 3 × 108 / cm at 1 kV/cm, η ~ 2 × 106 / cm at 10 kV / cm. This means that the electron becomes attached before it can drift a significant distance, so the swarm parameters are not really meaningful…

At what electric field do you actually operate your detector?

---

<div class="post-metadata">

**Author:** ![jonathan-owens](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jonathan-owens/32/39294_2.png) [@jonathan-owens](https://root-forum.cern.ch/u/jonathan-owens)\
**Post date:** [September 2, 2025, 3:41pm UTC](https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088/6 "2025-09-02T15:41:43Z")

</div>

Thanks everyone for the input. Indeed, the electric field values were too low and that was the issue. When I increase them to larger values, the program seems to run as expected.

I am not running a detector, just doing some simulations of breakdowns of different gases.

---

<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:** [September 16, 2025, 3:41pm UTC](https://root-forum.cern.ch/t/gas-file-program-stopped-too-many-primaries-iprim/64088/7 "2025-09-16T15:41:58Z")

</div>

Closed on September 16, 2025, 3:41pm UTC

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