GSI Helmholtzzentrum für Schwerionenforschung
Hello, G3-G4-VMC experts! I have the following problem running simulation. I throw particles on my detector and collect edep. When I use electromagnetic particles i get no problems at all. But if i use hadrons (neutrons, pions) Geant3 crashes at some event number... In Geant4 I don't have such a problem (the results are funny in g4, but at least it works ). Here is the output of my sim script: ----------------------------------------------------------- PSaid instance created... access via gSaid->f() - RTDB container factory CbmBaseContFact - RTDB container factory CbmFieldContFact - RTDB container factory CbmPassiveContFact SetStoreTraj1 -I CbmAsciiGenerator: Opening input file output2.evt ============== CbmRunSim: Initialising simulation run ============== Info in <TGeoManager::TGeoManager>: Geometry CBMGeom, CBM geometry created Loading Geant3 libraries ... Loading Geant3 libraries ... finished CbmMCApplication::InitMC MZSTOR. ZEBRA table base TAB(0) in /MZCC/ at adr 42186663 283B7A7 HEX MZSTOR. Initialize Store 0 in /GCBANK/ with Store/Table at absolute adrs 42209213 42186663 HEX 2840FBD 283B7A7 HEX 5662 0 relative adrs 22114 0 with 1 Str. in 2 Links in 5300 Low words in 4999970 words. This store has a fence of 16 words. MZLOGL. Set Log Level 0 for store 0 1***** GEANT Version 3.21/11 Released on 100298 0***** Correction Cradle Version 0.1100 MZDIV. Initialize Division Constant in Store 0 NW/NWMAX= 20004000000, MODE/KIND= 1 2 Division 20 initialized. MZLINK. Initialize Link Area /GCLINK/ for Store 0 NL/NS= 20 20 MZLINK. Initialize Link Area /GCSLNK/ for Store 0 NL/NS= 100 100 -I- G3Config: Geant3 with TGeo has been created. Info in <TGeoManager::SetTopVolume>: Top volume is cave. Master volume is cave Mixture Air Aeff=15.1708 Zeff=7.52797 rho=0.00125 radlen=28819.7 index=1 Element #0 : O Z= 8.00 A= 16.00 w= 0.229 Element #1 : N Z= 7.00 A= 14.01 w= 0.744 Element #2 : AR Z= 18.00 A= 39.95 w= 0.027 Mixture Polysterene Aeff=11.1591 Zeff=5.61287 rho=1.032 radlen=42.0434 index=2 Element #0 : H Z= 1.00 A= 1.01 w= 0.077 Element #1 : C Z= 6.00 A= 12.01 w= 0.923 Material W A=183.84 Z=74 rho=19.3 radlen=0.350706 index=3 Info in <TGeoManager::CheckGeometry>: Fixing runtime shapes... Info in <TGeoManager::CheckGeometry>: ...Nothing to fix Info in <TGeoManager::CloseGeometry>: Counting nodes... Info in <TGeoManager::Voxelize>: Voxelizing... Info in <TGeoManager::CloseGeometry>: Building cache... Info in <TGeoManager::BuildCache>: --- Maximum geometry depth set to 100 Info in <TGeoManager::CloseGeometry>: 69 nodes/ 6 volume UID's in CBM geometry Info in <TGeoManager::CloseGeometry>: ----------------modeler ready---------------- -I- CbmMCApplication -> simulation RunID: 256747476 Calculating cross section tables, see gphysi.dat for more information Cross section calculation concluded successfully -I- CbmMCApplication:: Monte carlo Engine Initialisation **** GTRIGI: IEVENT= 1 IDEVT= 1 Random Seeds = 4357 0 -I CbmAsciiGenerator: Event 0, vertex = (0,0,0) cm, multiplicity 4 -I CbmPrimaryGenerator: 4 primary tracks from vertex (0, 0, 0) -I- U70Guard: 22 points registered in this event. **** GTRIGI: IEVENT= 2 IDEVT= 2 Random Seeds = 4357 0 -I CbmAsciiGenerator: Event 1, vertex = (0,0,0) cm, multiplicity 7 -I CbmPrimaryGenerator: 7 primary tracks from vertex (0, 0, 0) -I- U70Guard: 22 points registered in this event. **** GTRIGI: IEVENT= 3 IDEVT= 3 Random Seeds = 4357 0 -I CbmAsciiGenerator: Event 2, vertex = (0,0,0) cm, multiplicity 5 -I CbmPrimaryGenerator: 5 primary tracks from vertex (0, 0, 0) -I- U70Guard: 17 points registered in this event. blah... blah... blah.... **** GTRIGI: IEVENT= 286 IDEVT= 286 Random Seeds = 4357 0 -I CbmAsciiGenerator: Event 287, vertex = (0,0,0) cm, multiplicity 3 -I CbmPrimaryGenerator: 3 primary tracks from vertex (0, 0, 0) *** Break *** floating point exception (no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". Attaching to program: /proc/20265/exe, process 20265 (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. [Thread debugging using libthread_db enabled] [New Thread -1218599296 (LWP 20265)] (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. (no debugging symbols found)...done. 0x0518f23e in __waitpid_nocancel () from /lib/tls/libc.so.6 Thread 1 (Thread -1218599296 (LWP 20265)): #0 0x0518f23e in __waitpid_nocancel () from /lib/tls/libc.so.6 #1 0x05123fa4 in do_system () from /lib/tls/libc.so.6 #2 0x05a72c3f in system () from /lib/tls/libpthread.so.0 #3 0x007556fd in TUnixSystem::Exec () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #4 0x00755b2d in TUnixSystem::StackTrace () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #5 0x00753c23 in TUnixSystem::DispatchSignals () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #6 0x00751d1b in SigHandler () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #7 0x0075835f in sighandler () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #8 <signal handler called> #9 g3thion_ () at gtrak/gthion.F:71 #10 0x0968d994 in g3track_ () at gtrak/gtrack.F:264 #11 0x097453fe in gutrak_ () at TGeant3/TGeant3gu.cxx:555 #12 0x0968e0ef in gtreveroot_ () at gtrak/gtreveroot.F:171 #13 0x0974542e in gutrev_ () at TGeant3/TGeant3gu.cxx:575 #14 0x0973335f in jumpt0_ (iadr=0x4c369a) at minicern/jumptn.c:77 #15 0x095d38d1 in g3trig_ () at gbase/gtrig.F:65 #16 0x0973db16 in TGeant3::Gtrig (this=0xb74dcfe0) at TGeant3/TGeant3.cxx:2925 #17 0x09741f25 in TGeant3::ProcessEvent (this=0xb74dcfe0) at TGeant3/TGeant3.cxx:5914 #18 0x09741e86 in TGeant3::ProcessRun (this=0xb74dcfe0, nevent=2300) at TGeant3/TGeant3.cxx:5884 #19 0x0178bafb in CbmMCApplication::RunMC (this=0x9403630, nofEvents=2300) at ../../pandaroot/base/CbmMCApplication.cxx:228 #20 0x0179d09a in CbmRunSim::Run (this=0x9320928, NStart=2300, NStop=0) at ../../pandaroot/base/CbmRunSim.cxx:129 #21 0x017cb949 in G__CbmDict_774_0_7 (result7=0xbffecf50, funcname=0x931b1d8 "\001", libp=0xbffe99a0, hash=0) at CbmDict.cxx:9482 #22 0x00147d92 in Cint::G__ExceptionWrapper () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #23 0x001e2fdc in G__call_cppfunc () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #24 0x001d1daf in G__interpret_func () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #25 0x001c0b9a in G__getfunction () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #26 0x00242652 in G__getstructmem () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #27 0x0023c23c in G__getvariable () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #28 0x001b7af7 in G__getitem () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #29 0x001b677b in G__getexpr () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #30 0x001fa0d8 in G__exec_function () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #31 0x0020106c in G__exec_statement () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #32 0x0019d94a in G__exec_tempfile_core () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #33 0x0019db6a in G__exec_tempfile () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #34 0x0020920c in G__process_cmd () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCint.so.5.14 #35 0x006c8e23 in TCint::ProcessLine () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #36 0x006c8f84 in TCint::ProcessLineSynch () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #37 0x00604588 in TApplication::ProcessFile () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #38 0x00603c57 in TApplication::ProcessLine () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #39 0x0048cd9b in TRint::HandleTermInput () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libRint.so.5.14 #40 0x0048b798 in TTermInputHandler::Notify () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libRint.so.5.14 #41 0x0048d650 in TTermInputHandler::ReadNotify () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libRint.so.5.14 #42 0x00754058 in TUnixSystem::CheckDescriptors () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #43 0x00752f44 in TUnixSystem::DispatchOneEvent () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #44 0x00683788 in TSystem::InnerLoop () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #45 0x0068372d in TSystem::Run () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #46 0x006047aa in TApplication::Run () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libCore.so.5.14 #47 0x0048c82c in TRint::Run () from /afs/ihep.su/sw/scharm/fairroot/cbmsoft/tools/root/lib/libRint.so.5.14 #48 0x08048909 in main () Root > -------------------------------------------------------------- Does anybody know how to beat this? Thank you. Dmitry.
Hi I have actually the same problem when I try to run my simulation (strange baryons) in geant3. any ideas? Maybe it is related with the set up process in the g3config.C. I don't know. cheers Alicia
Hi Dmitry May I ask you which generator are you using? I get the same error by using Ascii and Particle generator. cheers Alicia.
Hi Dimitry, I suggest you to add printouts in the ProcessHit function of your subdetector, to understand in which point the simulation crashes. For debug purposes I found very useful also the lines usually commented in base/CbmMCApplication.cxx line 386 Debug for Geant tracking (inside CbmMCApplication::Stepping function) if you uncomment the sprintf you get the volumes tracked for each geant step and you might understand in which material happens the crash. In my experience with the straw tubes I simulated also pions and protons but I did not see such a crash. I do not know if this information helps you... ciao, Pablo
Alicia,it does not depend on generator. Only on Geant version. Pablo, thanks for the info! I'll try to check this. Dmitry.
Hi everybody You can look at the actual line where it happens. FACFLU = DME*(Z*DENS/A) Since it is a floting point exception i would assume that there is a devision by zero. This mean that you have defined some strange material with A=0. Looking in the media file i didn't find anything except the vacuum which has A=1.e-16. Maybe there is a problem with the accuracy. But here the information about the material would help. Ciao Florian
I found the bug. Thank you everybody for the useful comments. Since in my subdetector i use TGeoManager to create geometry, volumes and media - I did not use "media.geo" file in sim macro: fRun->SetMaterials("media.geo"). But i forgot that CAVE uses this file! So my cave did not have any media.... G4 was eating it without problem, but G3 is more scrupulous. I think this is because you always have sig fault deviding by zero in Fortran (G3) but not in C++ (G4). Thank you again! Dmitry.