source: XIOS/dev/XIOS_DEV_CMIP6/src/client.hpp @ 1436

Last change on this file since 1436 was 1243, checked in by oabramkina, 7 years ago

Modifications allowing secondary-server pools of different size. It's controlled by a new parameter number_pools_server2.
Tests: complete, toy, ipsl.

This functionality is to be used in future. For now it is disabled and XIOS works as before with one process assigned per pool.

  • 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: 1.6 KB
Line 
1#ifndef __CLIENT_HPP__
2#define __CLIENT_HPP__
3
4#include "xios_spl.hpp"
5#include "mpi.hpp"
6
7namespace xios
8{
9    class CClient
10    {
11      public:
12        static void initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm);
13        static void finalize(void);
14        static void registerContext(const string& id, MPI_Comm contextComm);
15
16        static MPI_Comm intraComm;
17        static MPI_Comm interComm;
18        static std::list<MPI_Comm> contextInterComms;
19        static int serverLeader;
20        static bool is_MPI_Initialized ;
21
22        static MPI_Comm& getInterComm();
23
24        //! Get global rank without oasis and current rank in model intraComm in case of oasis
25        static int getRank();
26
27        //! Open a file stream to write the info logs
28        static void openInfoStream(const StdString& fileName);
29        //! Write the info logs to standard output
30        static void openInfoStream();
31        //! Close the info logs file if it opens
32        static void closeInfoStream();
33
34        //! Open a file stream to write the error log
35        static void openErrorStream(const StdString& fileName);
36        //! Write the error log to standard error output
37        static void openErrorStream();
38        //! Close the error log file if it opens
39        static void closeErrorStream();
40
41      protected:
42        static int rank_;                 //!< Rank in model intraComm
43        static StdOFStream m_infoStream;
44        static StdOFStream m_errorStream;
45
46        static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb);
47    };
48}
49
50#endif
Note: See TracBrowser for help on using the repository browser.