source: XIOS/dev/dev_ym/XIOS_SERVICES/src/client.hpp @ 1878

Last change on this file since 1878 was 1765, checked in by ymipsl, 5 years ago

Some cleaning On XIOS services branch

YM

  • 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: 2.1 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{
[1761]9    class CPoolRessource ;
[300]10    class CClient
11    {
[523]12      public:
[1639]13        static void initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm);
[1761]14        static void xiosGlobalCommByFileExchange(MPI_Comm clientComm, const string& codeId) ;
15        static void xiosGlobalCommByPublishing(MPI_Comm clientComm, const string& codeId) ;
[523]16        static void finalize(void);
[1639]17        static void registerContext(const string& id, MPI_Comm contextComm);
[1761]18        static void registerContext_old(const string& id, MPI_Comm contextComm);
19        static void callOasisEnddef(void) ; 
20       
[1639]21        static MPI_Comm intraComm;
22        static MPI_Comm interComm;
23        static std::list<MPI_Comm> contextInterComms;
[1148]24        static int serverLeader;
[523]25        static bool is_MPI_Initialized ;
[1761]26        static MPI_Comm clientsComm_ ;
[300]27
[1639]28        static MPI_Comm& getInterComm();
[992]29
[1243]30        //! Get global rank without oasis and current rank in model intraComm in case of oasis
[490]31        static int getRank();
32
[523]33        //! Open a file stream to write the info logs
[490]34        static void openInfoStream(const StdString& fileName);
[523]35        //! Write the info logs to standard output
[490]36        static void openInfoStream();
[523]37        //! Close the info logs file if it opens
[490]38        static void closeInfoStream();
39
[523]40        //! Open a file stream to write the error log
41        static void openErrorStream(const StdString& fileName);
42        //! Write the error log to standard error output
43        static void openErrorStream();
44        //! Close the error log file if it opens
45        static void closeErrorStream();
[1761]46        static CPoolRessource* getPoolRessource(void) { return poolRessource_ ; }
[490]47
[523]48      protected:
[1148]49        static int rank_;                 //!< Rank in model intraComm
[523]50        static StdOFStream m_infoStream;
51        static StdOFStream m_errorStream;
[490]52
[523]53        static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb);
[1761]54        static CPoolRessource* poolRessource_ ;
[523]55    };
[300]56}
57
58#endif
Note: See TracBrowser for help on using the repository browser.