source: XIOS/dev/branch_openmp/src/context_server.hpp @ 1460

Last change on this file since 1460 was 1460, checked in by yushan, 6 years ago

branch_openmp merged with XIOS_DEV_CMIP6@1459

  • 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.3 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
[1134]16    CContextServer(CContext* parent, ep_lib::MPI_Comm intraComm, ep_lib::MPI_Comm interComm) ;
[1033]17    bool eventLoop(bool enableEventsProcessing = true);
[300]18    void listen(void) ;
[1328]19    bool listenPendingRequest(ep_lib::MPI_Status& status);
[300]20    void checkPendingRequest(void) ;
21    void processRequest(int rank, char* buff,int count) ;
22    void processEvents(void) ;
[1460]23    bool hasFinished(void);
[300]24    void dispatchEvent(CEventServer& event) ;
25    void setPendingEvent(void) ;
26    bool hasPendingEvent(void) ;
[511]27
[1134]28    ep_lib::MPI_Comm intraComm ;
[300]29    int intraCommSize ;
30    int intraCommRank ;
[511]31
[1134]32    ep_lib::MPI_Comm interComm ;
[300]33    int commSize ;
[511]34
[300]35    map<int,CServerBuffer*> buffers ;
[1134]36    map<int,ep_lib::MPI_Request> pendingRequest ;
[300]37    map<int,char*> bufferRequest ;
[511]38
[300]39    map<size_t,CEventServer*> events ;
40    size_t currentTimeLine ;
[345]41    CContext* context ;
[697]42     
[300]43    bool finished ;
44    bool pendingEvent ;
[492]45    bool scheduled  ;    /*!< event of current timeline is alreading scheduled ? */
46    size_t hashId ;
[1460]47
[511]48    ~CContextServer() ;
49
50    private:
51      std::map<int, StdSize> mapBufferSize_;
[300]52  } ;
53
54}
55
56#endif
Note: See TracBrowser for help on using the repository browser.