Message: Problem about "delete runManager" Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Problem about "delete runManager" 

Forum: Run Management
Date: 08 Jun, 2010
From: <tyniu>

Hi , When I run my simulation code, each time the program goes to "delete runManager;", the program will stop at the sentence for quite long time. The length of the time depends on how much events are simulated. For 1 million events, it will stop for ~ 5 mins. In the meanwhile, the memory of the program is increasing and decreasing periodically. I'm just wondering how to figure out this problem? The code is attached. Thank you for your help!

  CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);    
  G4RunManager * runManager = new G4RunManager;
  ExN03DetectorConstruction* detector = new   ExN03DetectorConstruction(ProjectionNum, TotalProjectionNum);
  runManager->SetUserInitialization(detector);

  G4VUserPhysicsList* physics = new ExN03PhysicsList;
  runManager->SetUserInitialization(physics);

  ExN03RunAction* run_action = ExN03RunAction::getInstance(rndmSeedNum);
  runManager->SetUserAction(run_action);

  runManager->SetUserAction(new ExN03EventAction);

  runManager->SetUserAction(new ScatterRemovalTrackingAction);

  runManager->SetUserAction(new ExN03SteppingAction);

  ExN03PrimaryGeneratorAction* gen_action = new ExN03PrimaryGeneratorAction(detector);
  runManager->SetUserAction(gen_action);

  runManager->Initialize();
  runManager->BeamOn(atoi(EventNumForOneRun));

  delete runManager;  <-- The code will stop here for quite long time
  G4cout<<"delete runManager"<<G4endl;  <-- This sentence has never been printed out.

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

1 None: Re: Problem about   (Kosta Kliakhandler - 22 Jun, 2010)
 Add Message Add Message
to: "Problem about "delete runManager""

 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 ]