Memory Issues during Long Runs With ParticleHP

Hello,

I’ve been running a simulation of alpha-induced neutron production using the QGSP_BIC_AllHP physics list and cross-section biasing as implemented in example GB01, but on the alphas instead of neutrons or gammas, and I’ve run into an issue during long runs (>1E7 events) where the memory used by the process will slowly increase until I run out of disk space and the process is killed. When the program is able to execute fully, the used disk space is freed at the end of the run, even if visualizations are still open which seems to suggest something is storing events?

I initially thought this was a memory leak issue, however, I’ve been trying to check for memory leaks using valgrind, and it doesn’t show a leak that scales with the number of events that I run. The only lead I seem to have is that the memory issue seems to scale with the size of my cross-section bias, and the issue seems to go away when using the QBBC list instead. I’m running geant in multi-threaded mode with 20 cores, and have disabled trajectory tracking, verbose outputs, and event saving in the EndOfEventAction.

Has anyone else seen this sort of behavior or have suggestions on how I might be able to lower the amount of memory used over the course of a run?

Thanks,
Arthur

Geant4 Version: 11.1.2
Operating System: Ubuntu 22.04
Compiler/Version: gcc 11.4.0
CMake Version: cmake 3.22.1

Hello,

I’m facing the exact same issue with deuteron induced reactions. @AZangi did you managed to solve it or to understand its origin since your post ? Or does someone else has an answer ?

Thanks,

Mathieu

Hello Arthur and Mathieu,

@AZangi you used Geant4 11.1.2. That version is from 2023 and is by now several releases old. A lot has changed in ParticleHP since then. Please try the latest release, 11.4.p02, and let us know if the problem is still there.

@MathieuBoissier which Geant4 version are you using? If it is also an old one, please try 11.4.p02 as well.

Thanks.

Hello,

Thank you @dkonst for your quick answer, I was running my simulation on 11.4.0.

I followed your advice and moved to 11.4.2 and everything seems to work well now !

Thanks

Mathieu