Changeset 719


Ignore:
Timestamp:
10/05/15 15:32:52 (6 years ago)
Author:
rlacroix
Message:

Add a new configuration variable "min_buffer_size".

This allows the user to control the minimum buffer size.

Location:
XIOS/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/cxios.cpp

    r718 r719  
    2626  double CXios::bufferSizeFactor = 1.0; 
    2727  const double CXios::defaultBufferSizeFactor = 1.0; 
     28  StdSize CXios::minBufferSize = 1024 * sizeof(double); 
    2829  bool CXios::printLogs2Files; 
    2930  bool CXios::isOptPerformance = true; 
     
    6162 
    6263    bufferSizeFactor = getin<double>("buffer_size_factor", defaultBufferSizeFactor); 
     64    minBufferSize = getin<int>("min_buffer_size", 1024 * sizeof(double)); 
    6365 
    6466    globalComm=MPI_COMM_WORLD ; 
  • XIOS/trunk/src/cxios.hpp

    r718 r719  
    4242     static double bufferSizeFactor; //!< Factor used to tune the buffer size 
    4343     static const double defaultBufferSizeFactor; //!< Default factor value 
     44     static StdSize minBufferSize; //!< Minimum buffer size 
    4445     static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible) 
    4546     static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers 
  • XIOS/trunk/src/node/context.cpp

    r711 r719  
    266266   void CContext::setClientServerBuffer() 
    267267   { 
    268      size_t bufferSizeMin = 10 * sizeof(size_t) * 1024; 
     268     size_t bufferSizeMin = CXios::minBufferSize; 
    269269#define DECLARE_NODE(Name_, name_)    \ 
    270      bufferSizeMin = (bufferSizeMin < sizeof(C##Name_##Definition)) ?  sizeof(C##Name_##Definition) : bufferSizeMin; 
     270     if (bufferSizeMin < sizeof(C##Name_##Definition)) bufferSizeMin = sizeof(C##Name_##Definition); 
    271271#define DECLARE_NODE_PAR(Name_, name_) 
    272272#include "node_type.conf" 
     273#undef DECLARE_NODE 
     274#undef DECLARE_NODE_PAR 
     275 
    273276     std::map<int, StdSize> bufferSize = getDataSize(); 
    274277     if (bufferSize.empty()) 
Note: See TracChangeset for help on using the changeset viewer.