source: XIOS/dev/branch_yushan_merged/src/cxios.hpp @ 1139

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

branch merged with trunk r1130

  • 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
RevLine 
[300]1#ifndef __XIOS_HPP__
2#define __XIOS_HPP__
3
[591]4#include "xios_spl.hpp"
[382]5#include "mpi.hpp"
[697]6#include "registry.hpp"
[1134]7#include "log.hpp"
[300]8
[335]9namespace xios
[300]10{
[512]11  /*!
12  \class CXios
13  */
[300]14  class CXios
15  {
[512]16    public:
[1134]17      static void initialize(void) ;
18      static void initClientSide(const string & codeId, ep_lib::MPI_Comm& localComm, ep_lib::MPI_Comm& returnComm) ;
19      static void initServerSide(void) ;
20      static void clientFinalize(void) ;
21      static void parseFile(const string& filename) ;
[490]22
[1134]23      template <typename T>
24      static T getin(const string& id,const T& defaultValue) ;
[490]25
[1134]26      template <typename T>
27      static T getin(const string& id) ;
[300]28
[512]29    public:
[1134]30      static const string rootFile; //!< Configuration filename
31      static const string xiosCodeId ; //!< Identity for XIOS
32      static const string clientFile; //!< Filename template for client
33      static const string serverFile; //!< Filename template for server
[300]34
[1134]35      static bool isClient ; //!< Check if xios is client
36      static bool isServer ; //!< Check if xios is server
37      #pragma omp threadprivate(isClient, isServer)
[490]38
[1134]39      static MPI_Comm globalComm ; //!< Global communicator
40      #pragma omp threadprivate(globalComm)
[490]41
[1134]42      static bool printLogs2Files; //!< Printing out logs into files
43      static bool usingOasis ; //!< Using Oasis
44      static bool usingServer ; //!< Using server (server mode)
45      static double bufferSizeFactor; //!< Factor used to tune the buffer size
46      static const double defaultBufferSizeFactor; //!< Default factor value
47      static StdSize minBufferSize; //!< Minimum buffer size
48      static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible)
49      #pragma omp threadprivate(printLogs2Files, usingOasis, usingServer, bufferSizeFactor, minBufferSize, isOptPerformance)
50     
51      static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers
52      static double recvFieldTimeout;
53      #pragma omp threadprivate(recvFieldTimeout)
54     
55     
[512]56    public:
[499]57     //! Setting xios to use server mode
58     static void setUsingServer();
[490]59
[499]60     //! Setting xios NOT to use server mode
61     static void setNotUsingServer();
[491]62
[512]63     //! Initialize server (if any)
[509]64     static  void initServer();
65
[512]66    private:
67      //! Parse only Xios part of configuration file
[511]68      static void parseXiosConfig();
[300]69  } ;
70}
71
[352]72//#include "cxios_impl.hpp"
[512]73#endif // __XIOS_HPP__
Note: See TracBrowser for help on using the repository browser.