Message: Crashes with strong magnetic field Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Crashes with strong magnetic field 

Forum: Fields: Magnetic and Otherwise
Date: 28 Dec, 2009
From: <hatta>

Hi,

I'm making simulations of large scale magnetic shielding in space with GEANT4 and I've got now a couple of questions. My simulation uses tracking in magnetic field and I sometimes see messages like this

    *** Event Must Be Aborted 
     G4Transportation is killing track that is looping or stuck 
       This track has 1673.8003847623 MeV energy.
       Number of trials = 10   No of calls to AlongStepDoIt = 23517

in the log file. As far as I have understood from reading the forum this is not really a problem and can be ignored. But occasionaly the simulation crashes with an exception, and what is most weird it can be different exceptions. To name a few:

    *** G4Exception : IncorrectProposedEndPoint
          issued by : G4PropagatorInField::ComputeStep()
    Curve length mis-match between original state and proposed endpoint of     propagation.
    *** Fatal Exception *** core dump ***

    *** G4Exception: Aborting execution ***

or

    ERROR - G4MultiLevelLocator::EstimateIntersectionPoint()
            Undertaken only length: 880980.1739 out of 1000000 required.
            Remaining length = 119019.8261

    *** G4Exception : UnableToLocateIntersection
          issued by : G4MultiLevelLocator::EstimateIntersectionPoint()
    Too many substeps while trying to locate intersection.
    *** Fatal Exception *** core dump ***

    *** G4Exception: Aborting execution ***

Crashes generally occur when the field value is large ( >5 Tl). The field is 1/r, in the center there is a region with B = 0, and the field is set from the global field manager. I have tried to use different solvers (G4HelixSimpleRunge, G4ImplicitEuler, and so on) but it didn't help much, though the amount of messages varied considerably. I used also different physics lists (QGSP_BERT_HP, LHEP_PRECO_HP) and it also didn't make difference. Typical energy of particles in my program is 1--10 GeV and they are mostly light ions. So my question is how to avoid these crashes?

And the second question deals with random numbers. I set the generator seed at the beginning of a program with the following line of code:

    CLHEP::HepRandom::setTheSeed (atoi (argv[1]));

But then in the simulation I get almost identical results. Here is a diff of two log-files:

    --- Field/50/task0.log  2009-12-23 13:20:28.000000000 +0300
    +++ Field/50/task1.log  2009-12-23 13:20:04.000000000 +0300
    @@ -1,4 +1,4 @@
    -RANDOM SEED: 0
    +RANDOM SEED: 1

     *************************************************************
      Geant4 version Name: geant4-09-02-patch-01    (13-March-2009)
    @@ -2400,10 +2400,10 @@
     *** Event Must Be Aborted 
      G4Transportation is killing track that is looping or stuck 
        This track has 1222.0113738812 MeV energy.
    -   Number of trials = 10   No of calls to AlongStepDoIt = 21604
    +   Number of trials = 10   No of calls to AlongStepDoIt = 20146
      G4Transportation is killing track that is looping or stuck 
        This track has 1324.3758078435 MeV energy.
    -   Number of trials = 10   No of calls to AlongStepDoIt = 21955
    +   Number of trials = 10   No of calls to AlongStepDoIt = 20497
     ERROR - G4MagIntegratorDriver::AccurateAdvance()
             Proposed step is negative; hstep = -60465.8 !
<...50 Mb of similar output>

It can be seen that only AlongStepDoIt differ, and line numbers and energies are the same. So how to set up random number seed properly?

Software versions:
    Geant4 version Name: geant4-09-02-patch-01 (13-March-2009)
    g++ (Debian 4.4.2-5) 4.4.2
    CLHEP 2.0.4.2

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: Crashes with strong magnetic field   (Gumplinger Peter - 11 Jan, 2010)
 Add Message Add Message
to: "Crashes with strong magnetic field"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]