source: XIOS/dev/branch_yushan/src/context_server.hpp @ 1079

Last change on this file since 1079 was 1053, checked in by yushan, 7 years ago

ep_lib namespace specified when netcdf involved

  • 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.2 KB
RevLine 
[300]1#ifndef __CONTEXT_SERVER_HPP__
[327]2#define __CONTEXT_SERVER_HPP__
[591]3#include "xios_spl.hpp"
[300]4#include "event_server.hpp"
5#include "buffer_server.hpp"
[382]6#include "mpi.hpp"
[300]7
[335]8namespace xios
[300]9{
[345]10  class CContext ;
[511]11
[300]12  class CContextServer
13  {
14    public:
[511]15
[1053]16    CContextServer(CContext* parent, ep_lib::MPI_Comm intraComm, ep_lib::MPI_Comm interComm) ;
[1037]17    bool eventLoop(void) ;
[300]18    void listen(void) ;
19    void checkPendingRequest(void) ;
20    void processRequest(int rank, char* buff,int count) ;
21    void processEvents(void) ;
22    void dispatchEvent(CEventServer& event) ;
23    void setPendingEvent(void) ;
24    bool hasPendingEvent(void) ;
[597]25    bool hasFinished(void);
[511]26
[1053]27    ep_lib::MPI_Comm intraComm ;
[300]28    int intraCommSize ;
29    int intraCommRank ;
[511]30
[1053]31    ep_lib::MPI_Comm interComm ;
[300]32    int commSize ;
[511]33
[300]34    map<int,CServerBuffer*> buffers ;
[1053]35    map<int,ep_lib::MPI_Request> pendingRequest ;
[300]36    map<int,char*> bufferRequest ;
[511]37
[300]38    map<size_t,CEventServer*> events ;
39    size_t currentTimeLine ;
[345]40    CContext* context ;
[697]41     
[300]42    bool finished ;
43    bool pendingEvent ;
[492]44    bool scheduled  ;    /*!< event of current timeline is alreading scheduled ? */
45    size_t hashId ;
[511]46    ~CContextServer() ;
47
48    private:
49      std::map<int, StdSize> mapBufferSize_;
[300]50  } ;
51
52}
53
54#endif
Note: See TracBrowser for help on using the repository browser.