29 #include "G4MPImanager.hh" 30 #include "G4MPIsession.hh" 32 #ifdef G4MULTITHREADED 33 #include "G4MTRunManager.hh" 35 #include "G4RunManager.hh" 38 #include "G4UImanager.hh" 40 #include "G4VisExecutive.hh" 42 #include "ActionInitialization.hh" 44 #include "FTFP_BERT.hh" 48 int main(
int argc,
char** argv)
51 CLHEP::MTwistEngine randomEngine;
52 G4Random::setTheEngine(&randomEngine);
58 G4MPImanager* g4MPI =
new G4MPImanager(argc, argv);
62 G4MPIsession*
session = g4MPI-> GetMPIsession();
67 prompt +=
"[40;31m(%s)[40;36m[%/][00;30m:";
68 session-> SetPrompt(prompt);
73 #ifdef G4MULTITHREADED 74 G4MTRunManager* runManager =
new G4MTRunManager();
75 runManager-> SetNumberOfThreads(4);
77 G4RunManager* runManager =
new G4RunManager();
82 runManager-> SetUserInitialization(
new FTFP_BERT);
83 runManager-> SetUserInitialization(
new ActionInitialization);
87 G4VisExecutive* visManager =
new G4VisExecutive;
96 session-> SessionStart();
static G4UIterminal * session
int main(int argc, char **argv)
A MPI example code.