English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / ReLauncher: TSeparateRun.h Source File
Uranie / ReLauncher v4.9.0
/* @license-end */
TSeparateRun.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 __TSEPARATERUN__
28#define __TSEPARATERUN__
29
30#include "TShareRun.h"
31
32#include <queue>
33#include <vector>
34
35#include "TSocket.h"
36#include "TServerSocket.h"
37#include "TMonitor.h"
38
39namespace URANIE
40{
41namespace Relauncher
42{
43
44class TSeparateRun : public TShareRun
45{
46protected:
48 std::queue<element> _pend;
49 std::queue<int> _sleep;
50 std::vector<struct element> _run;
51
52
53 virtual int wait_service() = 0;
54 virtual int send_header(int canal, int *head, int size) = 0;
55 virtual int send_value(int canal, double *mesg, int size) = 0;
56 virtual int receive_header(int canal, int *head, int size) = 0;
57 virtual int receive_value(int canal, double *mesg, int size) = 0;
58
59 //void send_double(int canal, int tag, int ncalc, int size, double *in);
60 void send_uentry(int canal, int ncalc, int size,
61 vector<URANIE::DataServer::UEntry*> *in);
62 void to_uentry(int *isz, double *vals,
63 std::vector<URANIE::DataServer::UEntry*> &dest);
64 void empty_uentry(TIter &next,
65 std::vector<URANIE::DataServer::UEntry*> &dest);
66 void calcul_loop();
67
68public:
69
71 virtual ~TSeparateRun();
72
73 virtual void startSlave();
74 virtual void stopSlave();
75
76 virtual void put(long, vector<URANIE::DataServer::UEntry*> *in,
77 vector<URANIE::DataServer::UEntry*> *out, int =0);
78 virtual int get(long &);
79
80 ClassDef(URANIE::Relauncher::TSeparateRun, ID_RELAUNCHER)
81};
82
83
84}} //namespace
85#endif
TRun base class.
Definition TEval.h:50
Definition TSeparateRun.h:45
virtual void stopSlave()
Definition TSeparateRun.cxx:255
virtual int send_header(int canal, int *head, int size)=0
void empty_uentry(TIter &next, std::vector< URANIE::DataServer::UEntry * > &dest)
Definition TSeparateRun.cxx:153
void send_uentry(int canal, int ncalc, int size, vector< URANIE::DataServer::UEntry * > *in)
Definition TSeparateRun.cxx:55
virtual void startSlave()
Definition TSeparateRun.cxx:249
std::vector< struct element > _run
Definition TSeparateRun.h:50
virtual int get(long &)
Definition TSeparateRun.cxx:289
int _nbress
Definition TSeparateRun.h:47
int _sizeout
Definition TSeparateRun.h:47
int _sizein
Definition TSeparateRun.h:47
std::queue< element > _pend
Definition TSeparateRun.h:48
virtual int receive_value(int canal, double *mesg, int size)=0
void calcul_loop()
Definition TSeparateRun.cxx:184
virtual int send_value(int canal, double *mesg, int size)=0
std::queue< int > _sleep
Definition TSeparateRun.h:49
void to_uentry(int *isz, double *vals, std::vector< URANIE::DataServer::UEntry * > &dest)
Definition TSeparateRun.cxx:117
virtual void put(long, vector< URANIE::DataServer::UEntry * > *in, vector< URANIE::DataServer::UEntry * > *out, int=0)
Definition TSeparateRun.cxx:270
virtual int receive_header(int canal, int *head, int size)=0
virtual ~TSeparateRun()
Definition TSeparateRun.cxx:52
Definition TShareRun.h:66
Definition TBaseEval.cxx:44