Ignore:
Timestamp:
10/18/19 14:55:57 (5 years ago)
Author:
ymipsl
Message:

Implement one sided communication in client/server protocol to avoid dead-lock when some buffer are full.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_ONE_SIDED/src/buffer_server.hpp

    r717 r1757  
    1212  { 
    1313    public: 
    14       CServerBuffer(StdSize bufSize) ; 
     14      CServerBuffer(vector<MPI_Win>& windows, vector<MPI_Aint>& winAddress, int windowsRank, StdSize bufSize) ; 
    1515      ~CServerBuffer() ; 
    1616 
     
    1818      void* getBuffer(size_t count) ; 
    1919      void freeBuffer(size_t count) ; 
    20  
     20      void createWindows(MPI_Comm oneSidedComm) ; 
     21      bool freeWindows(void) ; 
     22      bool getBufferFromClient(size_t timeLine, char* & buffer, size_t& count) ; 
     23      bool isBufferEmpty(void) ; 
     24      void updateCurrentWindows(void) ; 
     25      void lockBuffer(void) ; 
     26      void unlockBuffer(void) ; 
     27      void notifyClientFinalize(void) ; 
    2128    private: 
    2229      char* buffer; 
     
    2532      size_t end; 
    2633      size_t size; 
     34      size_t used ;  // count of element occupied 
     35      std::vector<MPI_Win> windows_ ; 
     36      std::vector<MPI_Aint> winAddress_ ; 
     37 
     38      int currentWindows ; 
     39      bool hasWindows ; 
     40      int windowsRank_ ; 
    2741  }; 
    2842} 
Note: See TracChangeset for help on using the changeset viewer.