Ignore:
Timestamp:
Sep 30, 2010, 2:47:17 PM (14 years ago)
Author:
garnier
Message:

tag geant4.9.4 beta 1 + modifs locales

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/parallel/MPI/mpi_interface/src/G4MPImessenger.cc

    r807 r1337  
    2424// ********************************************************************
    2525//
    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 $
    2828//
    2929// ====================================================================
     
    7272  execute= new G4UIcmdWithAString("/mpi/execute", this);
    7373  execute-> SetGuidance("Execute a macro file. (=/control/execute)");
    74   execute-> SetParameterName("fileName", false, false); 
     74  execute-> SetParameterName("fileName", false, false);
    7575
    7676  // /mpi/beamOn
     
    8888
    8989  // /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);
    95101
    96102  // /mpi/weightForMaster
     
    99105  masterWeight-> SetParameterName("weight", false, false);
    100106  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)");
    101112
    102113  // /mpi/showSeeds
     
    132143  delete dotbeamOn;
    133144  delete masterWeight;
     145  delete waitall;
    134146  delete showSeeds;
    135147  delete setMasterSeed;
    136148  delete setSeed;
    137  
     149
    138150  delete dir;
    139151}
     
    162174
    163175  } 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);
    166181
    167182  } else if (command == masterWeight){ // /mpi/masterWeight
    168183    G4double weight= masterWeight-> GetNewDoubleValue(newValue);
    169184    g4MPI-> SetMasterWeight(weight);
    170    
     185
     186  } else if (command == waitall) {
     187    g4MPI-> WaitBeamOn();
     188
    171189  } else if (command == showSeeds){ // /mpi/showSeeds
    172190    g4MPI-> ShowSeeds();
    173  
     191
    174192  } else if (command == setMasterSeed){ // /mpi/setMasterSeed
    175193    std::istringstream is(newValue);
     
    178196    g4MPI-> GetSeedGenerator()-> SetMasterSeed(seed);
    179197    g4MPI-> DistributeSeeds();
    180    
     198
    181199  } else if (command == setSeed){ // /mpi/setSeed
    182200    std::istringstream is(newValue);
Note: See TracChangeset for help on using the changeset viewer.