[300] | 1 | #ifndef __XIOS_HPP__ |
---|
| 2 | #define __XIOS_HPP__ |
---|
| 3 | |
---|
| 4 | #include "xmlioserver_spl.hpp" |
---|
[382] | 5 | #include "mpi.hpp" |
---|
[300] | 6 | |
---|
[335] | 7 | namespace xios |
---|
[300] | 8 | { |
---|
[512] | 9 | /*! |
---|
| 10 | \class CXios |
---|
| 11 | */ |
---|
[300] | 12 | class CXios |
---|
| 13 | { |
---|
[512] | 14 | public: |
---|
[300] | 15 | static void initialize(void) ; |
---|
| 16 | static void initClientSide(const string & codeId, MPI_Comm& localComm, MPI_Comm& returnComm) ; |
---|
| 17 | static void initServerSide(void) ; |
---|
| 18 | static void clientFinalize(void) ; |
---|
[346] | 19 | static void parseFile(const string& filename) ; |
---|
[490] | 20 | |
---|
[300] | 21 | template <typename T> |
---|
[311] | 22 | static T getin(const string& id,const T& defaultValue) ; |
---|
[490] | 23 | |
---|
[311] | 24 | template <typename T> |
---|
[300] | 25 | static T getin(const string& id) ; |
---|
| 26 | |
---|
[512] | 27 | public: |
---|
| 28 | static string rootFile ; //!< Configuration filename |
---|
| 29 | static string xiosCodeId ; //!< Identity for XIOS |
---|
| 30 | static string clientFile; //!< Filename template for client |
---|
| 31 | static string serverFile; //!< Filename template for server |
---|
[300] | 32 | |
---|
[512] | 33 | static bool isClient ; //!< Check if xios is client |
---|
| 34 | static bool isServer ; //!< Check if xios is server |
---|
[490] | 35 | |
---|
[512] | 36 | static MPI_Comm globalComm ; //!< Global communicator |
---|
[490] | 37 | |
---|
[512] | 38 | static bool printInfo2File; //!< Printing out information into file |
---|
| 39 | static bool usingOasis ; //!< Using Oasis |
---|
| 40 | static bool usingServer ; //!< Using server (server mode) |
---|
| 41 | static double bufferServerFactorSize ; //!< Factor helps tune buffer size |
---|
| 42 | static double defaultBufferServerFactorSize ; //!< Default factor value |
---|
| 43 | static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible) |
---|
| 44 | |
---|
| 45 | public: |
---|
[499] | 46 | //! Setting xios to use server mode |
---|
| 47 | static void setUsingServer(); |
---|
[490] | 48 | |
---|
[499] | 49 | //! Setting xios NOT to use server mode |
---|
| 50 | static void setNotUsingServer(); |
---|
[491] | 51 | |
---|
[499] | 52 | //! A silly variable to detect whether one process is in client or server side. Should be removed on refactoring code |
---|
| 53 | static bool isServerSide; |
---|
| 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__ |
---|