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