XIOS  1.0
Xml I/O Server
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définitions de type Énumérations Valeurs énumérées Amis Macros
cxios.hpp
Aller à la documentation de ce fichier.
1 #ifndef __XIOS_HPP__
2 #define __XIOS_HPP__
3 
4 #include "xios_spl.hpp"
5 #include "mpi.hpp"
6 #include "registry.hpp"
7 
8 namespace xios
9 {
13  class CXios
14  {
15  public:
16  static void initialize(void) ;
17  static void initClientSide(const string & codeId, MPI_Comm& localComm, MPI_Comm& returnComm) ;
18  static void initServerSide(void) ;
19  static void clientFinalize(void) ;
20  static void parseFile(const string& filename) ;
21 
22  template <typename T>
23  static T getin(const string& id,const T& defaultValue) ;
24 
25  template <typename T>
26  static T getin(const string& id) ;
27 
28  public:
29  static string rootFile ;
30  static string xiosCodeId ;
31  static string clientFile;
32  static string serverFile;
33  static string serverPrmFile;
34  static string serverSndFile;
35 
36  static bool xiosStack;
37  static bool systemStack;
38 
39  static bool isClient ;
40  static bool isServer ;
41 
42  static MPI_Comm globalComm ;
43 
44  static bool printLogs2Files;
45  static bool usingOasis ;
46  static bool usingServer ;
47  static bool usingServer2 ;
48  static int ratioServer2 ;
49  static int nbPoolsServer2 ;
50  static double bufferSizeFactor;
51  static const double defaultBufferSizeFactor;
54  static bool isOptPerformance;
56  static double recvFieldTimeout;
57  static bool checkEventSync;
58 
59  public:
61  static void setUsingServer();
62 
64  static void setNotUsingServer();
65 
67  static void initServer();
68 
69  private:
71  static void parseXiosConfig();
72  } ;
73 }
74 
75 //#include "cxios_impl.hpp"
76 #endif // __XIOS_HPP__
static bool isClient
Check if xios is client.
Definition: cxios.hpp:39
static void initServer()
Initialize server (if any)
Definition: cxios.cpp:157
static bool checkEventSync
For debuuging, check if event are coherent and synchrone on client side.
Definition: cxios.hpp:57
static const double defaultBufferSizeFactor
Default factor value.
Definition: cxios.hpp:51
static double bufferSizeFactor
Factor used to tune the buffer size.
Definition: cxios.hpp:50
static int nbPoolsServer2
Number of pools created on the secondary server.
Definition: cxios.hpp:49
static bool isOptPerformance
Check if buffer size is for performance (as large as possible)
Definition: cxios.hpp:54
static string rootFile
Configuration filename.
Definition: cxios.hpp:29
static bool systemStack
Exception handling.
Definition: cxios.hpp:37
static bool usingServer2
Using secondary server (server mode).
Definition: cxios.hpp:47
static void parseFile(const string &filename)
Parse configuration file.
Definition: cxios.cpp:291
static double recvFieldTimeout
Time to wait for data before issuing an error when receiving a field.
Definition: cxios.hpp:56
#define xios(arg)
static CRegistry * globalRegistry
global registry which is wrote by the root process of the servers
Definition: cxios.hpp:55
static bool usingServer
Using server (server mode)
Definition: cxios.hpp:46
static MPI_Comm globalComm
Global communicator.
Definition: cxios.hpp:42
static bool xiosStack
Exception handling.
Definition: cxios.hpp:36
static string clientFile
Filename template for client.
Definition: cxios.hpp:31
static void setNotUsingServer()
Setting xios NOT to use server mode.
Definition: cxios.cpp:303
This class is a registry database which store key with an associated value.
Definition: registry.hpp:20
static void initServerSide(void)
Initialize server then put it into listening state.
Definition: cxios.cpp:167
static void initialize(void)
Parse configuration file and create some objects from it.
Definition: cxios.cpp:45
static StdSize minBufferSize
Minimum buffer size.
Definition: cxios.hpp:52
static string xiosCodeId
Identity for XIOS.
Definition: cxios.hpp:30
std::size_t StdSize
Definition: xios_spl.hpp:49
static bool printLogs2Files
Printing out logs into files.
Definition: cxios.hpp:44
static void initClientSide(const string &codeId, MPI_Comm &localComm, MPI_Comm &returnComm)
Initialize client.
Definition: cxios.cpp:102
static bool isServer
Check if xios is server.
Definition: cxios.hpp:40
static bool usingOasis
Using Oasis.
Definition: cxios.hpp:45
static void parseXiosConfig()
Parse only Xios part of configuration file.
Definition: cxios.cpp:56
static StdSize maxBufferSize
Maximum buffer size.
Definition: cxios.hpp:53
static string serverFile
Filename template for server.
Definition: cxios.hpp:32
static void setUsingServer()
Setting xios to use server mode.
Definition: cxios.cpp:297
static void clientFinalize(void)
Definition: cxios.cpp:129
static int ratioServer2
Percentage of server processors dedicated to secondary server.
Definition: cxios.hpp:48
static string serverPrmFile
Filename template for primary server in case of two server levels.
Definition: cxios.hpp:33
static string serverSndFile
Filename template for secondary server in case of two server levels.
Definition: cxios.hpp:34
static T getin(const string &id, const T &defaultValue)
Definition: cxios_impl.hpp:18