Problem 2560 - Program crashes halfway when simulating a large number of particles if use any reference physics list involving HP
Summary: Program crashes halfway when simulating a large number of particles if use an...
Status: ASSIGNED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models/neutron_hp (show other problems)
Version: 11.0
Hardware: PC Linux
: P4 minor
Assignee: Vladimir.Ivantchenko
URL:
Depends on:
Blocks:
 
Reported: 2023-08-25 09:51 CEST by gaozc@impcas.ac.cn
Modified: 2024-01-30 13:29 CET (History)
1 user (show)

See Also:


Attachments
The simplified code which can be used to reproduce the problem (27.54 KB, application/x-zip-compressed)
2023-08-25 09:51 CEST, gaozc@impcas.ac.cn
Details

Note You need to log in before you can comment on or make changes to this problem.
Description gaozc@impcas.ac.cn 2023-08-25 09:51:43 CEST
Created attachment 822 [details]
The simplified code which can be used to reproduce the problem

When I was doing a simulation of radioactive decay I found that my program would crash after 1e8 particles were simulated. To find out where the problem is, the simulation was simplified as follows: a 500 MeV proton beam irradiate a 20cm*20cm*40cm cuboid lead target, and the FTFP_BERT_HP physics list was used. The simulation was done with no information collected. However, the program still crashed in the middle of simulation. When the height of the cuboid target was changed, sometimes there is one exception messege and sometimes it just break down sliently. In case you want to reproduce this error, the modified code is attached below. In my case, the simulation break down after 1.5e8 particles are emitted when using 64 threads.

Here is the error message:
 -------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : Cache001
      issued by : G4CacheReference<V*>::Destroy
Internal fatal error. Invalid G4Cache size (requested id: 519876441 but cache has size: 519876213 Possibly client created G4Cache object in a thread and tried to delete it from another thread!
*** Fatal Exception *** core dump ***
G4WT32 > G4Track (0x7fc7ece447f0) - track ID = 757, parent ID = 4
G4WT32 >  Particle type : neutron - creator process : protonInelastic, creator model : model_BertiniCascade
G4WT32 >  Kinetic energy : 4.77299 MeV - Momentum direction : (0.185605,-0.60999,0.770366)
G4WT32 >  Step length : 15.9978 um  - total energy deposit : 0 eV 
G4WT32 >  Pre-step point : (-1.88057,-3.1895,-140.655) - Physical volume : Envelope (G4_Pb)
G4WT32 >  - defined by : not available
G4WT32 >  Post-step point : (-1.8776,-3.19926,-140.642) - Physical volume : Envelope (G4_Pb)
G4WT32 >  - defined by : neutronInelastic - step status : 4
G4WT32 >  *** Note: Step information might not be properly updated.
G4WT32 > 
-------- EEEE -------- G4Exception-END --------- EEEE -------

G4WT32 > 
G4WT32 > *** G4Exception: Aborting execution ***

### CAUGHT SIGNAL: 6 ### address: 0x3ea0000fb72,  signal =  SIGABRT, value =    6, description = abort program (formerly SIGIOT). 

Backtrace:
[PID=64370, TID=32][ 0/33]> /lib64/libc.so.6(abort+0x148) [0x7fc8ada6ca78]
[PID=64370, TID=32][ 1/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4global.so(_Z11G4ExceptionPKcS0_19G4ExceptionSeverityS0_+0x755) [0x7fc8aee578e5]
[PID=64370, TID=32][ 2/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4global.so(_Z11G4ExceptionPKcS0_19G4ExceptionSeverityRNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE+0xe6) [0x7fc8aee57126]
[PID=64370, TID=32][ 3/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN7G4CacheIPN26G4ParticleHPContAngularPar10toBeCachedEED1Ev+0x2ed) [0x7fc8b279985d]
[PID=64370, TID=32][ 4/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN26G4ParticleHPContAngularParC1ERS_+0xd46) [0x7fc8b279aec6]
[PID=64370, TID=32][ 5/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN26G4ParticleHPContAngularPar20BuildByInterpolationEd21G4InterpolationSchemeRS_S1_+0x47) [0x7fc8b2792cf7]
[PID=64370, TID=32][ 6/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN29G4ParticleHPContEnergyAngular6SampleEddd+0x7a8) [0x7fc8b279dcc8]
[PID=64370, TID=32][ 7/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN19G4ParticleHPProduct6SampleEdi+0x319) [0x7fc8b2768199]
[PID=64370, TID=32][ 8/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN28G4ParticleHPEnAngCorrelation6SampleEd+0x2e4) [0x7fc8b27b5284]
[PID=64370, TID=32][ 9/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN27G4ParticleHPInelasticCompFS14CompositeApplyERK15G4HadProjectileP20G4ParticleDefinition+0x1814) [0x7fc8b27e1974]
[PID=64370, TID=32][10/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN24G4ParticleHPNInelasticFS13ApplyYourselfERK15G4HadProjectile+0x27) [0x7fc8b280d307]
[PID=64370, TID=32][11/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN19G4ParticleHPChannel13ApplyYourselfERK15G4HadProjectilei+0x6e) [0x7fc8b278cc4e]
[PID=64370, TID=32][12/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN23G4ParticleHPChannelList13ApplyYourselfEPK9G4ElementRK15G4HadProjectile+0x7ce) [0x7fc8b278f0be]
[PID=64370, TID=32][13/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN21G4ParticleHPInelastic13ApplyYourselfERK15G4HadProjectileR9G4Nucleus+0x230) [0x7fc8b27d5100]
[PID=64370, TID=32][14/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4processes.so(_ZN17G4HadronicProcess12PostStepDoItERK7G4TrackRK6G4Step+0x6c1) [0x7fc8b21b5461]
[PID=64370, TID=32][15/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tracking.so(_ZN17G4SteppingManager11InvokePSDIPEm+0x43) [0x7fc8b3883cf3]
[PID=64370, TID=32][16/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tracking.so(_ZN17G4SteppingManager23InvokePostStepDoItProcsEv+0x7e) [0x7fc8b3883bde]
[PID=64370, TID=32][17/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tracking.so(_ZN17G4SteppingManager8SteppingEv+0x398) [0x7fc8b387fff8]
[PID=64370, TID=32][18/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tracking.so(_ZN17G4TrackingManager15ProcessOneTrackEP7G4Track+0x3ae) [0x7fc8b38903de]
[PID=64370, TID=32][19/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4event.so(_ZN14G4EventManager12DoProcessingEP7G4Event+0xfd4) [0x7fc8b3ad2cd4]
[PID=64370, TID=32][20/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tasking.so(_ZN22G4WorkerTaskRunManager15ProcessOneEventEi+0x2d) [0x7fc8b904859d]
[PID=64370, TID=32][21/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tasking.so(_ZN22G4WorkerTaskRunManager11DoEventLoopEiPKci+0x16f) [0x7fc8b90484ef]
[PID=64370, TID=32][22/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tasking.so(_ZN22G4WorkerTaskRunManager6DoWorkEv+0x1c0) [0x7fc8b904a980]
[PID=64370, TID=32][23/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tasking.so(_ZN22G4TaskRunManagerKernel17ExecuteWorkerTaskEv+0x335) [0x7fc8b9043d85]
[PID=64370, TID=32][24/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tasking.so(_ZNSt17_Function_handlerIFSt10unique_ptrINSt13__future_base12_Result_baseENS2_8_DeleterEEvENS1_12_Task_setterIS0_INS1_7_ResultIvEES3_EZNS1_11_Task_stateIZN3PTL9TaskGroupIvvLl0EE4execIZN16G4TaskRunManager12AddEventTaskEiEUlvE_JEvEENSt9enable_ifIXsr3std7is_voidIT1_EE5valueEvE4typeET_DpT0_EUlvE_SaIiEFvvEE6_M_runEvEUlvE_vEEE9_M_invokeERKSt9_Any_data+0x2e) [0x7fc8b903e6de]
[PID=64370, TID=32][25/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tasking.so(_ZNSt13__future_base13_State_baseV29_M_do_setEPSt8functionIFSt10unique_ptrINS_12_Result_baseENS3_8_DeleterEEvEEPb+0x1d) [0x7fc8b903d10d]
[PID=64370, TID=32][26/33]> /lib64/libpthread.so.0(+0x620b) [0x7fc8ade0920b]
[PID=64370, TID=32][27/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4tasking.so(_ZNSt13__future_base11_Task_stateIZN3PTL9TaskGroupIvvLl0EE4execIZN16G4TaskRunManager12AddEventTaskEiEUlvE_JEvEENSt9enable_ifIXsr3std7is_voidIT1_EE5valueEvE4typeET_DpT0_EUlvE_SaIiEFvvEE6_M_runEv+0xd8) [0x7fc8b903d328]
[PID=64370, TID=32][28/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4ptl.so.0(_ZN3PTL10ThreadPool14execute_threadEPNS_14VUserTaskQueueE+0x35e) [0x7fc8ae92f33e]
[PID=64370, TID=32][29/33]> /public/software/geant4/geant4-11.0.2/lib64/libG4ptl.so.0(_ZN3PTL10ThreadPool12start_threadEPS0_PSt6vectorISt10shared_ptrINS_10ThreadDataEESaIS5_EEl+0x482) [0x7fc8ae92edf2]
[PID=64370, TID=32][30/33]> /public/software/gcc-9.5.0/lib64/libstdc++.so.6(+0xce5b0) [0x7fc8ae6075b0]
[PID=64370, TID=32][31/33]> /lib64/libpthread.so.0(+0x7ea5) [0x7fc8ade0aea5]
[PID=64370, TID=32][32/33]> /lib64/libc.so.6(clone+0x6d) [0x7fc8adb338dd]

: Aborted (Signal sent by tkill() 64370 1002)
Comment 1 Vladimir.Ivantchenko 2023-09-13 12:10:40 CEST
Hello,

we are working on the problem. Please, tell us what Geant4 version is used.

VI
Comment 2 gaozc@impcas.ac.cn 2023-09-15 04:41:32 CEST
I've tried Geant4 version 11.0.2 and 10.7.4, both crashed in the middle of the simulation.
Comment 3 Vladimir.Ivantchenko 2024-01-30 13:29:11 CET
Hello,

in the new Geant4 11.2 we release an alternative HP model, which is used in QGSP_BERT_HP Physics List. The work is still in progress but this new variant has some advantages compare with old HP , which are still in FTFP_BERT_HP. Without any gurantee you may try out 11.2.

One of the reason of this reorganization is to fix your and other problems of HP.

VI