Ignore:
Timestamp:
11/16/21 17:37:42 (3 years ago)
Author:
ymipsl
Message:

One sided protocol improvment.
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_client.cpp

    r2246 r2258  
    1616  CClientBuffer::CClientBuffer(MPI_Comm interComm, vector<MPI_Win>& windows, int clientRank, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize) 
    1717    : interComm(interComm) 
    18     , clientRank_(clientRank) 
     18    , clientRank_(0) 
    1919    , serverRank(serverRank) 
    2020    , bufferSize(bufferSize) 
     
    378378  bool CClientBuffer::isNotifiedFinalized(void) 
    379379  { 
    380     
    381     bool ret ; 
    382     lockBuffer() ; 
    383     ret=*notify[current] == notifyFinalize_ ? true : false ; 
    384     unlockBuffer() ; 
    385  
    386     return ret; 
     380    if (!isFinalized_) 
     381    { 
     382      double time=MPI_Wtime() ; 
     383//      if (time - lastCheckedNotify_ > latency_) 
     384      { 
     385        int flag ; 
     386        MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE); 
     387        lockBuffer() ; 
     388        isFinalized_=*notify[current] == notifyFinalize_ ? true : false ; 
     389        unlockBuffer() ; 
     390        lastCheckedNotify_=time ; 
     391      } 
     392    } 
     393    return isFinalized_ ; 
    387394  } 
    388395 
Note: See TracChangeset for help on using the changeset viewer.