| Summary: | crash after trial step size loop fails to satisfy max_sagitta | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Richard Jones <richard.t.jones> |
| Component: | geometry/magneticfield | Assignee: | John Apostolakis <John.Apostolakis> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | ||
| Priority: | P4 | ||
| Version: | 10.6 | ||
| Hardware: | All | ||
| OS: | All | ||
The problems look related to the transportation process. Anyway, the user should consult with the developers of GlueX first. I don't know know what GlueX is. I am the developer of the GlueX simulation, and I submitted this bug report. For an overview of the GlueX experiment at Jefferson Lab, USA please see https://www.gluex.org -Richard Jones Thank you for the clear problem report. In first inspection it seems that the code change was an attempted optimisation to avoid a division in the case of small steps (when using Runge Kutta). Clearly our test code failed to spot the problem you have encountered. I check whether we can reproduce it using longer runs or different existing tests or examples. In the meantime, could you please check whether reverting the code to the previous version works for your case. We will cross check this for our examples and tests and include a fix as soon as possible. Your observation is correct - the last change was wrong. Many thanks again for your report, and suggested correction.
We will be revert the change to fix the problem.
If anyone else encounters this, you can uncomment that line ("SetAngCurve") to get the correction.
|
Symptom: GlueX simulation code that worked with G4.10.04.p02 now fails on the first event with G4.10.06: 1000 repeats of GeomField0003 warning (see below) followed by fatal exception GeomNav0003 (see below). The call stack where this happens is as follows: G4ChordFinderDelegate<T>::FindNextChord, G4ChordFinderDelegate.icc > G4IntegrationDriver<T>::QuickAdvance, G4IntegrationDriver.icc > > G4HelixMixedStepper::Stepper, G4HelixMixedStepper.cc > > > G4DormandPrince745::Stepper, G4DormandPrince745.cc > > G4HelixMixedStepper::DistChord, G4HelixMixedStepper.cc Here G4HelixMixedStepper::DistChord fails to update its sagitta in agreement with the reduced hstep because the line SetAngCurve() in G4HelixMixedStepper method Stepper has been disabled (commented out) for small Ang_curve. When Ang_curve is smaller than fAngle_threshold, G4HelixMixedStepper is delegating to fRK4Stepper->Stepper, and never updating fAngCurve. That call to SetAngCurve is needed to update fAngCurve, otherwise the sagitta will not follow the reduction in hstep in the trialStep loop in G4ChordFinderDelegate<T>::FindNextChord (G4ChordFinderDelegate.icc). Why was this line commented out? thank you, -Richard Jones -------- WWWW ------- G4Exception-START -------- WWWW ------- *** G4Exception : GeomField0003 issued by : G4ChordFinder::FindNextChord() Exceeded maximum number of trials= 75 Current sagita dist= 6.70695 Max sagita dist= 0.25 Step sizes (actual and proposed): Last trial = 0 Next trial = 1e-06 Proposed for chord = 1e-06 *** This is just a warning message. *** -------- WWWW -------- G4Exception-END --------- WWWW ------- ................the above block repeats 1000 times ................. -------- EEEE ------- G4Exception-START -------- EEEE ------- *** G4Exception : GeomNav0003 issued by : G4PropagatorInField::ComputeStep Curve length mis-match between original state and proposed endpoint of propagation. The curve length of the endpoint should be: 0.000977 and it is instead: 1.29539e-51. A difference of: 0.000977 Original state = ( X= -523.386713 272.334993 1787.05176 P= -73.9011412 38.8526791 178.94529 Pmag= 197.464747 Ekin= 196.954409 l= 0 m0= 0.510999 (Pdir-1)= 0 t_lab= 24.2669 t_proper= 3.70949e-05 PolV= (0,0,0) ) Proposed state = ( X= -523.386713 272.334993 1787.05176 P= -73.9011412 38.8526791 178.94529 Pmag= 197.464747 Ekin= 196.954409 l= 1.29539239314e-51 m0= 0.510999 (Pdir-1)= 0 t_lab= 0 t_proper= 0 PolV= (0,0,0) ) *** Fatal Exception *** core dump *** G4WT0 > G4Track (0x7f393c4c8270) - track ID = 10131, parent ID = 9188 G4WT0 > Particle type : e+ - creator process : GammaGeneralProc, creator model : conv G4WT0 > Kinetic energy : 196.954 MeV - Momentum direction : (-0.37425,0.196758,0.906214) G4WT0 > Step length : 2.36762 mm - total energy deposit : 0 eV G4WT0 > Pre-step point : (-523.387,272.335,1787.05) - Physical volume : LASS::1 (Air) G4WT0 > - defined by : ParallelWorld1 - step status : 1 G4WT0 > Post-step point : (-523.387,272.335,1787.05) - Physical volume : LASS::1 (Air) G4WT0 > - defined by : eIoni - step status : 7 G4WT0 > *** Note: Step information might not be properly updated. G4WT0 > -------- EEEE -------- G4Exception-END --------- EEEE -----