- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/parallel/MPI/mpi_interface/src/G4MPImessenger.cc
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4MPImessenger.cc,v 1. 1 2007/11/16 14:05:41 kmura Exp $27 // $Name: $26 // $Id: G4MPImessenger.cc,v 1.2 2010/05/18 06:06:21 kmura Exp $ 27 // $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 // ==================================================================== … … 72 72 execute= new G4UIcmdWithAString("/mpi/execute", this); 73 73 execute-> SetGuidance("Execute a macro file. (=/control/execute)"); 74 execute-> SetParameterName("fileName", false, false); 74 execute-> SetParameterName("fileName", false, false); 75 75 76 76 // /mpi/beamOn … … 88 88 89 89 // /mpi/.beamOn 90 dotbeamOn= new G4UIcmdWithAnInteger("/mpi/.beamOn", this); 91 dotbeamOn-> SetGuidance("Start a parallel run w/o thread. (=/run/beamOn)"); 92 dotbeamOn-> SetParameterName("numberOfEvent", true, false); 93 dotbeamOn-> SetDefaultValue(1); 94 dotbeamOn-> SetRange("numberOfEvent>=0"); 90 dotbeamOn= new G4UIcommand("/mpi/.beamOn", this); 91 dotbeamOn-> SetGuidance("Start a parallel run w/o thread."); 92 93 p1= new G4UIparameter("numberOfEvent", 'i', true); 94 p1-> SetDefaultValue(1); 95 p1-> SetParameterRange("numberOfEvent>=0"); 96 dotbeamOn-> SetParameter(p1); 97 98 p2= new G4UIparameter("divide", 'b', true); 99 p2-> SetDefaultValue(true); 100 dotbeamOn-> SetParameter(p2); 95 101 96 102 // /mpi/weightForMaster … … 99 105 masterWeight-> SetParameterName("weight", false, false); 100 106 masterWeight-> SetRange("weight>=0. && weight<=1."); 107 108 // /mpi/wait 109 waitall= new G4UIcmdWithoutParameter("/mpi/wait", this); 110 waitall-> SetGuidance( "Wait until beamOn-s on all nodes are done. " 111 "(batch mode only)"); 101 112 102 113 // /mpi/showSeeds … … 132 143 delete dotbeamOn; 133 144 delete masterWeight; 145 delete waitall; 134 146 delete showSeeds; 135 147 delete setMasterSeed; 136 148 delete setSeed; 137 149 138 150 delete dir; 139 151 } … … 162 174 163 175 } else if (command == dotbeamOn){ // /mpi/.beamOn 164 G4int nevent= dotbeamOn-> GetNewIntValue(newValue); 165 g4MPI-> BeamOn(nevent); 176 std::istringstream is(newValue); 177 G4int nevent; 178 G4bool qdivide; 179 is >> nevent >> qdivide; 180 g4MPI-> BeamOn(nevent, qdivide); 166 181 167 182 } else if (command == masterWeight){ // /mpi/masterWeight 168 183 G4double weight= masterWeight-> GetNewDoubleValue(newValue); 169 184 g4MPI-> SetMasterWeight(weight); 170 185 186 } else if (command == waitall) { 187 g4MPI-> WaitBeamOn(); 188 171 189 } else if (command == showSeeds){ // /mpi/showSeeds 172 190 g4MPI-> ShowSeeds(); 173 191 174 192 } else if (command == setMasterSeed){ // /mpi/setMasterSeed 175 193 std::istringstream is(newValue); … … 178 196 g4MPI-> GetSeedGenerator()-> SetMasterSeed(seed); 179 197 g4MPI-> DistributeSeeds(); 180 198 181 199 } else if (command == setSeed){ // /mpi/setSeed 182 200 std::istringstream is(newValue);
Note: See TracChangeset
for help on using the changeset viewer.