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

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

modif for Curie, CurrContext?->CurrContext_ptr in object_factory and group_factory

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