Changeset 1029


Ignore:
Timestamp:
01/13/17 11:44:00 (5 years ago)
Author:
rlacroix
Message:

Make the timeout for xios_recv_field configurable.

The new option "recv_field_timeout" can now be used to set the timeout expressed in seconds. Default value is still 10s.

Location:
XIOS/trunk/src
Files:
3 edited

Legend:

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

    r956 r1029  
    3030  bool CXios::isOptPerformance = true; 
    3131  CRegistry* CXios::globalRegistry = 0; 
     32  double CXios::recvFieldTimeout = 10.0; 
    3233 
    3334  //! Parse configuration file and create some objects from it 
     
    6364    bufferSizeFactor = getin<double>("buffer_size_factor", defaultBufferSizeFactor); 
    6465    minBufferSize = getin<int>("min_buffer_size", 1024 * sizeof(double)); 
     66    recvFieldTimeout = getin<double>("recv_field_timeout", 10.0); 
     67    if (recvFieldTimeout < 0.0) 
     68      ERROR("CXios::parseXiosConfig()", "recv_field_timeout cannot be negative."); 
    6569 
    6670    globalComm=MPI_COMM_WORLD ; 
  • XIOS/trunk/src/cxios.hpp

    r719 r1029  
    4545     static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible) 
    4646     static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers 
     47     static double recvFieldTimeout; //!< Time to wait for data before issuing an error when receiving a field 
    4748 
    4849    public: 
  • XIOS/trunk/src/filter/store_filter.cpp

    r1006 r1029  
    2424    CTimer timer("CStoreFilter::getPacket"); 
    2525    CConstDataPacketPtr packet; 
    26     const double timeout = 10 ; // 10 seconds timeout 
     26    const double timeout = CXios::recvFieldTimeout; 
    2727 
    2828    do 
Note: See TracChangeset for help on using the changeset viewer.