Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop/stuck particle in voxelized phantoms with emstandard_opt4 and GATE v9.3 #628

Open
cpommranz opened this issue Jul 12, 2023 · 3 comments

Comments

@cpommranz
Copy link
Contributor

GATE/Geant4 enters an infinite loop when using the emstandard_opt4 physics list for voxelized phantoms. An infinite number of steps with step length 0 and dE 0 is produced (see tracking output below). Geant4 does not detect the stuck particle and does not try to force push it, as it typically does to unstuck particles.

Log output:

[...]


  • G4Track Information: Particle = e-, Track ID = 3, Parent ID = 1

Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
0 -9.69 2.08 -1.83 0.237 0 0 0 test_voxel_phys_Z initStep
1 -9.86 2.05 -1.8 0.229 0.00721 0.18 0.18 test_voxel_phys_Z msc
2 -10 2.03 -1.77 0.216 0.0133 0.142 0.322 test_voxel_phys_Z msc
3 -10 2.03 -1.77 0.216 3.5e-06 0.00128 0.323 test_voxel_phys_Z msc
4 -10 2.03 -1.77 0.216 8.8e-05 0.00336 0.326 test_voxel_phys_Z Transportation
5 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
6 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
7 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
8 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
9 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
10 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
11 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
12 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
13 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
14 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
15 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
16 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
17 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
18 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
19 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
20 -10 2.03 -1.77 0.216 0 0 0.326 test_voxel_phys_Z eIoni
[...]

  • OS: Ubuntu 20.04
  • Gate version: v9.3
  • Geant4 version: v11.1.2
  • Root version: v6-29-01
  • Compiler version: gcc 9.3.0 (from the 9.3.0-1ubuntu2 deb package)
  • Physics list: emstandard_opt4

The issue is gone when switching to the emstandard_opt3 physics list. I cannot reproduce this issue with GATE v9.1 and Geant4 v10.7.2, so it seems to be a recent regression.
I'm currently not sure if this issue is related to GATE or rather Geant4 itself. I will investigate further.
A minimal working example is available here: minimal_working_example.zip. Please be prepared to kill the process before running the example, as the vast amount of Hits produced in the infinite loop quickly eats up memory.

@NikEfth
Copy link

NikEfth commented Dec 30, 2023

Hi @cpommranz. Your comment helped me a lot in my own situation.
I don't have voxelized phantoms, but I noticed the same behaviour starting, at least one year, ago. Probably, a bit more.
Using the _opt3 it works fine for me, too.
Have you find the source of this regression?

Kind Regards,
Nikos

@cpommranz
Copy link
Contributor Author

Hi @NikEfth. I tested two more configurations:

  • GATE v9.3 with Geant4 v11.1.3 (most up-to-date v11.1 patch release): Problem persists.
  • GATE v9.3 with Geant4 v11.2.0: Works perfectly; cannot reproduce the issue.

So, this seems to be a regression in the Geant4 v11.1 series. Please note, that GATE v9.3 is only tested with the Geant4 v11.1 series. It compiles fine against Geant4 v11.2.0, but I haven't run the benchmarks.

@NikEfth
Copy link

NikEfth commented Jan 4, 2024

Thank you.
I did as you said and installed geant 11.2 (for the tag v11.2) but unfortunately, the memory leak persists.
I think that it is much slower than previously, but I will need to run a full sim to know for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants