Changeset 1160


Ignore:
Timestamp:
06/06/17 19:06:45 (7 years ago)
Author:
yushan
Message:

fix bad commit. Back to R1155 branch not merged

Location:
XIOS/dev/branch_yushan_merged
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/arch/arch-local.env

    r1156 r1160  
    33export HDF5_LIB_DIR=$HOME/LIB/hdf5-1.8.16/hdf5/lib 
    44 
    5 export NETCDF_INC_DIR=$HOME/LIB/netcdf-fortran-4.4.3/fortran 
    6 export NETCDF_LIB_DIR=$HOME/LIB/netcdf-fortran-4.4.3/fortran 
     5export NETCDF_INC_DIR=/usr/local/include 
     6export NETCDF_LIB_DIR=/usr/local/lib 
    77 
  • XIOS/dev/branch_yushan_merged/extern/src_ep_dev/ep_declaration.hpp

    r1156 r1160  
    5959extern ep_lib::MPI_Status MPI_STATUS_IGNORE; 
    6060extern ep_lib::MPI_Request MPI_REQUEST_NULL; 
    61 extern ep_lib::MPI_Info MPI_INFO_NULL; 
     61//extern ep_lib::MPI_Info MPI_INFO_NULL; 
    6262 
    6363#endif // EP_DECLARATION_HPP_INCLUDED 
  • XIOS/dev/branch_yushan_merged/src/client.cpp

    r1157 r1160  
    2828    StdOFStream CClient::m_errorStream; 
    2929 
    30     StdOFStream CClient::array_infoStream[16]; 
     30    StdOFStream CClient::array_infoStream[10]; 
    3131 
    3232    void CClient::initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm) 
     
    5252          } 
    5353          CTimer::get("XIOS").resume() ; 
    54           CTimer::get("XIOS init/finalize").resume() ; 
     54          CTimer::get("XIOS init").resume() ; 
    5555          boost::hash<string> hashString ; 
    5656 
     
    151151 
    152152        CTimer::get("XIOS").resume() ; 
    153         CTimer::get("XIOS init/finalize").resume() ; 
     153        CTimer::get("XIOS init").resume() ; 
    154154 
    155155        if (CXios::usingServer) 
     
    269269      MPI_Comm_free(&intraComm); 
    270270 
    271       CTimer::get("XIOS init/finalize").suspend() ; 
     271      CTimer::get("XIOS finalize").suspend() ; 
    272272      CTimer::get("XIOS").suspend() ; 
    273273 
     
    283283  /*    #pragma omp critical (_output) 
    284284      { 
    285          report(0) <<" Performance report : Whole time from XIOS init and finalize: "<< CTimer::get("XIOS init/finalize").getCumulatedTime()<<" s"<<endl ; 
    286285         report(0) <<"     Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ; 
    287286         report(0)<< "     Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ; 
     
    291290         report(0)<< "     Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ; 
    292291         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 ; 
    293          report(100)<<CTimer::getAllCumulatedTime()<<endl ; 
    294292       }       
    295293*/ 
  • XIOS/dev/branch_yushan_merged/src/client.hpp

    r1156 r1160  
    5858        #pragma omp threadprivate(m_errorStream) 
    5959 
    60         static StdOFStream array_infoStream[16]; 
     60        static StdOFStream array_infoStream[10]; 
    6161 
    6262        static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb); 
  • XIOS/dev/branch_yushan_merged/src/config/file_attribute.conf

    r1156 r1160  
    1414DECLARE_ENUM2(format,        netcdf4, netcdf4_classic) 
    1515DECLARE_ENUM2(convention,    CF, UGRID) 
    16 DECLARE_ATTRIBUTE(StdString, convention_str) 
    1716DECLARE_ENUM2(par_access,    collective, independent) 
    1817DECLARE_ATTRIBUTE(bool,      append) 
  • XIOS/dev/branch_yushan_merged/src/cxios.cpp

    r1157 r1160  
    163163       delete globalRegistry ; 
    164164     } 
     165     CClient::closeInfoStream(); 
     166   
     167 
    165168#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 
    175169 
    176170#ifdef XIOS_MEMTRACK_LIGHT 
     
    182176     MemTrack::TrackListMemoryUsage() ; 
    183177     MemTrack::TrackDumpBlocks(); 
    184 #endif 
    185  
    186      CClient::closeInfoStream(); 
    187  
    188178#endif 
    189179  } 
     
    245235       delete globalRegistry ; 
    246236     } 
     237 
    247238    CServer::finalize(); 
    248  
    249     CServer::finalize(); 
    250 #ifdef XIOS_MEMTRACK 
    251  
    252 #ifdef XIOS_MEMTRACK_LIGHT 
    253        #pragma omp critical (_output) 
    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 ; 
    257 #endif 
    258  
    259 #ifdef XIOS_MEMTRACK_FULL 
    260      MemTrack::TrackListMemoryUsage() ; 
    261      MemTrack::TrackDumpBlocks(); 
    262 #endif 
    263  
    264 #endif  
     239         
    265240    CServer::closeInfoStream(); 
    266241  } 
  • XIOS/dev/branch_yushan_merged/src/io/nc4_data_output.cpp

    r1157 r1160  
    1111#include "netCdfException.hpp" 
    1212#include "exception.hpp" 
    13 #include "timer.hpp" 
    1413#include "uuid.hpp" 
    1514// mpi.hpp 
     
    18331832 
    18341833         singleDomain = (file->nbDomains == 1); 
    1835          StdString conv_str ; 
    1836          if (file->convention_str.isEmpty()) 
    1837          { 
    1838             if (SuperClassWriter::useCFConvention) conv_str="CF-1.6" ; 
    1839             else conv_str="UGRID" ; 
    1840          } 
    1841          else conv_str=file->convention_str ; 
    1842  
    1843  
    18441834         try 
    18451835         { 
    1846            this->writeFileAttributes(filename, description, 
    1847                                       conv_str, 
    1848                                       StdString("An IPSL model"), 
    1849                                       this->getTimeStamp()); 
     1836       if (SuperClassWriter::useCFConvention) 
     1837             this->writeFileAttributes(filename, description, 
     1838                                       StdString("CF-1.6"), 
     1839                                       StdString("An IPSL model"), 
     1840                                       this->getTimeStamp()); 
     1841           else 
     1842             this->writeFileAttributes(filename, description, 
     1843                                       StdString("UGRID"), 
     1844                                       StdString("An IPSL model"), 
     1845                                       this->getTimeStamp()); 
     1846 
    18501847 
    18511848           if (!appendMode) 
     
    19921989        CGrid* grid = field->grid; 
    19931990 
    1994         if (field->getNStep()<1)  
    1995         { 
    1996           return; 
    1997         } 
     1991        if (field->getNStep()<1) return ; 
    19981992         
    19991993        if (!grid->doGridHaveDataToWrite()) 
    2000           if (SuperClass::type == MULTI_FILE || !isCollective) 
    2001           { 
    2002             return; 
    2003           } 
    2004  
    2005            
     1994          if (SuperClass::type == MULTI_FILE || !isCollective) return; 
     1995 
    20061996        StdString fieldid = field->getFieldOutputName(); 
    20071997 
     
    21282118              case (MULTI_FILE) : 
    21292119              { 
    2130                  CTimer::get("Files : writing data").resume(); 
    21312120                 SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1); 
    2132                  CTimer::get("Files : writing data").suspend(); 
    21332121                 if (wtime) 
    21342122                 { 
    2135                    CTimer::get("Files : writing time axis").resume(); 
    21362123                   if ( wtimeData) 
    21372124                   { 
    2138 //                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1); 
    2139 //                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1); 
    2140                        SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot); 
    2141                        SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot); 
    2142                   } 
     2125                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1); 
     2126                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1); 
     2127                   } 
    21432128                   if (wtimeCounter) 
    21442129                   { 
    2145 //                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1); 
    2146 //                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1); 
    2147                      SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot); 
    2148                      if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot); 
     2130                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1); 
     2131                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1); 
    21492132                   } 
    2150                    CTimer::get("Files : writing time axis").suspend(); 
    21512133                 } 
    21522134                 break; 
     
    22742256                } 
    22752257 
    2276                 CTimer::get("Files : writing data").resume(); 
    22772258                SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1, &start, &count); 
    2278                 CTimer::get("Files : writing data").suspend(); 
    2279  
    22802259                 if (wtime) 
    22812260                 { 
    2282                    CTimer::get("Files : writing time axis").resume(); 
    22832261                   if ( wtimeData) 
    22842262                   { 
    2285 //                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1); 
    2286 //                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1); 
    2287                      SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot); 
    2288                      SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot); 
     2263                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1); 
     2264                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1); 
    22892265                   } 
    22902266                   if (wtimeCounter) 
    22912267                   { 
    2292 //                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1); 
    2293 //                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1); 
    2294                      SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot); 
    2295                      if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot); 
    2296  
     2268                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1); 
     2269                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1); 
    22972270                   } 
    2298                    CTimer::get("Files : writing time axis").suspend();   
    22992271                 } 
    23002272 
  • XIOS/dev/branch_yushan_merged/src/io/onetcdf4.cpp

    r1157 r1160  
    66#include "netCdfInterface.hpp" 
    77#include "netCdfException.hpp" 
    8 #include "timer.hpp" 
    98// mpi_std.hpp 
    109 
     
    5554         if (!append || !std::ifstream(filename.c_str())) 
    5655         { 
    57             CTimer::get("Files : create").resume(); 
    5856            if (wmpi) 
    5957               CNetCdfInterface::createPar(filename, mode, *comm, MPI_INFO_NULL_STD, this->ncidp); 
    6058            else 
    6159               CNetCdfInterface::create(filename, mode, this->ncidp); 
    62             CTimer::get("Files : create").suspend(); 
    63   
     60 
    6461            this->appendMode = false; 
    6562         } 
     
    6764         { 
    6865            mode |= NC_WRITE; 
    69             CTimer::get("Files : open").resume(); 
    7066            if (wmpi) 
    7167               //CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), MPI_INFO_NULL_STD, this->ncidp); 
     
    7369            else 
    7470               CNetCdfInterface::open(filename, mode, this->ncidp); 
    75             CTimer::get("Files : open").suspend(); 
     71 
    7672            this->appendMode = true; 
    7773         } 
     
    8783      void CONetCDF4::close() 
    8884      { 
    89         CTimer::get("Files : close").resume(); 
    9085        CNetCdfInterface::close(this->ncidp); 
    91         CTimer::get("Files : close").suspend(); 
    9286      } 
    9387 
     
    564558 
    565559         this->getWriteDataInfos(name, 0, array_size,  sstart, scount, NULL, NULL); 
    566  
    567560         this->writeData_(grpid, varid, sstart, scount, data.dataFirst()); 
    568  
    569561      } 
    570562 
     
    592584 
    593585         this->getWriteDataInfos(name, record, array_size,  sstart, scount, NULL, NULL); 
     586         if (using_netcdf_internal) 
     587         { 
     588           if (!isRoot) 
     589           { 
     590             sstart[0] = sstart[0] + 1; 
     591             scount[0] = 0; 
     592           } 
     593         } 
    594594         this->writeData_(grpid, varid, sstart, scount, data.dataFirst()); 
    595595       } 
    596596 
    597       void CONetCDF4::writeTimeAxisDataBounds(const CArray<double, 1>& data, const StdString& name, 
    598                                         bool collective, StdSize record, bool isRoot) 
    599       { 
    600          int grpid = this->getCurrentGroup(); 
    601          int varid = this->getVariable(name); 
    602  
    603          map<int,size_t>::iterator it=timeAxis.find(varid); 
    604          if (it == timeAxis.end()) timeAxis[varid] = record; 
    605          else 
    606          { 
    607            if (it->second >= record) return; 
    608            else it->second =record; 
    609          } 
    610  
    611          StdSize array_size = 1; 
    612          std::vector<StdSize> sstart, scount; 
    613  
    614          if (this->wmpi && collective) 
    615             CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE); 
    616          if (this->wmpi && !collective) 
    617             CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT); 
    618  
    619          this->getWriteDataInfos(name, record, array_size,  sstart, scount, NULL, NULL); 
    620          this->writeData_(grpid, varid, sstart, scount, data.dataFirst()); 
    621        } 
    622  
    623  
    624597      //--------------------------------------------------------------- 
    625598 
  • XIOS/dev/branch_yushan_merged/src/io/onetcdf4.hpp

    r1156 r1160  
    7373            void writeTimeAxisData(const CArray<double,1>& data, const StdString& name, 
    7474                                   bool collective, StdSize record, bool Isroot); 
    75             void writeTimeAxisDataBounds(const CArray<double,1>& data, const StdString& name, 
    76                                    bool collective, StdSize record, bool Isroot); 
    7775            /// Accesseur /// 
    7876            const CONetCDF4Path& getCurrentPath(void) const; 
  • XIOS/dev/branch_yushan_merged/src/io/onetcdf4_impl.hpp

    r1157 r1160  
    2525    CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT); 
    2626 
    27     CTimer::get("Files : get data infos").resume(); 
    2827    this->getWriteDataInfos 
    2928    (name, record, array_size,  sstart, scount, start, count); 
    30     CTimer::get("Files : get data infos").suspend(); 
    31  
    3229    if (data.numElements() != array_size) 
    3330    { 
     
    5754    CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT); 
    5855 
    59     CTimer::get("CONetCDF4::writeData getWriteDataInfos").resume(); 
    60     this->getWriteDataInfos(name, record, array_size,  sstart, scount, start, count); 
    61     CTimer::get("CONetCDF4::writeData getWriteDataInfos").suspend(); 
     56    this->getWriteDataInfos 
     57    (name, record, array_size,  sstart, scount, start, count); 
    6258    if (data.numElements()*stringArrayLen != array_size) 
    6359    { 
     
    7672      PtrArrayStr[it->size()]='\0' ; 
    7773    } 
    78     CTimer::get("CONetCDF4::writeData writeData_").resume(); 
    7974    this->writeData_(grpid, varid, sstart, scount, ArrayStr); 
    80     CTimer::get("CONetCDF4::writeData writeData_").suspend(); 
    8175    delete [] ArrayStr ; 
    8276  } 
  • XIOS/dev/branch_yushan_merged/src/log.cpp

    r1156 r1160  
    77{ 
    88 
    9   std::filebuf* info_FB[16]; 
     9  std::filebuf* info_FB[10]; 
    1010 
    1111 
  • XIOS/dev/branch_yushan_merged/src/log.hpp

    r1156 r1160  
    1919    { 
    2020      omp_init_lock( &mutex ); 
    21       for(int i=0; i<16; i++) 
     21      for(int i=0; i<10; i++) 
    2222        strBuf_array[i] = sBuff; 
    2323    } 
     
    6161    string name ; 
    6262    std::streambuf* strBuf_; 
    63     std::streambuf* strBuf_array[16]; 
     63    std::streambuf* strBuf_array[10]; 
    6464    omp_lock_t mutex; 
    6565  }; 
     
    7070 
    7171 
    72   extern std::filebuf* info_FB[16]; 
     72  extern std::filebuf* info_FB[10]; 
    7373 
    7474 
  • XIOS/dev/branch_yushan_merged/src/memtrack.cpp

    r1156 r1160  
    5252{ 
    5353  void addr2line(const char *file_name, char** addr, int naddr) ; 
    54 #ifdef XIOS_MEMTRACK_LIGHT 
    55   void addr2line(const char *file_name, char** addr, int naddr) {}  
    56 #endif 
    5754} 
    5855/* ------------------------------------------------------------ */ 
     
    6259namespace MemTrack 
    6360{ 
    64     size_t currentMemorySize=0 ; 
    65     size_t maxMemorySize=0 ;  
    66  
    67     size_t getCurrentMemorySize(void) {return currentMemorySize; } 
    68     size_t getMaxMemorySize(void) {return maxMemorySize ; } 
    6961 
    7062    /* ------------------------------------------------------------ */ 
     
    384376        // Get the offset to the user chunk and return it. 
    385377        UserChunk *pUser = GetUserAddress(pProlog); 
    386  
    387         currentMemorySize += size ; 
    388         if (currentMemorySize>maxMemorySize) maxMemorySize=currentMemorySize ; 
    389378         
    390379        return pUser; 
     
    412401        // Unlink the block header from the list and destroy it. 
    413402        BlockHeader *pBlockHeader = GetHeaderAddress(pProlog); 
    414         currentMemorySize-=pBlockHeader->GetRequestedSize(); 
    415403        BlockHeader::RemoveNode(pBlockHeader); 
    416404        pBlockHeader->~BlockHeader(); 
  • XIOS/dev/branch_yushan_merged/src/memtrack.hpp

    r1156 r1160  
    6161    void TrackDumpBlocks(); 
    6262    void TrackListMemoryUsage(); 
    63     size_t getCurrentMemorySize(void) ; 
    64     size_t getMaxMemorySize(void) ; 
     63 
    6564    /* ---------------------------------------- operator * (MemStamp, ptr) */ 
    6665 
  • XIOS/dev/branch_yushan_merged/src/node/context.cpp

    r1157 r1160  
    1414#include "type.hpp" 
    1515#include "xios_spl.hpp" 
    16 #include "timer.hpp" 
    17 #include "memtrack.hpp" 
    1816 
    1917namespace xios { 
     
    403401   void CContext::closeDefinition(void) 
    404402   { 
    405      CTimer::get("Context : close definition").resume() ; 
    406403     // There is nothing client need to send to server 
    407404     if (hasClient) 
     
    457454      startPrefetchingOfEnabledReadModeFiles(); 
    458455    } 
    459     CTimer::get("Context : close definition").suspend() ; 
    460456   } 
    461457 
     
    12111207   { 
    12121208      calendar->update(step); 
    1213 #ifdef XIOS_MEMTRACK_LIGHT 
    1214       #pragma omp critical (_output) 
    1215       info(50) << " Current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte, at timestep "<<step<<" of context "<<this->getId()<<endl ; 
    1216 #endif 
     1209 
    12171210 
    12181211      if (hasClient) 
  • XIOS/dev/branch_yushan_merged/src/node/field.cpp

    r1157 r1160  
    125125  void CField::sendUpdateData(const CArray<double,1>& data) 
    126126  { 
    127     CTimer::get("XIOS send data").resume(); 
     127    CTimer::get("XIOS Send Data").resume(); 
    128128 
    129129    CContext* context = CContext::getCurrent(); 
     
    177177    } 
    178178 
    179     CTimer::get("XIOS send data").suspend(); 
     179    CTimer::get("XIOS Send Data").suspend(); 
    180180  } 
    181181 
     
    187187    list<CEventServer::SSubEvent>::iterator it; 
    188188    string fieldId; 
    189     CTimer::get("Field : recv data").resume(); 
     189 
    190190    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it) 
    191191    { 
     
    197197    } 
    198198    get(fieldId)->recvUpdateData(ranks,buffers); 
    199     CTimer::get("Field : recv data").suspend(); 
    200199  } 
    201200 
  • XIOS/dev/branch_yushan_merged/src/node/file.cpp

    r1156 r1160  
    1616#include "context_client.hpp" 
    1717#include "mpi.hpp" 
    18 #include "timer.hpp" 
    1918 
    2019namespace xios { 
     
    275274      if (mode.isEmpty() || mode.getValue() == mode_attr::write) 
    276275      { 
    277         CTimer::get("Files : create headers").resume(); 
    278276        if (!isOpen) createHeader(); 
    279         CTimer::get("Files : create headers").suspend(); 
    280277        checkSync(); 
    281278      } 
    282279      else 
    283280      { 
    284         CTimer::get("Files : open headers").resume(); 
    285281        if (!isOpen) openInReadMode(); 
    286         CTimer::get("Files : open headers").suspend(); 
    287282      } 
    288283      checkSplit(); 
  • XIOS/dev/branch_yushan_merged/src/server.cpp

    r1156 r1160  
    163163      report(0)<<"Performance report : Time spent in processing events : "<<CTimer::get("Process events").getCumulatedTime()<<endl  ; 
    164164      report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl  ; 
    165       report(100)<<CTimer::getAllCumulatedTime()<<endl ; 
    166165    } 
    167166 
  • XIOS/dev/branch_yushan_merged/src/timer.cpp

    r1157 r1160  
    33#include <string> 
    44#include <map> 
    5 #include <iostream> 
    6 #include <sstream> 
    75#include "tracer.hpp" 
    86#include <iostream> 
     
    7169  } 
    7270 
    73   string CTimer::getAllCumulatedTime(void) 
    74   { 
    75     if(allTimer_ptr == 0) allTimer_ptr = new std::map<std::string,CTimer>; 
    76  
    77     std::ostringstream strOut ; 
    78     for(std::map<std::string,CTimer>::iterator it=(*allTimer_ptr).begin();it!=(*allTimer_ptr).end();++it) 
    79       strOut<<"Timer : "<<it->first<<"    -->   cumulated time : "<<it->second.getCumulatedTime()<<std::endl ; 
    80     return strOut.str() ; 
    81   } 
    82  
    8371} 
  • XIOS/dev/branch_yushan_merged/src/timer.hpp

    r1156 r1160  
    2727      static double getTime(void); 
    2828      static CTimer& get(std::string name); 
    29       static std::string getAllCumulatedTime(void) ; 
    3029  }; 
    3130} 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp

    r1157 r1160  
    3939    int nbLocalIndex = localIndex.size(); 
    4040    int currentlocalIndex = 0; 
    41     double currentWeight  = 0.0;     
     41    double currentWeight  = 0.0; 
    4242 
     43    dataOut=std::numeric_limits<double>::quiet_NaN(); 
    4344 
    4445    for (int idx = 0; idx < nbLocalIndex; ++idx) 
     
    5859          weights_(currentlocalIndex) += 1.0; 
    5960        } 
    60       } 
    61       else 
    62       { 
    63         if (flagInitial[currentlocalIndex])  
    64           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    6561      } 
    6662    } 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp

    r1157 r1160  
    3737    int nbLocalIndex = localIndex.size(); 
    3838    int currentlocalIndex = 0; 
    39  
     39    dataOut=std::numeric_limits<double>::quiet_NaN();     
    4040    for (int idx = 0; idx < nbLocalIndex; ++idx) 
    4141    { 
     
    5252          dataOut(currentlocalIndex) = std::max(*(dataInput + idx), dataOut(currentlocalIndex)); 
    5353        } 
    54       } 
    55       else 
    56       { 
    57         if (flagInitial[currentlocalIndex])  
    58           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    5954      } 
    6055    } 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp

    r1157 r1160  
    3737    int nbLocalIndex = localIndex.size(); 
    3838    int currentlocalIndex = 0; 
    39  
     39    dataOut=std::numeric_limits<double>::quiet_NaN(); 
    4040    for (int idx = 0; idx < nbLocalIndex; ++idx) 
    4141    { 
     
    5252          dataOut(currentlocalIndex) = std::min(*(dataInput + idx), dataOut(currentlocalIndex)); 
    5353        } 
    54       } 
    55       else 
    56       { 
    57         if (flagInitial[currentlocalIndex])  
    58           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    5954      } 
    6055    } 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp

    r1157 r1160  
    3737    int nbLocalIndex = localIndex.size(); 
    3838    int currentlocalIndex = 0; 
     39 
     40    dataOut=std::numeric_limits<double>::quiet_NaN(); 
    3941   
    4042    for (int idx = 0; idx < nbLocalIndex; ++idx) 
     
    5254          dataOut(currentlocalIndex) += *(dataInput + idx); 
    5355        } 
    54       } 
    55       else 
    56       { 
    57         if (flagInitial[currentlocalIndex])  
    58           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    5956      } 
    6057    }     
  • XIOS/dev/branch_yushan_merged/src/transformation/generic_algorithm_transformation.cpp

    r1156 r1160  
    4545      { 
    4646        dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second; 
    47         flagInitial[localIndex[idx].first] = true; // Reset flag to indicate not all data source are nan 
    48       } 
    49     } 
    50  
    51     // If all data source are nan then data destination must be nan 
    52     for (int idx = 0; idx < nbLocalIndex; ++idx) 
    53     { 
    54       if (!flagInitial[localIndex[idx].first]) 
    55         dataOut(localIndex[idx].first) = defaultValue; 
    56     } 
     47      } 
     48    } 
     49 
     50    // for (int idx = 0; idx < nbLocalIndex; ++idx) 
     51    // { 
     52    //   if (!flagInitial[localIndex[idx].first]) 
     53    //     dataOut(localIndex[idx].first) = defaultValue; 
     54    // } 
    5755  } 
    5856  else 
Note: See TracChangeset for help on using the changeset viewer.