30 #include "G4MPImanager.hh" 31 #include "G4MPIsession.hh" 33 #ifdef G4MULTITHREADED 34 #include "G4MTRunManager.hh" 36 #include "G4RunManager.hh" 39 #include "G4UImanager.hh" 42 #include "G4VisExecutive.hh" 45 #include "ActionInitialization.hh" 47 #include "FTFP_BERT.hh" 51 int main(
int argc,
char** argv)
54 CLHEP::MTwistEngine randomEngine;
55 G4Random::setTheEngine(&randomEngine);
61 G4MPImanager* g4MPI =
new G4MPImanager(argc, argv);
65 G4MPIsession*
session = g4MPI-> GetMPIsession();
70 prompt +=
"[40;31m(%s)[40;36m[%/][00;30m:";
71 session-> SetPrompt(prompt);
76 #ifdef G4MULTITHREADED 77 G4MTRunManager* runManager =
new G4MTRunManager();
78 runManager-> SetNumberOfThreads(4);
80 G4RunManager* runManager =
new G4RunManager();
85 runManager-> SetUserInitialization(
new FTFP_BERT);
86 runManager-> SetUserInitialization(
new ActionInitialization);
91 G4VisExecutive* visManager =
new G4VisExecutive;
101 session-> SessionStart();
static G4UIterminal * session
int main(int argc, char **argv)
A MPI example code.