48 dir_-> SetGuidance(
"MPI control commands");
52 verbose_-> SetGuidance(
"Set verbose level.");
53 verbose_-> SetParameterName(
"verbose",
false,
false);
54 verbose_->
SetRange(
"verbose>=0 && verbose<=1");
58 status_-> SetGuidance(
"Show mpi status.");
62 execute_-> SetGuidance(
"Execute a macro file. (=/control/execute)");
63 execute_-> SetParameterName(
"fileName",
false,
false);
67 beam_on_-> SetGuidance(
"Start a parallel run w/ thread.");
70 p1-> SetDefaultValue(1);
71 p1-> SetParameterRange(
"numberOfEvent>=0");
72 beam_on_-> SetParameter(p1);
75 p2-> SetDefaultValue(
true);
76 beam_on_-> SetParameter(p2);
79 dot_beam_on_ =
new G4UIcommand(
"/mpi/.beamOn",
this);
80 dot_beam_on_-> SetGuidance(
"Start a parallel run w/o thread.");
83 p1-> SetDefaultValue(1);
84 p1-> SetParameterRange(
"numberOfEvent>=0");
85 dot_beam_on_-> SetParameter(p1);
88 p2-> SetDefaultValue(
true);
89 dot_beam_on_-> SetParameter(p2);
93 master_weight_-> SetGuidance(
"Set weight for master node.");
94 master_weight_-> SetParameterName(
"weight",
false,
false);
95 master_weight_-> SetRange(
"weight>=0. && weight<=1.");
99 show_seeds_-> SetGuidance(
"Show seeds of MPI nodes.");
103 set_master_seed_-> SetGuidance(
"Set a master seed for the seed generator.");
104 set_master_seed_-> SetParameterName(
"seed",
false,
false);
108 set_seed_-> SetGuidance(
"Set a seed for a specified node.");
111 p1-> SetParameterRange(
"node>=0");
112 set_seed_-> SetParameter(p1);
115 set_seed_-> SetParameter(p2);
126 delete master_weight_;
128 delete set_master_seed_;
137 if ( command == verbose_ ) {
138 G4int lv = verbose_-> GetNewIntValue(newValue);
139 g4mpi_-> SetVerbose(lv);
141 }
else if ( command == status_ ) {
142 g4mpi_-> ShowStatus();
144 }
else if ( command == execute_ ) {
146 g4mpi_-> ExecuteMacroFile(UI-> FindMacroPath(newValue));
148 }
else if ( command == beam_on_ ) {
149 std::istringstream is(newValue);
152 is >> nevent >> qdivide;
153 g4mpi_-> BeamOn(nevent, qdivide);
155 }
else if ( command == dot_beam_on_ ) {
156 std::istringstream is(newValue);
159 is >> nevent >> qdivide;
160 g4mpi_-> BeamOn(nevent, qdivide);
162 }
else if ( command == master_weight_ ) {
163 G4double weight= master_weight_-> GetNewDoubleValue(newValue);
164 g4mpi_-> SetMasterWeight(weight);
166 }
else if ( command == show_seeds_ ) {
167 g4mpi_-> ShowSeeds();
169 }
else if ( command == set_master_seed_ ) {
170 std::istringstream is(newValue);
173 g4mpi_-> GetSeedGenerator()-> SetMasterSeed(seed);
174 g4mpi_-> DistributeSeeds();
176 }
else if ( command == set_seed_ ) {
177 std::istringstream is(newValue);
192 if ( command == verbose_ ) {
193 cv = verbose_-> ConvertToString(g4mpi_->
GetVerbose());
194 }
else if ( command == master_weight_ ) {
G4double GetMasterWeight() const
static G4UImanager * GetUIpointer()
A base class for random number seed distribution.
void SetRange(const char *rs)
virtual void SetNewValue(G4UIcommand *command, G4String newValue)
virtual G4String GetCurrentValue(G4UIcommand *command)