source: XIOS/dev/dev_olga/src/context_server.hpp @ 1130

Last change on this file since 1130 was 1130, checked in by oabramkina, 3 years ago

Two-level server: merging new grid functionalities and changes in the communication protocol (e.g. non-blocking context finalize, registries, oasis).

Tests on curie: test_client, test_complete, nemo (test_xios2_cmip6.exe).

To do: non-structured grid, check reading, possible bug in client/server initialization (?).

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