Ignore:
Timestamp:
10/13/22 11:24:30 (21 months ago)
Author:
jderouillat
Message:

Update the memory log system using plotly and CSV files, a dedicated viewer has been added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/mem_checker.cpp

    r2418 r2419  
    7777    int rk = 0; 
    7878    MPI_Comm_rank( MPI_COMM_WORLD, &rk ); 
    79     std::string logName("mem_"+std::to_string(rk)+".js"); 
     79    std::string logName("xios_memory_"+std::to_string(rk)+".csv"); 
    8080    double mem = getMemRSS(); 
    8181    if (!mem) { 
    8282      fout.open( logName ); 
    83       fout << "function get_xios_mem_data() {" << std::endl; 
    84       fout << "  return [" << std::endl; 
     83      fout << "time,event,memory" << std::endl; 
    8584    } 
    8685    else 
     
    9089 
    9190    // Time format : YYYY-MM-DD HH:MM:SS.XXX -> seconds * 1000. 
    92     fout << "        [ " << (MPI_Wtime()-time_init_)*1000. << ", \"" << id << "\"," << mem/1000000. << "]," << std::endl; 
     91    fout << (MPI_Wtime()-time_init_)*1000. << "," << id << "," << mem/1000000. << std::endl; 
    9392 
    94     if (finalizeLog) 
    95     { 
    96       fout << "  ];" << std::endl; 
    97       fout << "}" << std::endl; 
    98     } 
    9993    fout.close(); 
    10094  } 
Note: See TracChangeset for help on using the changeset viewer.