source: XIOS/dev/dev_trunk_omp/src/cxios.hpp @ 1772

Last change on this file since 1772 was 1646, checked in by yushan, 5 years ago

branch merged with trunk @1645. arch file (ep&mpi) added for ADA

  • 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: 3.7 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"
[300]7
[335]8namespace xios
[300]9{
[512]10  /*!
11  \class CXios
12  */
[300]13  class CXios
14  {
[512]15    public:
[1601]16      static void initialize(void) ;
17      static void initClientSide(const string & codeId, ep_lib::MPI_Comm& localComm, ep_lib::MPI_Comm& returnComm) ;
18      static void initServerSide(void) ;
19      static void clientFinalize(void) ;
20      static void parseFile(const string& filename) ;
[490]21
[1601]22      template <typename T>
23      static T getin(const string& id,const T& defaultValue) ;
[490]24
[1601]25      template <typename T>
26      static T getin(const string& id) ;
[300]27
[512]28    public:
[1601]29     static const string rootFile ; //!< Configuration filename
30     static const string xiosCodeId ; //!< Identity for XIOS
31     static const string clientFile;        //!< Filename template for client
32     static const string serverFile;        //!< Filename template for server
33     static const string serverPrmFile;  //!< Filename template for primary server in case of two server levels
34     static const string serverSndFile;  //!< Filename template for secondary server in case of two server levels
[300]35
[1646]36     static bool xiosStack;    //!< Exception handling
37     static bool systemStack;  //!< Exception handling
38     #pragma omp threadprivate(xiosStack, systemStack)
39
[512]40     static bool isClient ; //!< Check if xios is client
[1601]41     #pragma omp threadprivate(isClient)
[992]42     static bool isServer ; //!< Check if xios is server
[1601]43     #pragma omp threadprivate(isServer)
[490]44
[1601]45     static ep_lib::MPI_Comm globalComm ; //!< Global communicator
46     #pragma omp threadprivate(globalComm)
[490]47
[523]48     static bool printLogs2Files; //!< Printing out logs into files
[1601]49     #pragma omp threadprivate(printLogs2Files)
[1243]50     static bool usingOasis ;     //!< Using Oasis
[1601]51     #pragma omp threadprivate(usingOasis)
[1243]52     static bool usingServer ;    //!< Using server (server mode)
[1601]53     #pragma omp threadprivate(usingServer)
[1243]54     static bool usingServer2 ;   //!< Using secondary server (server mode). IMPORTANT: Use this variable ONLY in CServer::initialize().
[1601]55     #pragma omp threadprivate(usingServer2)
[1243]56     static int ratioServer2 ;    //!< Percentage of server processors dedicated to secondary server
[1601]57     #pragma omp threadprivate(ratioServer2)
[1243]58     static int nbPoolsServer2 ;  //!< Number of pools created on the secondary server
[1601]59     #pragma omp threadprivate(nbPoolsServer2)
[718]60     static double bufferSizeFactor; //!< Factor used to tune the buffer size
[1601]61     #pragma omp threadprivate(bufferSizeFactor)
[718]62     static const double defaultBufferSizeFactor; //!< Default factor value
[719]63     static StdSize minBufferSize; //!< Minimum buffer size
[1601]64     #pragma omp threadprivate(minBufferSize)
[1227]65     static StdSize maxBufferSize; //!< Maximum buffer size
[1601]66     #pragma omp threadprivate(minBufferSize)
[512]67     static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible)
[1601]68     #pragma omp threadprivate(isOptPerformance)
[697]69     static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers
[1601]70     #pragma omp threadprivate(globalRegistry)
[1158]71     static double recvFieldTimeout; //!< Time to wait for data before issuing an error when receiving a field
[1601]72     #pragma omp threadprivate(recvFieldTimeout)
[1377]73     static bool checkEventSync; //!< For debuuging, check if event are coherent and synchrone on client side
[512]74
75    public:
[499]76     //! Setting xios to use server mode
77     static void setUsingServer();
[490]78
[499]79     //! Setting xios NOT to use server mode
80     static void setNotUsingServer();
[491]81
[512]82     //! Initialize server (if any)
[509]83     static  void initServer();
84
[512]85    private:
86      //! Parse only Xios part of configuration file
[511]87      static void parseXiosConfig();
[300]88  } ;
89}
90
[352]91//#include "cxios_impl.hpp"
[512]92#endif // __XIOS_HPP__
Note: See TracBrowser for help on using the repository browser.