source: XIOS/dev/dev_olga/src/cxios.hpp @ 983

Last change on this file since 983 was 983, checked in by oabramkina, 5 years ago

My branch

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 2.5 KB
Line 
1#ifndef __XIOS_HPP__
2#define __XIOS_HPP__
3
4#include "xios_spl.hpp"
5#include "mpi.hpp"
6#include "registry.hpp"
7
8namespace xios
9{
10  /*!
11  \class CXios
12  */
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(int serverLevel) ;
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 ; //!< Configuration filename
30     static string xiosCodeId ; //!< Identity for XIOS
31     static string xiosCodeIdPrm ; //!< Identity for XIOS primary server
32     static string xiosCodeIdSnd ; //!< Identity for XIOS secondary server
33     static string clientFile;        //!< Filename template for client
34     static string serverFile;        //!< Filename template for server
35     static string serverPrimFile;  //!< Filename template for primary server in case of two server groups
36     static string serverScndFile;  //!< Filename template for secondary server in case of two server groups
37
38     static bool isClient ; //!< Check if xios is client
39     static bool isServer ; //!< Check if xios is primary server
40
41     static int serverLevel ; //
42
43     static MPI_Comm globalComm ; //!< Global communicator
44
45     static bool printLogs2Files; //!< Printing out logs into files
46     static bool usingOasis ; //!< Using Oasis
47     static bool usingServer ; //!< Using server (server mode)
48     static double bufferSizeFactor; //!< Factor used to tune the buffer size
49     static const double defaultBufferSizeFactor; //!< Default factor value
50     static StdSize minBufferSize; //!< Minimum buffer size
51     static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible)
52     static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers
53
54    public:
55     //! Setting xios to use server mode
56     static void setUsingServer();
57
58     //! Setting xios to use secondary server mode
59//     static void setUsingSecondaryServer();
60
61     //! Setting xios NOT to use server mode
62     static void setNotUsingServer();
63
64     //! Initialize server (if any)
65     static  void initServer();
66
67    private:
68      //! Parse only Xios part of configuration file
69      static void parseXiosConfig();
70  } ;
71}
72
73//#include "cxios_impl.hpp"
74#endif // __XIOS_HPP__
Note: See TracBrowser for help on using the repository browser.