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

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

Intermeadiate version for merging with new server functionalities.

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