Ignore:
Timestamp:
07/10/17 18:17:04 (7 years ago)
Author:
yushan
Message:

branch merged with trunk @1200

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/src/node/file.cpp

    r1172 r1205  
    1616#include "context_client.hpp" 
    1717#include "mpi.hpp" 
     18#include "timer.hpp" 
    1819 
    1920namespace xios { 
     
    274275      if (mode.isEmpty() || mode.getValue() == mode_attr::write) 
    275276      { 
     277        CTimer::get("Files : create headers").resume(); 
    276278        if (!isOpen) createHeader(); 
     279        CTimer::get("Files : create headers").suspend(); 
    277280        checkSync(); 
    278281      } 
    279282      else 
    280283      { 
     284        CTimer::get("Files : open headers").resume(); 
    281285        if (!isOpen) openInReadMode(); 
     286        CTimer::get("Files : open headers").suspend(); 
    282287      } 
    283288      checkSplit(); 
     
    395400         if (!split_freq.isEmpty()) 
    396401         { 
    397            CDate splitEnd = lastSplit + split_freq - 1 * Second; 
     402           CDate split_start ; 
     403           CDate splitEnd ; 
     404           if (!split_start_offset.isEmpty()) split_start=lastSplit + split_start_offset ; 
     405           else split_start=lastSplit ; 
     406 
     407           splitEnd = lastSplit + split_freq ; 
     408           if (!split_last_date.isEmpty()) 
     409           { 
     410             CDate splitLastDate=CDate::FromString(split_last_date,*CContext::getCurrent()->getCalendar()) ; 
     411             if( splitLastDate < splitEnd)  splitEnd=splitLastDate ; 
     412           } 
     413             
     414           if (!split_end_offset.isEmpty()) splitEnd = splitEnd + split_end_offset; 
     415           else splitEnd = splitEnd - 1 * Second; 
    398416 
    399417           string splitFormat; 
     
    410428 
    411429           oss << firstPart ; 
    412            if (hasStartDate) oss << lastSplit.getStr(splitFormat) ; 
     430           if (hasStartDate) oss << split_start.getStr(splitFormat) ; 
    413431           oss << middlePart ; 
    414432           if (hasEndDate) oss << splitEnd.getStr(splitFormat); 
Note: See TracChangeset for help on using the changeset viewer.