Multi-thread Issue in ICRP110_HumanPhantom

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:_11.1.0
_Operating System:_CentOS Linus 8
_Compiler/Version:_gcc 8.4.1
_CMake Version:_3.27.6

Hi all,

I recently upgraded my Geant4 version from 10.7 to 11.1 in the CentOS environment, and I’ve encountered a significant discrepancy in the results of the ‘ICRP110_HumanPhantom’ example in the advanced folder when running the code with a single thread and multi-threading, with the latter showing results up to 50% lower. I’ve investigated by comparing it to other examples like ‘PDB4DNA’ and confirmed that my multi-threading settings seem to be functioning correctly, as ‘PDB4DNA’ exhibits only a 0.08% discrepancy between 1 and 80 threads results.

It’s worth noting that ‘PDB4DNA’ uses G4RunManager for single threading and G4MTRunManager for multi-threading, while ‘ICRP110_HumanPhantom’ utilizes G4RunManagerFactory for both modes. I attempted to modify the ‘ICRP110_HumanPhantom’ code to use G4RunManager and G4MTRunManager, but the issue persisted.

I suspect that this problem may be related to the energy deposition calculations within the ‘ScoringMesh.’ When I added ‘Merge’ in RunAction to merge my own SteppingAction results, the energy deposition results in the phantom from the SteppingAction method (which differ from the default output in the example) showed a reduced discrepancy between single and multi-threading results, approximately 20-30% lower.

I’m seeking insights or solutions to this issue and wondering if it’s a known problem within the Geant4 community.

Thank you!