Geant4
10.03
|
#include <G4MTRunManager.hh>
Public Types | |
enum | WorkerActionRequest { WorkerActionRequest::UNDEFINED, WorkerActionRequest::NEXTITERATION, WorkerActionRequest::PROCESSUI, WorkerActionRequest::ENDWORKER } |
typedef std::map< G4int, G4VPhysicalVolume * > | masterWorlds_t |
Public Types inherited from G4RunManager | |
enum | RMType { sequentialRM, masterRM, workerRM } |
Static Public Member Functions | |
static G4ScoringManager * | GetMasterScoringManager () |
static masterWorlds_t & | GetMasterWorlds () |
static void | addWorld (G4int counter, G4VPhysicalVolume *w) |
static G4MTRunManager * | GetMasterRunManager () |
static G4RunManagerKernel * | GetMasterRunManagerKernel () |
static G4MTRunManagerKernel * | GetMTMasterRunManagerKernel () |
static G4int | SeedOncePerCommunication () |
static void | SetSeedOncePerCommunication (G4int val) |
Static Public Member Functions inherited from G4RunManager | |
static G4RunManager * | GetRunManager () |
static G4bool | IfGeometryHasBeenDestroyed () |
Protected Member Functions | |
virtual G4bool | InitializeSeeds (G4int) |
virtual void | PrepareCommandsStack () |
virtual void | StoreRNGStatus (const G4String &filenamePrefix) |
virtual void | CreateAndStartWorkers () |
virtual void | WaitForReadyWorkers () |
virtual void | WaitForEndEventLoopWorkers () |
virtual void | TerminateWorkers () |
virtual void | NewActionRequest (WorkerActionRequest newRequest) |
void | RefillSeeds () |
Protected Member Functions inherited from G4RunManager | |
void | CleanUpPreviousEvents () |
void | CleanUpUnnecessaryEvents (G4int keepNEvents) |
void | StackPreviousEvent (G4Event *anEvent) |
G4RunManager (RMType rmType) | |
void | UpdateScoring () |
virtual void | DeleteUserInitializations () |
Static Protected Attributes | |
static G4int | seedOncePerCommunication = 0 |
Static Protected Attributes inherited from G4RunManager | |
static G4bool | fGeometryHasBeenDestroyed = false |
Private Types | |
typedef std::list< G4Thread * > | G4ThreadsList |
Private Attributes | |
G4int | nworkers |
G4int | forcedNwokers |
G4int | pinAffinity |
G4ThreadsList | threads |
std::vector< G4String > | uiCmdsForWorkers |
CLHEP::HepRandomEngine * | masterRNGEngine |
G4MTRunManagerKernel * | MTkernel |
Static Private Attributes | |
static G4ScoringManager * | masterScM = 0 |
static masterWorlds_t | masterWorlds = G4MTRunManager::masterWorlds_t() |
static G4MTRunManager * | fMasterRM = 0 |
Definition at line 51 of file G4MTRunManager.hh.
|
private |
Definition at line 118 of file G4MTRunManager.hh.
typedef std::map<G4int,G4VPhysicalVolume*> G4MTRunManager::masterWorlds_t |
Definition at line 159 of file G4MTRunManager.hh.
|
strong |
Enumerator | |
---|---|
UNDEFINED | |
NEXTITERATION | |
PROCESSUI | |
ENDWORKER |
Definition at line 198 of file G4MTRunManager.hh.
G4MTRunManager::G4MTRunManager | ( | ) |
Definition at line 77 of file G4MTRunManager.cc.
References FatalException, fMasterRM, forcedNwokers, G4cout, G4endl, G4Exception(), G4Threading::G4GetNumberOfCores(), G4RunManagerKernel::GetNumberOfStaticAllocators(), G4ScoringManager::GetScoringManagerIfExist(), G4UImanager::GetUIpointer(), JustWarning, G4RunManager::kernel, masterRNGEngine, masterScM, MTkernel, nSeedsMax, nSeedsPerEvent, numberOfEventToBeProcessed, nworkers, randDbl, and G4UImanager::SetMasterUIManager().
|
virtual |
Definition at line 153 of file G4MTRunManager.cc.
References randDbl, and TerminateWorkers().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 569 of file G4MTRunManager.cc.
|
virtual |
Reimplemented from G4RunManager.
Definition at line 553 of file G4MTRunManager.cc.
References G4MTRunManagerKernel::BroadcastAbortRun(), G4cerr, G4endl, G4State_EventProc, G4State_GeomClosed, G4StateManager::GetCurrentState(), G4StateManager::GetStateManager(), MTkernel, and G4RunManager::runAborted.
|
inlinestatic |
Definition at line 162 of file G4MTRunManager.hh.
References masterWorlds.
Referenced by ConstructScoringWorlds().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 389 of file G4MTRunManager.cc.
References addWorld(), G4RunManager::ConstructScoringWorlds(), G4TransportationManager::GetNoWorlds(), G4ScoringManager::GetScoringManagerIfExist(), G4TransportationManager::GetTransportationManager(), G4TransportationManager::GetWorldsIterator(), masterScM, and masterWorlds.
|
protectedvirtual |
Reimplemented in SimpleTbbMasterRunManager.
Definition at line 235 of file G4MTRunManager.cc.
References G4UserWorkerThreadInitialization::CreateAndStartWorker(), NewActionRequest(), NEXTITERATION, nworkers, G4WorkerThread::SetNumberThreads(), G4WorkerThread::SetThreadId(), threads, and G4RunManager::userWorkerThreadInitialization.
Referenced by InitializeEventLoop().
std::vector< G4String > G4MTRunManager::GetCommandStack | ( | ) |
Definition at line 229 of file G4MTRunManager.cc.
References uiCmdsForWorkers.
Referenced by G4WorkerRunManager::DoWork(), and tbbTask::execute().
|
inline |
Definition at line 233 of file G4MTRunManager.hh.
References eventModuloDef.
Referenced by G4WorkerRunManager::GenerateEvent().
|
inline |
Definition at line 163 of file G4MTRunManager.hh.
References masterRNGEngine.
Referenced by tbbTask::execute(), G4WorkerRunManager::SetupDefaultRNGEngine(), and G4MTRunManagerKernel::StartThread().
|
static |
Definition at line 58 of file G4MTRunManager.cc.
References fMasterRM.
Referenced by G4VisManager::BeginOfRun(), G4TheMTRayTracer::CreateBitMap(), G4TrajectoriesModel::DescribeYourselfTo(), G4WorkerRunManager::DoWork(), G4VisManager::Draw(), G4VisManager::EndOfEvent(), G4VisManager::EndOfRun(), tbbTask::execute(), G4WorkerRunManager::GenerateEvent(), XrayFluoPrimaryGeneratorAction::GeneratePrimaries(), G4WorkerRunManager::MergePartialResults(), G4VisCommandSceneAddEventID::EventID::operator()(), G4VSceneHandler::ProcessScene(), G4TheMTRayTracer::RestoreUserActions(), G4WorkerRunManager::RunInitialization(), G4WorkerRunManager::RunTermination(), G4VisCommandSceneEndOfEventAction::SetNewValue(), G4VisCommandReviewKeptEvents::SetNewValue(), G4WorkerRunManager::SetupDefaultRNGEngine(), G4MTRunManagerKernel::StartThread(), G4TheMTRayTracer::StoreUserActions(), G4RunManagerKernel::WorkerDefineWorldVolume(), and G4RunManagerKernel::WorkerUpdateWorldVolume().
|
static |
Definition at line 67 of file G4MTRunManager.cc.
References fMasterRM, and G4RunManager::kernel.
Referenced by G4WorkerRunManager::InitializeGeometry().
|
inlinestatic |
Definition at line 160 of file G4MTRunManager.hh.
References masterScM.
Referenced by G4WorkerRunManager::ConstructScoringWorlds(), and G4WorkerRunManager::G4WorkerRunManager().
|
inlinestatic |
Definition at line 161 of file G4MTRunManager.hh.
References masterWorlds.
Referenced by G4RunManagerKernel::WorkerDefineWorldVolume(), and G4RunManagerKernel::WorkerUpdateWorldVolume().
|
static |
Definition at line 72 of file G4MTRunManager.cc.
|
inline |
Definition at line 104 of file G4MTRunManager.hh.
References threads.
Referenced by NewActionRequest(), RequestWorkersProcessCommandsStack(), WaitForEndEventLoopWorkers(), and WaitForReadyWorkers().
|
inline |
Definition at line 57 of file G4MTRunManager.hh.
References nworkers.
Referenced by main().
|
inline |
Definition at line 59 of file G4MTRunManager.hh.
References pinAffinity.
Referenced by G4MTRunManagerKernel::StartThread().
|
virtual |
G4UImanager::GetUIpointer()->SetIgnoreCmdNotFound(true);
Reimplemented from G4RunManager.
Definition at line 195 of file G4MTRunManager.cc.
References G4RunManager::BeamOn(), G4RunManager::Initialize(), and G4RunManager::SetRunIDCounter().
Referenced by main().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 256 of file G4MTRunManager.cc.
References CreateAndStartWorkers(), eventModulo, eventModuloDef, G4RunManager::fakeRun, G4TemplateRNGHelper< T >::Fill(), G4Exception(), G4TemplateRNGHelper< T >::GetInstance(), InitializeSeeds(), JustWarning, masterRNGEngine, G4RunManager::msgText, MTkernel, G4RunManager::n_select_msg, nSeedsFilled, nSeedsMax, nSeedsPerEvent, nSeedsUsed, G4RunManager::numberOfEventProcessed, numberOfEventToBeProcessed, nworkers, PrepareCommandsStack(), randDbl, seedOncePerCommunication, G4RunManager::selectMacro, G4MTRunManagerKernel::SetUpDecayChannels(), G4Timer::Start(), G4RunManager::timer, G4RunManager::userWorkerThreadInitialization, G4RunManager::verboseLevel, and WaitForReadyWorkers().
Definition at line 93 of file G4MTRunManager.hh.
Referenced by InitializeEventLoop().
void G4MTRunManager::MergeRun | ( | const G4Run * | localRun | ) |
Definition at line 475 of file G4MTRunManager.cc.
References G4RunManager::currentRun, and G4Run::Merge().
Referenced by G4WorkerRunManager::MergePartialResults().
void G4MTRunManager::MergeScores | ( | const G4ScoringManager * | localScoringManager | ) |
Definition at line 469 of file G4MTRunManager.cc.
References masterScM, and G4ScoringManager::Merge().
Referenced by G4WorkerRunManager::MergePartialResults().
|
protectedvirtual |
Reimplemented in SimpleTbbMasterRunManager.
Definition at line 594 of file G4MTRunManager.cc.
References GetNumberActiveThreads(), nextActionRequest, nextActionRequestBarrier, G4MTBarrier::ReleaseBarrier(), and G4MTBarrier::Wait().
Referenced by CreateAndStartWorkers(), RequestWorkersProcessCommandsStack(), and TerminateWorkers().
|
protectedvirtual |
Definition at line 218 of file G4MTRunManager.cc.
References G4UImanager::GetCommandStack(), G4UImanager::GetUIpointer(), and uiCmdsForWorkers.
Referenced by InitializeEventLoop(), and RequestWorkersProcessCommandsStack().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 209 of file G4MTRunManager.cc.
|
protected |
Definition at line 352 of file G4MTRunManager.cc.
References eventModulo, G4TemplateRNGHelper< T >::GetInstance(), masterRNGEngine, nSeedsFilled, nSeedsMax, nSeedsPerEvent, numberOfEventToBeProcessed, nworkers, randDbl, G4TemplateRNGHelper< T >::Refill(), and seedOncePerCommunication.
Referenced by SetUpAnEvent(), and SetUpNEvents().
|
virtual |
Definition at line 607 of file G4MTRunManager.cc.
References GetNumberActiveThreads(), NewActionRequest(), PrepareCommandsStack(), PROCESSUI, processUIBarrier, G4MTBarrier::SetActiveThreads(), and G4MTBarrier::WaitForReadyWorkers().
Referenced by G4RunMessenger::SetNewValue(), and TerminateWorkers().
|
virtual |
Reimplemented from G4RunManager.
Reimplemented in SimpleTbbMasterRunManager.
Definition at line 376 of file G4MTRunManager.cc.
References G4RunManager::RunTermination(), G4RunManager::TerminateEventLoop(), and WaitForEndEventLoopWorkers().
Referenced by SimpleTbbMasterRunManager::RunTermination().
|
inlinestatic |
Definition at line 256 of file G4MTRunManager.hh.
References seedOncePerCommunication.
Referenced by G4WorkerRunManager::GenerateEvent(), and G4RunMessenger::GetCurrentValue().
|
inline |
Definition at line 232 of file G4MTRunManager.hh.
void G4MTRunManager::SetNumberOfThreads | ( | G4int | n | ) |
Definition at line 170 of file G4MTRunManager.cc.
References forcedNwokers, G4Exception(), JustWarning, n, nworkers, and threads.
Referenced by main().
void G4MTRunManager::SetPinAffinity | ( | G4int | n = 1 | ) |
Definition at line 617 of file G4MTRunManager.cc.
References FatalException, G4Exception(), n, and pinAffinity.
|
inlinestatic |
Definition at line 257 of file G4MTRunManager.hh.
Referenced by G4RunMessenger::SetNewValue().
|
virtual |
Definition at line 481 of file G4MTRunManager.cc.
References G4TemplateRNGHelper< T >::GetInstance(), G4TemplateRNGHelper< T >::GetSeed(), nSeedsFilled, nSeedsPerEvent, nSeedsUsed, G4RunManager::numberOfEventProcessed, numberOfEventToBeProcessed, RefillSeeds(), and G4Event::SetEventID().
Referenced by G4WorkerRunManager::GenerateEvent().
|
virtual |
Definition at line 503 of file G4MTRunManager.cc.
References eventModulo, G4TemplateRNGHelper< T >::GetInstance(), G4TemplateRNGHelper< T >::GetSeed(), nSeedsFilled, nSeedsPerEvent, nSeedsUsed, G4RunManager::numberOfEventProcessed, numberOfEventToBeProcessed, RefillSeeds(), G4RunManager::runAborted, seedOncePerCommunication, and G4Event::SetEventID().
Referenced by G4WorkerRunManager::GenerateEvent().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 433 of file G4MTRunManager.cc.
References G4UserRunAction::SetMaster(), and G4RunManager::SetUserAction().
Referenced by G4TheMTRayTracer::RestoreUserActions(), and G4TheMTRayTracer::StoreUserActions().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 439 of file G4MTRunManager.cc.
References FatalException, and G4Exception().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 445 of file G4MTRunManager.cc.
References FatalException, and G4Exception().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 451 of file G4MTRunManager.cc.
References FatalException, and G4Exception().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 457 of file G4MTRunManager.cc.
References FatalException, and G4Exception().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 463 of file G4MTRunManager.cc.
References FatalException, and G4Exception().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 422 of file G4MTRunManager.cc.
References G4RunManager::SetUserInitialization().
Referenced by main(), G4TheMTRayTracer::RestoreUserActions(), and G4TheMTRayTracer::StoreUserActions().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 428 of file G4MTRunManager.cc.
References G4RunManager::SetUserInitialization().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 406 of file G4MTRunManager.cc.
References G4RunManager::userWorkerInitialization.
|
virtual |
Reimplemented from G4RunManager.
Definition at line 411 of file G4MTRunManager.cc.
References G4RunManager::userWorkerThreadInitialization.
|
virtual |
Reimplemented from G4RunManager.
Definition at line 416 of file G4MTRunManager.cc.
References G4VUserActionInitialization::BuildForMaster(), and G4RunManager::userActionInitialization.
|
protectedvirtual |
Reimplemented from G4RunManager.
Definition at line 163 of file G4MTRunManager.cc.
References G4RunManager::randomNumberStatusDir.
|
virtual |
Reimplemented from G4RunManager.
Definition at line 213 of file G4MTRunManager.cc.
|
protectedvirtual |
Reimplemented in SimpleTbbMasterRunManager.
Definition at line 533 of file G4MTRunManager.cc.
References ENDWORKER, G4UserWorkerThreadInitialization::JoinWorker(), NewActionRequest(), RequestWorkersProcessCommandsStack(), threads, and G4RunManager::userWorkerThreadInitialization.
Referenced by ~G4MTRunManager().
|
virtual |
Reimplemented in SimpleTbbMasterRunManager.
Definition at line 590 of file G4MTRunManager.cc.
References endOfEventLoopBarrier, and G4MTBarrier::ThisWorkerReady().
Referenced by G4WorkerRunManager::RunTermination().
|
virtual |
Definition at line 614 of file G4MTRunManager.cc.
References processUIBarrier, and G4MTBarrier::ThisWorkerReady().
Referenced by G4WorkerRunManager::DoWork().
|
virtual |
Reimplemented in SimpleTbbMasterRunManager.
Definition at line 580 of file G4MTRunManager.cc.
References beginOfEventLoopBarrier, and G4MTBarrier::ThisWorkerReady().
Referenced by G4WorkerRunManager::RunInitialization().
|
virtual |
Reimplemented in SimpleTbbMasterRunManager.
Definition at line 602 of file G4MTRunManager.cc.
References nextActionRequest, nextActionRequestBarrier, and G4MTBarrier::ThisWorkerReady().
Referenced by G4WorkerRunManager::DoWork().
|
protectedvirtual |
Reimplemented in SimpleTbbMasterRunManager.
Definition at line 584 of file G4MTRunManager.cc.
References beginOfEventLoopBarrier, endOfEventLoopBarrier, GetNumberActiveThreads(), G4MTBarrier::ReleaseBarrier(), G4MTBarrier::ResetCounter(), and G4MTBarrier::Wait().
Referenced by RunTermination().
|
protectedvirtual |
Reimplemented in SimpleTbbMasterRunManager.
Definition at line 574 of file G4MTRunManager.cc.
References beginOfEventLoopBarrier, endOfEventLoopBarrier, GetNumberActiveThreads(), G4MTBarrier::ReleaseBarrier(), G4MTBarrier::ResetCounter(), and G4MTBarrier::Wait().
Referenced by InitializeEventLoop().
|
protected |
Definition at line 260 of file G4MTRunManager.hh.
Referenced by ThisWorkerReady(), WaitForEndEventLoopWorkers(), and WaitForReadyWorkers().
|
protected |
Definition at line 261 of file G4MTRunManager.hh.
Referenced by ThisWorkerEndEventLoop(), WaitForEndEventLoopWorkers(), and WaitForReadyWorkers().
|
protected |
Definition at line 222 of file G4MTRunManager.hh.
Referenced by InitializeEventLoop(), RefillSeeds(), and SetUpNEvents().
|
protected |
Definition at line 221 of file G4MTRunManager.hh.
Referenced by GetEventModulo(), and InitializeEventLoop().
|
staticprivate |
Definition at line 169 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), GetMasterRunManager(), GetMasterRunManagerKernel(), and GetMTMasterRunManagerKernel().
|
private |
Definition at line 113 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), and SetNumberOfThreads().
|
private |
Definition at line 124 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), getMasterRandomEngine(), InitializeEventLoop(), and RefillSeeds().
|
staticprivate |
Definition at line 166 of file G4MTRunManager.hh.
Referenced by ConstructScoringWorlds(), G4MTRunManager(), GetMasterScoringManager(), and MergeScores().
|
staticprivate |
Definition at line 167 of file G4MTRunManager.hh.
Referenced by addWorld(), ConstructScoringWorlds(), and GetMasterWorlds().
|
private |
Definition at line 170 of file G4MTRunManager.hh.
Referenced by AbortRun(), G4MTRunManager(), GetMTMasterRunManagerKernel(), and InitializeEventLoop().
|
protected |
Definition at line 217 of file G4MTRunManager.hh.
Referenced by NewActionRequest(), and ThisWorkerWaitForNextAction().
|
protected |
Definition at line 262 of file G4MTRunManager.hh.
Referenced by NewActionRequest(), and ThisWorkerWaitForNextAction().
|
protected |
Definition at line 224 of file G4MTRunManager.hh.
Referenced by InitializeEventLoop(), RefillSeeds(), SetUpAnEvent(), and SetUpNEvents().
|
protected |
Definition at line 225 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), InitializeEventLoop(), and RefillSeeds().
|
protected |
Definition at line 226 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), InitializeEventLoop(), RefillSeeds(), SetUpAnEvent(), and SetUpNEvents().
|
protected |
Definition at line 223 of file G4MTRunManager.hh.
Referenced by InitializeEventLoop(), SetUpAnEvent(), and SetUpNEvents().
|
protected |
Definition at line 140 of file G4MTRunManager.hh.
Referenced by SimpleTbbMasterRunManager::CreateAndStartWorkers(), G4MTRunManager(), InitializeEventLoop(), RefillSeeds(), SetUpAnEvent(), and SetUpNEvents().
|
private |
Definition at line 111 of file G4MTRunManager.hh.
Referenced by CreateAndStartWorkers(), G4MTRunManager(), GetNumberOfThreads(), InitializeEventLoop(), RefillSeeds(), and SetNumberOfThreads().
|
private |
Definition at line 115 of file G4MTRunManager.hh.
Referenced by GetPinAffinity(), and SetPinAffinity().
|
protected |
Definition at line 263 of file G4MTRunManager.hh.
Referenced by RequestWorkersProcessCommandsStack(), and ThisWorkerProcessCommandsStackDone().
|
protected |
Definition at line 227 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), InitializeEventLoop(), RefillSeeds(), and ~G4MTRunManager().
|
staticprotected |
Definition at line 240 of file G4MTRunManager.hh.
Referenced by InitializeEventLoop(), RefillSeeds(), SeedOncePerCommunication(), and SetUpNEvents().
|
private |
Definition at line 119 of file G4MTRunManager.hh.
Referenced by CreateAndStartWorkers(), GetNumberActiveThreads(), SetNumberOfThreads(), and TerminateWorkers().
|
private |
Definition at line 122 of file G4MTRunManager.hh.
Referenced by GetCommandStack(), and PrepareCommandsStack().