English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / ReLauncher: TBiMpiRun.h Source File
Uranie / ReLauncher  v4.10.0
/* @license-end */
TBiMpiRun.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2024 CEA/DES
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or any
7 // later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 // $Id$
19 // $Author$
20 // $Date$
21 // $Revision 1.3 $
22 // $State$
24 
32 #ifndef __BIMPIRUN__
33 #define __BIMPIRUN__
34 
35 #include "TMpiRun.h"
36 
37 namespace URANIE
38 {
39 namespace MpiRelauncher
40 {
41 
42 class TBiMpiRun: public TMpiRun
43 {
44 protected:
45  static MPI_Comm __intra;
46  static bool __isBiMpi;
47 
49 
50  void forward_header(int *buf, int siz);
51  void forward_value(double *buf, int siz);
52  void leader_loop(int grp);
53  void calcul_loop(int grp);
54  //TMpiEval *mpifun(TEval *f) {return dynamic_cast<TMpiEval*>(f);}
55  void calculSize(int siz);
56 
57 public:
58  // exceptions
59  class UncorrectSize {};
60  class NotInAMpiContext {};
61 
62  TBiMpiRun(URANIE::Relauncher::TEval *r, int sz, Bool_t init=kTRUE);
63  virtual ~TBiMpiRun(void);
64 
65  static MPI_Comm getCalculMpiComm();
66  static long getCalculMpiCommPy();
67  static bool isBiMpi();
68 
69  virtual void startSlave(void);
70  virtual Bool_t onMaster(void);
71  virtual void stopSlave(void);
72 
73  ClassDef(URANIE::MpiRelauncher::TBiMpiRun, ID_RELAUNCHER)
74 };
75 
76 }
77 }
78 #endif
Definition: TBaseEval.cxx:44
void calculSize(int siz)
Definition: TBiMpiRun.cxx:81
int _lowid
Definition: TBiMpiRun.h:48
int _topsz
Definition: TBiMpiRun.h:48
void leader_loop(int grp)
Definition: TBiMpiRun.cxx:115
static MPI_Comm getCalculMpiComm()
Definition: TBiMpiRun.cxx:52
static bool __isBiMpi
Definition: TBiMpiRun.h:46
Definition: TBiMpiRun.h:42
virtual void stopSlave(void)
Definition: TBiMpiRun.cxx:235
virtual ~TBiMpiRun(void)
Definition: TBiMpiRun.cxx:76
virtual Bool_t onMaster(void)
Definition: TBiMpiRun.cxx:230
void forward_value(double *buf, int siz)
Definition: TBiMpiRun.cxx:109
static long getCalculMpiCommPy()
Definition: TBiMpiRun.cxx:58
static bool isBiMpi()
Definition: TBiMpiRun.cxx:64
void forward_header(int *buf, int siz)
Definition: TBiMpiRun.cxx:104
void calcul_loop()
Definition: TSeparateRun.cxx:184
int _lowsz
Definition: TBiMpiRun.h:48
Definition: TEval.h:49
static MPI_Comm __intra
Definition: TBiMpiRun.h:45
int _topid
Definition: TBiMpiRun.h:48
virtual void startSlave(void)
Definition: TBiMpiRun.cxx:208
TBiMpiRun(URANIE::Relauncher::TEval *r, int sz, Bool_t init=kTRUE)
Definition: TBiMpiRun.cxx:70
Definition: TMpiRun.h:45