Changeset 2503


Ignore:
Timestamp:
05/12/23 15:46:18 (14 months ago)
Author:
jderouillat
Message:

Add an option called memory_report (in the xios context, default is true) to activate the memory reporting operated at each xios routine call from models

Location:
XIOS2/trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • XIOS2/trunk/src/client.cpp

    r2456 r2503  
    303303      report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ; 
    304304      report(100)<<CTimer::getAllCumulatedTime()<<endl ; 
    305       report(100)<<CMemChecker::getAllCumulatedMem()<<endl ; 
     305      if (CXios::reportMemory) 
     306      { 
     307        report(100)<<CMemChecker::getAllCumulatedMem()<<endl ; 
     308      } 
    306309   } 
    307310 
  • XIOS2/trunk/src/cxios.cpp

    r2439 r2503  
    4848  bool CXios::checkSumSend=false ; 
    4949  bool CXios::logMemory=false ; 
     50  bool CXios::reportMemory=true ; 
    5051  
    5152  //! Parse configuration file and create some objects from it 
     
    112113 
    113114    logMemory = getin<bool>("log_memory", false); 
     115    reportMemory = getin<bool>("memory_report", true); 
    114116  
    115117    globalComm=MPI_COMM_WORLD ; 
  • XIOS2/trunk/src/cxios.hpp

    r2428 r2503  
    6060     static bool checkSumRecv; //!< For debugging, compute a checksum of fields received by the model through the XIOS client 
    6161 
    62      static bool logMemory; //!< Activate memory monitoring for all XIOS process 
     62     static bool logMemory; //!< Activate memory monitoring for all XIOS process (generate CSV file for https://forge.ipsl.jussieu.fr/ioserver/chrome/site/XIOS_TOOLS/xios_memory.html) 
     63     static bool reportMemory; //!< Activate memory reporting for all XIOS process (report in log files) 
    6364 
    6465    public: 
  • XIOS2/trunk/src/mem_checker.cpp

    r2429 r2503  
    4444  { 
    4545    std::vector<double> memories(0); 
     46    if ( !CXios::reportMemory ) return memories ; 
    4647    memories.clear(); 
    4748     
  • XIOS2/trunk/src/server.cpp

    r2428 r2503  
    434434      report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl  ; 
    435435      report(100)<<CTimer::getAllCumulatedTime()<<endl ; 
    436       report(100)<<CMemChecker::getAllCumulatedMem()<<endl ; 
     436      if (CXios::reportMemory) 
     437      { 
     438        report(100)<<CMemChecker::getAllCumulatedMem()<<endl ; 
     439      } 
     440 
    437441    } 
    438442 
Note: See TracChangeset for help on using the changeset viewer.