Changeset 2176 for XIOS


Ignore:
Timestamp:
07/12/21 19:56:24 (3 years ago)
Author:
ymipsl
Message:

Fix a minimum buffer size after buffer evaluation in order to achive small request like update_calendar, error are rising when buffer size is evaluated to 0 (no data sent to the server).
YM

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/src
Files:
2 edited

Legend:

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

    r2130 r2176  
    402402   void CContextClient::setBufferSize(const std::map<int,StdSize>& mapSize) 
    403403   { 
    404      for(auto& it : mapSize) {buffers[it.first]->fixBufferSize(std::min(it.second*CXios::bufferSizeFactor*1.01,CXios::maxBufferSize*1.0));} 
     404     for(auto& it : mapSize)  
     405      buffers[it.first]->fixBufferSize(std::max(CXios::minBufferSize*1.0,std::min(it.second*CXios::bufferSizeFactor*1.01,CXios::maxBufferSize*1.0))); 
    405406   } 
    406407 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.cpp

    r1878 r2176  
    4343  double CXios::bufferSizeFactor = 1.0; 
    4444  const double CXios::defaultBufferSizeFactor = 1.0; 
    45   StdSize CXios::minBufferSize = 1024 * sizeof(double); 
     45  StdSize CXios::minBufferSize = 64 * sizeof(double); 
    4646  StdSize CXios::maxBufferSize = std::numeric_limits<int>::max() ; 
    4747  bool CXios::printLogs2Files; 
Note: See TracChangeset for help on using the changeset viewer.