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/context_server.hpp

    r1639 r1757  
    1919    bool listenPendingRequest(MPI_Status& status) ; 
    2020    void checkPendingRequest(void) ; 
     21    void getBufferFromClient(size_t timeLine) ; 
    2122    void processRequest(int rank, char* buff,int count) ; 
    2223    void processEvents(void) ; 
     
    2526    void setPendingEvent(void) ; 
    2627    bool hasPendingEvent(void) ; 
    27  
     28    bool isAttachedModeEnabled() const; 
     29    void releaseBuffers(void) ; 
     30    void notifyClientsFinalize(void) ; 
     31     
    2832    MPI_Comm intraComm ; 
    2933    int intraCommSize ; 
     
    3337    int commSize ; 
    3438 
     39    MPI_Comm interCommMerged; //!< Communicator of the client group + server group (intraCommunicator) needed for one sided communication. 
     40 
     41    MPI_Comm commSelf; //!< Communicator of the server alone. Needed to create a new communicator between 1 proc client and 1 proc server for one sided communication 
     42 
    3543    map<int,CServerBuffer*> buffers ; 
     44    map<int,size_t> lastTimeLine ; //!< last event time line for a processed request 
     45    map<int,size_t>::iterator itLastTimeLine ; //!< iterator on lastTimeLine 
    3646    map<int,MPI_Request> pendingRequest ; 
    3747    map<int,char*> bufferRequest ; 
     
    4454    bool pendingEvent ; 
    4555    bool scheduled  ;    /*!< event of current timeline is alreading scheduled ? */ 
     56    bool attachedMode ;  //! true if attached mode is enabled otherwise false 
     57    bool pureOneSided ; //!< if true, client will communicated with servers only trough one sided communication. Otherwise the hybrid mode P2P /One sided is used. 
     58          
    4659    size_t hashId ; 
    4760 
     
    5063    private: 
    5164      std::map<int, StdSize> mapBufferSize_; 
     65      vector<MPI_Win> windows ; //! one sided mpi windows to expose client buffers to servers ; No memory will be attached on server side. 
     66 
    5267  } ; 
    5368 
Note: See TracChangeset for help on using the changeset viewer.