English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / ReLauncher: TMpiRun.h Source File
Uranie / ReLauncher v4.9.0
/* @license-end */
TMpiRun.h
Go to the documentation of this file.
1/* --- Ansi C --- */
3// Copyright (C) 2013-2024 CEA/DES
4//
5// This program is free software: you can redistribute it and/or
6// modify it under the terms of the GNU Lesser General Public License
7// as published by the Free Software Foundation, either version 3 of
8// the License, or any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU Lesser General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public
16// License along with this program.
17// if not, see <http://www.gnu.org/licenses/>.
19
27#ifndef __TMPIRUN__
28#define __TMPIRUN__
29
30#include "TSeparateRun.h"
31
32//#include <queue>
33//#include <vector>
34
35#define MPICH_IGNORE_CXX_SEEK
36#define OMPI_SKIP_MPICXX
37#include <mpi.h>
38
39
40namespace URANIE
41{
42namespace MpiRelauncher
43{
44
46{
47protected:
48 static int _count;
49 int _id;
50
51 MPI_Comm _comm;
52
53 virtual int wait_service();
54 virtual int send_header(int canal, int *head, int size);
55 virtual int send_value(int canal, double *mesg, int size);
56 virtual int receive_header(int canal, int *head, int size);
57 virtual int receive_value(int canal, double *mesg, int size);
58
59public:
60
61 TMpiRun(URANIE::Relauncher::TEval *r, int *argc, char ***argv);
62 TMpiRun(URANIE::Relauncher::TEval *r, Bool_t init=kTRUE);
63 TMpiRun(URANIE::Relauncher::TEval *r, MPI_Comm comm);
64 virtual ~TMpiRun();
65
66 virtual void startSlave();
67 virtual Bool_t onMaster();
68 virtual Bool_t readyToGet();
69
70 ClassDef(URANIE::MpiRelauncher::TMpiRun, ID_RELAUNCHER)
71};
72
73
74}} //namespace
75#endif
separate process communicating by stream
Definition TMpiRun.h:46
virtual int wait_service()
Definition TMpiRun.cxx:147
virtual int send_header(int canal, int *head, int size)
Definition TMpiRun.cxx:170
MPI_Comm _comm
Definition TMpiRun.h:51
virtual Bool_t onMaster()
Definition TMpiRun.cxx:201
virtual Bool_t readyToGet()
Definition TMpiRun.cxx:206
virtual void startSlave()
Definition TMpiRun.cxx:184
int _id
Definition TMpiRun.h:49
virtual ~TMpiRun()
Definition TMpiRun.cxx:135
virtual int receive_header(int canal, int *head, int size)
Definition TMpiRun.cxx:157
static int _count
Definition TMpiRun.h:48
virtual int send_value(int canal, double *mesg, int size)
Definition TMpiRun.cxx:176
virtual int receive_value(int canal, double *mesg, int size)
Definition TMpiRun.cxx:163
Definition TEval.h:50
Definition TSeparateRun.h:45
Definition TBaseEval.cxx:44