- Timestamp:
- 07/26/17 10:34:17 (7 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/buffer_client.cpp
r1201 r1227 37 37 } 38 38 39 intCClientBuffer::remain(void)39 StdSize CClientBuffer::remain(void) 40 40 { 41 41 return bufferSize - count; 42 42 } 43 43 44 bool CClientBuffer::isBufferFree( intsize)44 bool CClientBuffer::isBufferFree(StdSize size) 45 45 { 46 46 if (size > bufferSize) 47 ERROR("bool CClientBuffer::isBufferFree( intsize)",47 ERROR("bool CClientBuffer::isBufferFree(StdSize size)", 48 48 << "The requested size (" << size << " bytes) is too big to fit the buffer (" << bufferSize << " bytes), please increase the client buffer size." << endl); 49 49 … … 64 64 65 65 66 CBufferOut* CClientBuffer::getBuffer( intsize)66 CBufferOut* CClientBuffer::getBuffer(StdSize size) 67 67 { 68 68 if (size <= remain()) … … 75 75 else 76 76 { 77 ERROR("CBufferOut* CClientBuffer::getBuffer( intsize)",77 ERROR("CBufferOut* CClientBuffer::getBuffer(StdSize size)", 78 78 << "Not enough space in buffer, this should not have happened..."); 79 79 return NULL; -
XIOS/dev/XIOS_DEV_CMIP6/src/buffer_client.hpp
r1201 r1227 17 17 ~CClientBuffer(); 18 18 19 bool isBufferFree( intsize);20 CBufferOut* getBuffer( intsize);19 bool isBufferFree(StdSize size); 20 CBufferOut* getBuffer(StdSize size); 21 21 bool checkBuffer(void); 22 22 bool hasPendingRequest(void); 23 intremain(void);23 StdSize remain(void); 24 24 25 25 private: … … 27 27 28 28 int current; 29 int count; 30 int bufferedEvents; 31 int maxEventSize; 32 const int maxBufferedEvents; 33 const int bufferSize; 34 const int estimatedMaxEventSize; 29 30 StdSize count; 31 StdSize bufferedEvents; 32 StdSize maxEventSize; 33 const StdSize maxBufferedEvents; 34 const StdSize bufferSize; 35 const StdSize estimatedMaxEventSize; 36 37 35 38 const int serverRank; 36 39 bool pending; -
XIOS/dev/XIOS_DEV_CMIP6/src/cxios.cpp
r1168 r1227 31 31 const double CXios::defaultBufferSizeFactor = 1.0; 32 32 StdSize CXios::minBufferSize = 1024 * sizeof(double); 33 StdSize CXios::maxBufferSize = std::numeric_limits<int>::max() ; 33 34 bool CXios::printLogs2Files; 34 35 bool CXios::isOptPerformance = true; … … 70 71 bufferSizeFactor = getin<double>("buffer_size_factor", defaultBufferSizeFactor); 71 72 minBufferSize = getin<int>("min_buffer_size", 1024 * sizeof(double)); 73 maxBufferSize = getin<int>("max_buffer_size", std::numeric_limits<int>::max()); 72 74 recvFieldTimeout = getin<double>("recv_field_timeout", 10.0); 73 75 if (recvFieldTimeout < 0.0) -
XIOS/dev/XIOS_DEV_CMIP6/src/cxios.hpp
r1158 r1227 47 47 static const double defaultBufferSizeFactor; //!< Default factor value 48 48 static StdSize minBufferSize; //!< Minimum buffer size 49 static StdSize maxBufferSize; //!< Maximum buffer size 49 50 static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible) 50 51 static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers -
XIOS/dev/XIOS_DEV_CMIP6/src/node/context.cpp
r1215 r1227 313 313 if (it->second > bufferSize[it->first]) bufferSize[it->first] = it->second; 314 314 315 // Apply the buffer size factor and check that we are above the minimum buffersize315 // Apply the buffer size factor, check that we are above the minimum buffer size and below the maximum size 316 316 ite = bufferSize.end(); 317 317 for (it = bufferSize.begin(); it != ite; ++it) … … 319 319 it->second *= CXios::bufferSizeFactor; 320 320 if (it->second < minBufferSize) it->second = minBufferSize; 321 if (it->second > CXios::maxBufferSize) it->second = CXios::maxBufferSize; 321 322 } 322 323
Note: See TracChangeset
for help on using the changeset viewer.