source: XIOS/dev/branch_yushan/src/cxios.hpp @ 1074

Last change on this file since 1074 was 1074, checked in by yushan, 7 years ago

save modif

  • 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.8 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#ifdef _usingEP
8//#include "ep_declaration.hpp"
9#endif
10
11
12namespace xios
13{
14  /*!
15  \class CXios
16  */
17  class CXios
18  {
19    public:
20     static void initialize(void) ;
21     static void initClientSide(const string & codeId, ep_lib::MPI_Comm& localComm, ep_lib::MPI_Comm& returnComm) ;
22     static void initServerSide(void) ;
23     static void clientFinalize(void) ;
24     static void parseFile(const string& filename) ;
25
26     template <typename T>
27     static T getin(const string& id,const T& defaultValue) ;
28
29     template <typename T>
30     static T getin(const string& id) ;
31
32    public:
33     static string rootFile ; //!< Configuration filename
34     //#pragma omp threadprivate(rootFile)
35
36     static string xiosCodeId ; //!< Identity for XIOS
37     //#pragma omp threadprivate(xiosCodeId)
38
39     static string clientFile; //!< Filename template for client
40     //#pragma omp threadprivate(clientFile)
41
42     static string serverFile; //!< Filename template for server
43     //#pragma omp threadprivate(serverFile)
44
45     static bool isClient ; //!< Check if xios is client
46     #pragma omp threadprivate(isClient)
47
48     static bool isServer ; //!< Check if xios is server
49     #pragma omp threadprivate(isServer)
50
51     static MPI_Comm globalComm ; //!< Global communicator
52     #pragma omp threadprivate(globalComm)
53
54     static bool printLogs2Files; //!< Printing out logs into files
55     #pragma omp threadprivate(printLogs2Files)
56
57     static bool usingOasis ; //!< Using Oasis
58     #pragma omp threadprivate(usingOasis)
59
60     static bool usingServer ; //!< Using server (server mode)
61     #pragma omp threadprivate(usingServer)
62
63     static double bufferSizeFactor; //!< Factor used to tune the buffer size
64     #pragma omp threadprivate(bufferSizeFactor)
65
66     static const double defaultBufferSizeFactor; //!< Default factor value
67     #pragma omp threadprivate(defaultBufferSizeFactor)
68
69     static StdSize minBufferSize; //!< Minimum buffer size
70     #pragma omp threadprivate(minBufferSize)
71
72     static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible)
73     #pragma omp threadprivate(isOptPerformance)
74
75     static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers
76     #pragma omp threadprivate(globalRegistry)
77
78    public:
79     //! Setting xios to use server mode
80     static void setUsingServer();
81
82     //! Setting xios NOT to use server mode
83     static void setNotUsingServer();
84
85     //! Initialize server (if any)
86     static  void initServer();
87
88    private:
89      //! Parse only Xios part of configuration file
90      static void parseXiosConfig();
91  } ;
92}
93
94//#include "cxios_impl.hpp"
95#endif // __XIOS_HPP__
Note: See TracBrowser for help on using the repository browser.