Changeset 317


Ignore:
Timestamp:
02/20/12 19:43:51 (9 years ago)
Author:
ymipsl
Message:

Buffer client and buffer size may now be defining from iodex.xml file.
Defaults values are also specified.

YM

Location:
XIOS/trunk/src
Files:
6 edited

Legend:

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

    r300 r317  
    33#include "buffer_out.hpp" 
    44#include "buffer_client.hpp" 
     5#include "cxios.hpp" 
    56#include <mpi.h> 
    67 
    78namespace xmlioserver 
    89{ 
    9   int CClientBuffer::bufferSizeByServer=50*1024*1024 ; 
    10 //  int CClientBuffer::bufferSizeByServer=1024*10 ; 
    11  
     10  
    1211  CClientBuffer::CClientBuffer(MPI_Comm interComm_,int serverRank_) 
    1312  { 
     13    bufferSizeByServer=CXios::bufferSize ; 
     14    cout<<"bufferSizeByServer"<<bufferSizeByServer<<endl ; 
    1415    interComm=interComm_ ; 
    1516    serverRank=serverRank_ ; 
  • XIOS/trunk/src/buffer_client.hpp

    r300 r317  
    2929    bool pending ; 
    3030     
    31     static int bufferSizeByServer ; 
     31    size_t bufferSizeByServer ; 
    3232     
    3333    MPI_Request request ; 
  • XIOS/trunk/src/buffer_server.cpp

    r300 r317  
    22#include "exception.hpp" 
    33#include "buffer_server.hpp" 
     4#include "cxios.hpp" 
    45 
    56namespace xmlioserver 
    67{ 
    7   size_t CServerBuffer::bufferSizeByClient=100*1024*1024 ; 
    8 //  size_t CServerBuffer::bufferSizeByClient=20*1024 ; 
    98 
    109  CServerBuffer::CServerBuffer(void) 
    1110  { 
     11    bufferSizeByClient=CXios::bufferSize*CXios::bufferServerFactorSize ; 
    1212    size=bufferSizeByClient ; 
    1313    first=0 ; 
  • XIOS/trunk/src/buffer_server.hpp

    r300 r317  
    2626    size_t end ; 
    2727    size_t size ; 
    28     static size_t bufferSizeByClient ; 
     28    size_t bufferSizeByClient ; 
    2929  } ; 
    3030   
  • XIOS/trunk/src/cxios.cpp

    r311 r317  
    1818  bool CXios::usingOasis ; 
    1919  bool CXios::usingServer ;    
     20  size_t CXios::bufferSize ; 
     21  double CXios::bufferServerFactorSize=2 ; 
     22  size_t CXios::defaultBufferSize=1024*1024*100 ; // 100Mo 
     23  double CXios::defaultBufferServerFactorSize=2 ; 
    2024   
    2125  void CXios::initialize() 
     
    2529    usingOasis=getin<bool>("using_oasis",false) ; 
    2630    info.setLevel(getin<int>("info_level",0)) ; 
     31    bufferSize=getin<size_t>("buffer_size",defaultBufferSize) ; 
     32    bufferServerFactorSize=getin<double>("buffer_server_factor_size",defaultBufferServerFactorSize) ; 
    2733    globalComm=MPI_COMM_WORLD ; 
    2834  } 
  • XIOS/trunk/src/cxios.hpp

    r311 r317  
    3434     static bool usingOasis ; 
    3535     static bool usingServer ;    
     36     static size_t bufferSize ; 
     37     static size_t defaultBufferSize ; 
     38     static double bufferServerFactorSize ; 
     39     static double defaultBufferServerFactorSize ; 
    3640         
    3741  } ; 
Note: See TracChangeset for help on using the changeset viewer.