Changeset 2539


Ignore:
Timestamp:
07/26/23 13:15:40 (10 months ago)
Author:
jderouillat
Message:

Set an incremental latency in window access of the legacy protocol (read operations)

Location:
XIOS3/branches/xios-3.0-beta/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/branches/xios-3.0-beta/src/buffer_server.cpp

    r2309 r2539  
    234234    if (time-bufferFromClientTime_ < bufferFromClientLatency_ ) return false; 
    235235    bufferFromClientTime_ = time ; 
     236    if ( bufferFromClientLatency_ < LATENCY_MAX ) bufferFromClientLatency_ *= 2; // Done to reduce pressure on windows access if not necessary (especially for read on JZ, ex : transect) 
    236237    CTimer::get("getBufferFromClient").resume() ;    
    237238    size_t clientTimeline ; 
     
    255256    if (timeLine==clientTimeline) 
    256257    { 
     258      bufferFromClientLatency_ = LATENCY_DEFAULT; // Reset latency if windows access is used 
    257259      buffer=(char*)getBuffer(clientCount) ; 
    258260      count=clientCount ; 
  • XIOS3/branches/xios-3.0-beta/src/buffer_server.hpp

    r2323 r2539  
    4343      bool hasWindows ; 
    4444      int windowsRank_ ; 
    45       double bufferFromClientLatency_=1e-1 ; 
     45      const double LATENCY_DEFAULT=1e-1 ; 
     46      const double LATENCY_MAX=1. ; 
     47      double bufferFromClientLatency_=LATENCY_DEFAULT ; 
    4648      double bufferFromClientTime_ = 0; 
    4749 
Note: See TracChangeset for help on using the changeset viewer.