source: XIOS/dev/dev_olga/src/client.hpp @ 983

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

My branch

  • 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.5 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 initializeClientOnServer(const int rank, MPI_Comm& localComm, const int srvSndLeader);
14        static void finalize(void);
15        static void registerContext(const string& id, MPI_Comm contextComm);
16
17        static MPI_Comm intraComm;
18        static MPI_Comm interComm;
19        static std::list<MPI_Comm> contextInterComms;
20        static int serverLeader;
21        static bool is_MPI_Initialized ;
22
23        //! Get rank of the current process
24        static int getRank();
25
26        //! Open a file stream to write the info logs
27        static void openInfoStream(const StdString& fileName);
28        //! Write the info logs to standard output
29        static void openInfoStream();
30        //! Close the info logs file if it opens
31        static void closeInfoStream();
32
33        //! Open a file stream to write the error log
34        static void openErrorStream(const StdString& fileName);
35        //! Write the error log to standard error output
36        static void openErrorStream();
37        //! Close the error log file if it opens
38        static void closeErrorStream();
39
40      protected:
41        static int rank;
42        static StdOFStream m_infoStream;
43        static StdOFStream m_errorStream;
44
45        static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb);
46    };
47}
48
49#endif
Note: See TracBrowser for help on using the repository browser.