Changeset 1157


Ignore:
Timestamp:
06/06/17 17:09:31 (3 years ago)
Author:
yushan
Message:

branch re-merged with trunk @1156

Location:
XIOS/dev/branch_yushan_merged
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/make_xios

    r984 r1157  
    4747         "--job")   job=$2              ; shift ; shift ;; 
    4848         "--netcdf_lib")   netcdf_lib=$2 ; shift ; shift ;; 
    49          "--memtrack")   use_memtrack="true" ; shift ;; 
    50          *)         code="$1"           ; shift ;; 
    51       esac 
    52    done 
     49         "--memtrack")  use_memtrack="true" memtrack=$2  ; shift ; shift ;; 
     50          *)         code="$1"           ; shift ;; 
     51       esac 
     52    done 
    5353 
    5454# Installation des sources 
     
    172172if [[ "$use_memtrack" == "true" ]] 
    173173   then 
    174    XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB" 
    175174   XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK" 
     175   if [[ "$memtrack" == "light" ]] 
     176    then 
     177        XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT" 
     178    elif [[ "$memtrack" == "FULL"  ]] 
     179    then 
     180      XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB" 
     181      XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_FULL" 
     182    else 
     183        echo "Bad choice for --memtrack argument : choose between 'light','full'" 
     184        exit 
     185    fi 
    176186fi  
    177187 
  • XIOS/dev/branch_yushan_merged/src/client.cpp

    r1156 r1157  
    292292         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 ; 
    293293         report(100)<<CTimer::getAllCumulatedTime()<<endl ; 
    294       }       
     294       }       
    295295*/ 
    296296   } 
  • XIOS/dev/branch_yushan_merged/src/cxios.cpp

    r1156 r1157  
    163163       delete globalRegistry ; 
    164164     } 
    165  
    166165#ifdef XIOS_MEMTRACK 
     166 
     167#ifdef XIOS_MEMTRACK_LIGHT 
     168       #pragma omp critical (_output) 
     169       report(10) << " Memory report : current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 
     170       #pragma omp critical (_output) 
     171       report(10) << " Memory report : maximum memory used by XIOS : "<<  MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 
     172#endif 
     173 
     174#ifdef XIOS_MEMTRACK_FULL 
    167175 
    168176#ifdef XIOS_MEMTRACK_LIGHT 
     
    239247    CServer::finalize(); 
    240248 
     249    CServer::finalize(); 
    241250#ifdef XIOS_MEMTRACK 
    242251 
    243252#ifdef XIOS_MEMTRACK_LIGHT 
    244253       #pragma omp critical (_output) 
    245        { 
    246          report(10) << " Memory report : current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 
    247          report(10) << " Memory report : maximum memory used by XIOS : "<<  MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 
    248        } 
     254       report(10) << " Memory report : current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 
     255       #pragma omp critical (_output) 
     256       report(10) << " Memory report : maximum memory used by XIOS : "<<  MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ; 
    249257#endif 
    250258 
     
    253261     MemTrack::TrackDumpBlocks(); 
    254262#endif 
    255 #endif 
     263 
     264#endif  
    256265    CServer::closeInfoStream(); 
    257266  } 
  • XIOS/dev/branch_yushan_merged/src/io/nc4_data_output.cpp

    r1156 r1157  
    18331833 
    18341834         singleDomain = (file->nbDomains == 1); 
    1835  
    18361835         StdString conv_str ; 
    18371836         if (file->convention_str.isEmpty()) 
     
    18411840         } 
    18421841         else conv_str=file->convention_str ; 
    1843             
     1842 
     1843 
    18441844         try 
    18451845         { 
     
    22742274                } 
    22752275 
    2276  
    22772276                CTimer::get("Files : writing data").resume(); 
    22782277                SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1, &start, &count); 
  • XIOS/dev/branch_yushan_merged/src/io/onetcdf4.cpp

    r1156 r1157  
    5757            CTimer::get("Files : create").resume(); 
    5858            if (wmpi) 
    59                //CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), MPI_INFO_NULL_STD, this->ncidp);            
    60                CNetCdfInterface::createPar(filename, mode, *comm, MPI_INFO_NULL_STD, this->ncidp);            
     59               CNetCdfInterface::createPar(filename, mode, *comm, MPI_INFO_NULL_STD, this->ncidp); 
    6160            else 
    6261               CNetCdfInterface::create(filename, mode, this->ncidp); 
  • XIOS/dev/branch_yushan_merged/src/io/onetcdf4_impl.hpp

    r1156 r1157  
    44#include "onetcdf4.hpp" 
    55#include "netCdfInterface.hpp" 
    6  
     6#include "timer.hpp" 
    77// mpi_std.hpp 
    88 
     
    6060    this->getWriteDataInfos(name, record, array_size,  sstart, scount, start, count); 
    6161    CTimer::get("CONetCDF4::writeData getWriteDataInfos").suspend(); 
    62   
    6362    if (data.numElements()*stringArrayLen != array_size) 
    6463    { 
  • XIOS/dev/branch_yushan_merged/src/node/context.cpp

    r1156 r1157  
    1616#include "timer.hpp" 
    1717#include "memtrack.hpp" 
    18  
    1918 
    2019namespace xios { 
     
    12121211   { 
    12131212      calendar->update(step); 
    1214       #ifdef XIOS_MEMTRACK_LIGHT 
     1213#ifdef XIOS_MEMTRACK_LIGHT 
     1214      #pragma omp critical (_output) 
    12151215      info(50) << " Current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte, at timestep "<<step<<" of context "<<this->getId()<<endl ; 
    12161216#endif 
     1217 
    12171218      if (hasClient) 
    12181219      { 
  • XIOS/dev/branch_yushan_merged/src/node/field.cpp

    r1156 r1157  
    125125  void CField::sendUpdateData(const CArray<double,1>& data) 
    126126  { 
    127     CTimer::get("Field : send data").resume(); 
     127    CTimer::get("XIOS send data").resume(); 
    128128 
    129129    CContext* context = CContext::getCurrent(); 
     
    177177    } 
    178178 
    179     CTimer::get("Field : send data").suspend(); 
     179    CTimer::get("XIOS send data").suspend(); 
    180180  } 
    181181 
  • XIOS/dev/branch_yushan_merged/src/timer.cpp

    r1156 r1157  
    66#include <sstream> 
    77#include "tracer.hpp" 
     8#include <iostream> 
     9#include <sstream> 
    810 
    911namespace xios 
     
    6163    // return it->second; 
    6264 
    63     if(allTimer_ptr == NULL) allTimer_ptr = new std::map<std::string,CTimer>; 
     65    if(allTimer_ptr == 0) allTimer_ptr = new std::map<std::string,CTimer>; 
    6466 
    6567    std::map<std::string,CTimer>::iterator it = (*allTimer_ptr).find(name); 
     
    7173  string CTimer::getAllCumulatedTime(void) 
    7274  { 
     75    if(allTimer_ptr == 0) allTimer_ptr = new std::map<std::string,CTimer>; 
     76 
    7377    std::ostringstream strOut ; 
    74     for(std::map<std::string,CTimer>::iterator it=allTimer.begin();it!=allTimer.end();++it) 
     78    for(std::map<std::string,CTimer>::iterator it=(*allTimer_ptr).begin();it!=(*allTimer_ptr).end();++it) 
    7579      strOut<<"Timer : "<<it->first<<"    -->   cumulated time : "<<it->second.getCumulatedTime()<<std::endl ; 
    7680    return strOut.str() ; 
    7781  } 
     82 
    7883} 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp

    r1156 r1157  
    4040    int currentlocalIndex = 0; 
    4141    double currentWeight  = 0.0;     
     42 
    4243 
    4344    for (int idx = 0; idx < nbLocalIndex; ++idx) 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp

    r1156 r1157  
    3636  { 
    3737    int nbLocalIndex = localIndex.size(); 
    38     int currentlocalIndex = 0;     
     38    int currentlocalIndex = 0; 
     39 
    3940    for (int idx = 0; idx < nbLocalIndex; ++idx) 
    4041    { 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp

    r1156 r1157  
    3636  { 
    3737    int nbLocalIndex = localIndex.size(); 
    38     int currentlocalIndex = 0;     
     38    int currentlocalIndex = 0; 
     39 
    3940    for (int idx = 0; idx < nbLocalIndex; ++idx) 
    4041    { 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp

    r1156 r1157  
    3636  { 
    3737    int nbLocalIndex = localIndex.size(); 
    38     int currentlocalIndex = 0;     
     38    int currentlocalIndex = 0; 
    3939   
    4040    for (int idx = 0; idx < nbLocalIndex; ++idx) 
Note: See TracChangeset for help on using the changeset viewer.