Index: /XIOS/dev/branch_yushan_merged/arch/arch-local.env
===================================================================
--- /XIOS/dev/branch_yushan_merged/arch/arch-local.env	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/arch/arch-local.env	(revision 1156)
@@ -3,5 +3,5 @@
 export HDF5_LIB_DIR=$HOME/LIB/hdf5-1.8.16/hdf5/lib
 
-export NETCDF_INC_DIR=/usr/local/include
-export NETCDF_LIB_DIR=/usr/local/lib
+export NETCDF_INC_DIR=$HOME/LIB/netcdf-fortran-4.4.3/fortran
+export NETCDF_LIB_DIR=$HOME/LIB/netcdf-fortran-4.4.3/fortran
 
Index: /XIOS/dev/branch_yushan_merged/extern/src_ep_dev/ep_declaration.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/src_ep_dev/ep_declaration.hpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/extern/src_ep_dev/ep_declaration.hpp	(revision 1156)
@@ -59,5 +59,5 @@
 extern ep_lib::MPI_Status MPI_STATUS_IGNORE;
 extern ep_lib::MPI_Request MPI_REQUEST_NULL;
-//extern ep_lib::MPI_Info MPI_INFO_NULL;
+extern ep_lib::MPI_Info MPI_INFO_NULL;
 
 #endif // EP_DECLARATION_HPP_INCLUDED
Index: /XIOS/dev/branch_yushan_merged/src/client.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/client.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/client.cpp	(revision 1156)
@@ -28,5 +28,5 @@
     StdOFStream CClient::m_errorStream;
 
-    StdOFStream CClient::array_infoStream[10];
+    StdOFStream CClient::array_infoStream[16];
 
     void CClient::initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm)
@@ -52,5 +52,5 @@
           }
           CTimer::get("XIOS").resume() ;
-          CTimer::get("XIOS init").resume() ;
+          CTimer::get("XIOS init/finalize").resume() ;
           boost::hash<string> hashString ;
 
@@ -151,5 +151,5 @@
 
         CTimer::get("XIOS").resume() ;
-        CTimer::get("XIOS init").resume() ;
+        CTimer::get("XIOS init/finalize").resume() ;
 
         if (CXios::usingServer)
@@ -269,5 +269,5 @@
       MPI_Comm_free(&intraComm);
 
-      CTimer::get("XIOS finalize").suspend() ;
+      CTimer::get("XIOS init/finalize").suspend() ;
       CTimer::get("XIOS").suspend() ;
 
@@ -283,4 +283,5 @@
   /*    #pragma omp critical (_output)
       {
+         report(0) <<" Performance report : Whole time from XIOS init and finalize: "<< CTimer::get("XIOS init/finalize").getCumulatedTime()<<" s"<<endl ;
          report(0) <<"     Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ;
          report(0)<< "     Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ;
@@ -290,5 +291,6 @@
          report(0)<< "     Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ;
          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 ;
-       }      
+         report(100)<<CTimer::getAllCumulatedTime()<<endl ;
+      }      
 */
    }
Index: /XIOS/dev/branch_yushan_merged/src/client.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/client.hpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/client.hpp	(revision 1156)
@@ -58,5 +58,5 @@
         #pragma omp threadprivate(m_errorStream)
 
-        static StdOFStream array_infoStream[10];
+        static StdOFStream array_infoStream[16];
 
         static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb);
Index: /XIOS/dev/branch_yushan_merged/src/config/file_attribute.conf
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/config/file_attribute.conf	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/config/file_attribute.conf	(revision 1156)
@@ -14,4 +14,5 @@
 DECLARE_ENUM2(format,        netcdf4, netcdf4_classic)
 DECLARE_ENUM2(convention,    CF, UGRID)
+DECLARE_ATTRIBUTE(StdString, convention_str)
 DECLARE_ENUM2(par_access,    collective, independent)
 DECLARE_ATTRIBUTE(bool,      append)
Index: /XIOS/dev/branch_yushan_merged/src/cxios.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/cxios.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/cxios.cpp	(revision 1156)
@@ -163,10 +163,19 @@
        delete globalRegistry ;
      }
-     CClient::closeInfoStream();
-  
 
 #ifdef XIOS_MEMTRACK
+
+#ifdef XIOS_MEMTRACK_LIGHT
+       report(10) << " Memory report : current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ;
+       report(10) << " Memory report : maximum memory used by XIOS : "<<  MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ;
+#endif
+
+#ifdef XIOS_MEMTRACK_FULL
      MemTrack::TrackListMemoryUsage() ;
      MemTrack::TrackDumpBlocks();
+#endif
+
+     CClient::closeInfoStream();
+
 #endif
   }
@@ -228,7 +237,21 @@
        delete globalRegistry ;
      }
-
     CServer::finalize();
-        
+
+#ifdef XIOS_MEMTRACK
+
+#ifdef XIOS_MEMTRACK_LIGHT
+       #pragma omp critical (_output)
+       {
+         report(10) << " Memory report : current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ;
+         report(10) << " Memory report : maximum memory used by XIOS : "<<  MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ;
+       }
+#endif
+
+#ifdef XIOS_MEMTRACK_FULL
+     MemTrack::TrackListMemoryUsage() ;
+     MemTrack::TrackDumpBlocks();
+#endif
+#endif
     CServer::closeInfoStream();
   }
Index: /XIOS/dev/branch_yushan_merged/src/io/nc4_data_output.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/io/nc4_data_output.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/io/nc4_data_output.cpp	(revision 1156)
@@ -11,4 +11,5 @@
 #include "netCdfException.hpp"
 #include "exception.hpp"
+#include "timer.hpp"
 #include "uuid.hpp"
 // mpi.hpp
@@ -1833,17 +1834,18 @@
          singleDomain = (file->nbDomains == 1);
 
+         StdString conv_str ;
+         if (file->convention_str.isEmpty())
+         {
+            if (SuperClassWriter::useCFConvention) conv_str="CF-1.6" ;
+            else conv_str="UGRID" ;
+         }
+         else conv_str=file->convention_str ;
+           
          try
          {
-       if (SuperClassWriter::useCFConvention)
-             this->writeFileAttributes(filename, description,
-                                       StdString("CF-1.6"),
-                                       StdString("An IPSL model"),
-                                       this->getTimeStamp());
-           else
-             this->writeFileAttributes(filename, description,
-                                       StdString("UGRID"),
-                                       StdString("An IPSL model"),
-                                       this->getTimeStamp());
-
+           this->writeFileAttributes(filename, description,
+                                      conv_str,
+                                      StdString("An IPSL model"),
+                                      this->getTimeStamp());
 
            if (!appendMode)
@@ -1990,9 +1992,16 @@
         CGrid* grid = field->grid;
 
-        if (field->getNStep()<1) return ;
+        if (field->getNStep()<1) 
+        {
+          return;
+        }
         
         if (!grid->doGridHaveDataToWrite())
-          if (SuperClass::type == MULTI_FILE || !isCollective) return;
-
+          if (SuperClass::type == MULTI_FILE || !isCollective)
+          {
+            return;
+          }
+
+          
         StdString fieldid = field->getFieldOutputName();
 
@@ -2119,17 +2128,25 @@
               case (MULTI_FILE) :
               {
+                 CTimer::get("Files : writing data").resume();
                  SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1);
+                 CTimer::get("Files : writing data").suspend();
                  if (wtime)
                  {
+                   CTimer::get("Files : writing time axis").resume();
                    if ( wtimeData)
                    {
-                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
-                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
-                   }
+//                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
+                       SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot);
+                       SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot);
+                  }
                    if (wtimeCounter)
                    {
-                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
-                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
+//                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+                     SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot);
+                     if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot);
                    }
+                   CTimer::get("Files : writing time axis").suspend();
                  }
                  break;
@@ -2257,17 +2274,28 @@
                 }
 
+
+                CTimer::get("Files : writing data").resume();
                 SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1, &start, &count);
+                CTimer::get("Files : writing data").suspend();
+
                  if (wtime)
                  {
+                   CTimer::get("Files : writing time axis").resume();
                    if ( wtimeData)
                    {
-                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
-                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
+                     SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot);
+                     SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot);
                    }
                    if (wtimeCounter)
                    {
-                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
-                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
+//                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+                     SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot);
+                     if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot);
+
                    }
+                   CTimer::get("Files : writing time axis").suspend();  
                  }
 
Index: /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.cpp	(revision 1156)
@@ -6,4 +6,5 @@
 #include "netCdfInterface.hpp"
 #include "netCdfException.hpp"
+#include "timer.hpp"
 // mpi_std.hpp
 
@@ -54,4 +55,5 @@
          if (!append || !std::ifstream(filename.c_str()))
          {
+            CTimer::get("Files : create").resume();
             if (wmpi)
                //CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), MPI_INFO_NULL_STD, this->ncidp);           
@@ -59,5 +61,6 @@
             else
                CNetCdfInterface::create(filename, mode, this->ncidp);
-
+            CTimer::get("Files : create").suspend();
+ 
             this->appendMode = false;
          }
@@ -65,4 +68,5 @@
          {
             mode |= NC_WRITE;
+            CTimer::get("Files : open").resume();
             if (wmpi)
                //CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), MPI_INFO_NULL_STD, this->ncidp);
@@ -70,5 +74,5 @@
             else
                CNetCdfInterface::open(filename, mode, this->ncidp);
-
+            CTimer::get("Files : open").suspend();
             this->appendMode = true;
          }
@@ -84,5 +88,7 @@
       void CONetCDF4::close()
       {
+        CTimer::get("Files : close").resume();
         CNetCdfInterface::close(this->ncidp);
+        CTimer::get("Files : close").suspend();
       }
 
@@ -559,5 +565,7 @@
 
          this->getWriteDataInfos(name, 0, array_size,  sstart, scount, NULL, NULL);
+
          this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
+
       }
 
@@ -585,15 +593,34 @@
 
          this->getWriteDataInfos(name, record, array_size,  sstart, scount, NULL, NULL);
-         if (using_netcdf_internal)
-         {
-           if (!isRoot)
-           {
-             sstart[0] = sstart[0] + 1;
-             scount[0] = 0;
-           }
-         }
          this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
        }
 
+      void CONetCDF4::writeTimeAxisDataBounds(const CArray<double, 1>& data, const StdString& name,
+                                        bool collective, StdSize record, bool isRoot)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(name);
+
+         map<int,size_t>::iterator it=timeAxis.find(varid);
+         if (it == timeAxis.end()) timeAxis[varid] = record;
+         else
+         {
+           if (it->second >= record) return;
+           else it->second =record;
+         }
+
+         StdSize array_size = 1;
+         std::vector<StdSize> sstart, scount;
+
+         if (this->wmpi && collective)
+            CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE);
+         if (this->wmpi && !collective)
+            CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
+
+         this->getWriteDataInfos(name, record, array_size,  sstart, scount, NULL, NULL);
+         this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
+       }
+
+
       //---------------------------------------------------------------
 
Index: /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.hpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.hpp	(revision 1156)
@@ -73,4 +73,6 @@
             void writeTimeAxisData(const CArray<double,1>& data, const StdString& name,
                                    bool collective, StdSize record, bool Isroot);
+            void writeTimeAxisDataBounds(const CArray<double,1>& data, const StdString& name,
+                                   bool collective, StdSize record, bool Isroot);
             /// Accesseur ///
             const CONetCDF4Path& getCurrentPath(void) const;
Index: /XIOS/dev/branch_yushan_merged/src/io/onetcdf4_impl.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/io/onetcdf4_impl.hpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/io/onetcdf4_impl.hpp	(revision 1156)
@@ -25,6 +25,9 @@
     CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
 
+    CTimer::get("Files : get data infos").resume();
     this->getWriteDataInfos
     (name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("Files : get data infos").suspend();
+
     if (data.numElements() != array_size)
     {
@@ -54,6 +57,8 @@
     CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
 
-    this->getWriteDataInfos
-    (name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("CONetCDF4::writeData getWriteDataInfos").resume();
+    this->getWriteDataInfos(name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("CONetCDF4::writeData getWriteDataInfos").suspend();
+ 
     if (data.numElements()*stringArrayLen != array_size)
     {
@@ -72,5 +77,7 @@
       PtrArrayStr[it->size()]='\0' ;
     }
+    CTimer::get("CONetCDF4::writeData writeData_").resume();
     this->writeData_(grpid, varid, sstart, scount, ArrayStr);
+    CTimer::get("CONetCDF4::writeData writeData_").suspend();
     delete [] ArrayStr ;
   }
Index: /XIOS/dev/branch_yushan_merged/src/log.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/log.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/log.cpp	(revision 1156)
@@ -7,5 +7,5 @@
 {
 
-  std::filebuf* info_FB[10];
+  std::filebuf* info_FB[16];
 
 
Index: /XIOS/dev/branch_yushan_merged/src/log.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/log.hpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/log.hpp	(revision 1156)
@@ -19,5 +19,5 @@
     {
       omp_init_lock( &mutex );
-      for(int i=0; i<10; i++)
+      for(int i=0; i<16; i++)
         strBuf_array[i] = sBuff;
     }
@@ -61,5 +61,5 @@
     string name ;
     std::streambuf* strBuf_;
-    std::streambuf* strBuf_array[10];
+    std::streambuf* strBuf_array[16];
     omp_lock_t mutex;
   };
@@ -70,5 +70,5 @@
 
 
-  extern std::filebuf* info_FB[10];
+  extern std::filebuf* info_FB[16];
 
 
Index: /XIOS/dev/branch_yushan_merged/src/memtrack.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/memtrack.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/memtrack.cpp	(revision 1156)
@@ -52,4 +52,7 @@
 {
   void addr2line(const char *file_name, char** addr, int naddr) ;
+#ifdef XIOS_MEMTRACK_LIGHT
+  void addr2line(const char *file_name, char** addr, int naddr) {} 
+#endif
 }
 /* ------------------------------------------------------------ */
@@ -59,4 +62,9 @@
 namespace MemTrack
 {
+    size_t currentMemorySize=0 ;
+    size_t maxMemorySize=0 ; 
+
+    size_t getCurrentMemorySize(void) {return currentMemorySize; }
+    size_t getMaxMemorySize(void) {return maxMemorySize ; }
 
     /* ------------------------------------------------------------ */
@@ -376,4 +384,7 @@
         // Get the offset to the user chunk and return it.
         UserChunk *pUser = GetUserAddress(pProlog);
+
+        currentMemorySize += size ;
+        if (currentMemorySize>maxMemorySize) maxMemorySize=currentMemorySize ;
         
         return pUser;
@@ -401,4 +412,5 @@
         // Unlink the block header from the list and destroy it.
         BlockHeader *pBlockHeader = GetHeaderAddress(pProlog);
+        currentMemorySize-=pBlockHeader->GetRequestedSize();
         BlockHeader::RemoveNode(pBlockHeader);
         pBlockHeader->~BlockHeader();
Index: /XIOS/dev/branch_yushan_merged/src/memtrack.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/memtrack.hpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/memtrack.hpp	(revision 1156)
@@ -61,5 +61,6 @@
     void TrackDumpBlocks();
     void TrackListMemoryUsage();
-
+    size_t getCurrentMemorySize(void) ;
+    size_t getMaxMemorySize(void) ;
     /* ---------------------------------------- operator * (MemStamp, ptr) */
 
Index: /XIOS/dev/branch_yushan_merged/src/node/context.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/context.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/node/context.cpp	(revision 1156)
@@ -14,4 +14,6 @@
 #include "type.hpp"
 #include "xios_spl.hpp"
+#include "timer.hpp"
+#include "memtrack.hpp"
 
 
@@ -402,4 +404,5 @@
    void CContext::closeDefinition(void)
    {
+     CTimer::get("Context : close definition").resume() ;
      // There is nothing client need to send to server
      if (hasClient)
@@ -455,4 +458,5 @@
       startPrefetchingOfEnabledReadModeFiles();
     }
+    CTimer::get("Context : close definition").suspend() ;
    }
 
@@ -1208,5 +1212,7 @@
    {
       calendar->update(step);
-
+      #ifdef XIOS_MEMTRACK_LIGHT
+      info(50) << " Current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte, at timestep "<<step<<" of context "<<this->getId()<<endl ;
+#endif
       if (hasClient)
       {
Index: /XIOS/dev/branch_yushan_merged/src/node/field.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/field.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/node/field.cpp	(revision 1156)
@@ -125,5 +125,5 @@
   void CField::sendUpdateData(const CArray<double,1>& data)
   {
-    CTimer::get("XIOS Send Data").resume();
+    CTimer::get("Field : send data").resume();
 
     CContext* context = CContext::getCurrent();
@@ -177,5 +177,5 @@
     }
 
-    CTimer::get("XIOS Send Data").suspend();
+    CTimer::get("Field : send data").suspend();
   }
 
@@ -187,5 +187,5 @@
     list<CEventServer::SSubEvent>::iterator it;
     string fieldId;
-
+    CTimer::get("Field : recv data").resume();
     for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
     {
@@ -197,4 +197,5 @@
     }
     get(fieldId)->recvUpdateData(ranks,buffers);
+    CTimer::get("Field : recv data").suspend();
   }
 
Index: /XIOS/dev/branch_yushan_merged/src/node/file.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/file.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/node/file.cpp	(revision 1156)
@@ -16,4 +16,5 @@
 #include "context_client.hpp"
 #include "mpi.hpp"
+#include "timer.hpp"
 
 namespace xios {
@@ -274,10 +275,14 @@
       if (mode.isEmpty() || mode.getValue() == mode_attr::write)
       {
+        CTimer::get("Files : create headers").resume();
         if (!isOpen) createHeader();
+        CTimer::get("Files : create headers").suspend();
         checkSync();
       }
       else
       {
+        CTimer::get("Files : open headers").resume();
         if (!isOpen) openInReadMode();
+        CTimer::get("Files : open headers").suspend();
       }
       checkSplit();
Index: /XIOS/dev/branch_yushan_merged/src/server.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/server.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/server.cpp	(revision 1156)
@@ -163,4 +163,5 @@
       report(0)<<"Performance report : Time spent in processing events : "<<CTimer::get("Process events").getCumulatedTime()<<endl  ;
       report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl  ;
+      report(100)<<CTimer::getAllCumulatedTime()<<endl ;
     }
 
Index: /XIOS/dev/branch_yushan_merged/src/timer.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/timer.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/timer.cpp	(revision 1156)
@@ -3,4 +3,6 @@
 #include <string>
 #include <map>
+#include <iostream>
+#include <sstream>
 #include "tracer.hpp"
 
@@ -66,3 +68,11 @@
     return it->second;
   }
+
+  string CTimer::getAllCumulatedTime(void)
+  {
+    std::ostringstream strOut ;
+    for(std::map<std::string,CTimer>::iterator it=allTimer.begin();it!=allTimer.end();++it)
+      strOut<<"Timer : "<<it->first<<"    -->   cumulated time : "<<it->second.getCumulatedTime()<<std::endl ;
+    return strOut.str() ;
+  }
 }
Index: /XIOS/dev/branch_yushan_merged/src/timer.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/timer.hpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/timer.hpp	(revision 1156)
@@ -27,4 +27,5 @@
       static double getTime(void);
       static CTimer& get(std::string name);
+      static std::string getAllCumulatedTime(void) ;
   };
 }
Index: /XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp	(revision 1156)
@@ -39,7 +39,5 @@
     int nbLocalIndex = localIndex.size();
     int currentlocalIndex = 0;
-    double currentWeight  = 0.0;
-
-    dataOut=std::numeric_limits<double>::quiet_NaN();
+    double currentWeight  = 0.0;    
 
     for (int idx = 0; idx < nbLocalIndex; ++idx)
@@ -59,4 +57,9 @@
           weights_(currentlocalIndex) += 1.0;
         }
+      }
+      else
+      {
+        if (flagInitial[currentlocalIndex]) 
+          dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN();
       }
     }
Index: /XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp	(revision 1156)
@@ -36,6 +36,5 @@
   {
     int nbLocalIndex = localIndex.size();
-    int currentlocalIndex = 0;
-    dataOut=std::numeric_limits<double>::quiet_NaN();    
+    int currentlocalIndex = 0;    
     for (int idx = 0; idx < nbLocalIndex; ++idx)
     {
@@ -52,4 +51,9 @@
           dataOut(currentlocalIndex) = std::max(*(dataInput + idx), dataOut(currentlocalIndex));
         }
+      }
+      else
+      {
+        if (flagInitial[currentlocalIndex]) 
+          dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN();
       }
     }
Index: /XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp	(revision 1156)
@@ -36,6 +36,5 @@
   {
     int nbLocalIndex = localIndex.size();
-    int currentlocalIndex = 0;
-    dataOut=std::numeric_limits<double>::quiet_NaN();
+    int currentlocalIndex = 0;    
     for (int idx = 0; idx < nbLocalIndex; ++idx)
     {
@@ -52,4 +51,9 @@
           dataOut(currentlocalIndex) = std::min(*(dataInput + idx), dataOut(currentlocalIndex));
         }
+      }
+      else
+      {
+        if (flagInitial[currentlocalIndex]) 
+          dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN();
       }
     }
Index: /XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp	(revision 1156)
@@ -36,7 +36,5 @@
   {
     int nbLocalIndex = localIndex.size();
-    int currentlocalIndex = 0;
-
-    dataOut=std::numeric_limits<double>::quiet_NaN();
+    int currentlocalIndex = 0;    
   
     for (int idx = 0; idx < nbLocalIndex; ++idx)
@@ -54,4 +52,9 @@
           dataOut(currentlocalIndex) += *(dataInput + idx);
         }
+      }
+      else
+      {
+        if (flagInitial[currentlocalIndex]) 
+          dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN();
       }
     }    
Index: /XIOS/dev/branch_yushan_merged/src/transformation/generic_algorithm_transformation.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/generic_algorithm_transformation.cpp	(revision 1155)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/generic_algorithm_transformation.cpp	(revision 1156)
@@ -45,12 +45,14 @@
       {
         dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second;
-      }
-    }
-
-    // for (int idx = 0; idx < nbLocalIndex; ++idx)
-    // {
-    //   if (!flagInitial[localIndex[idx].first])
-    //     dataOut(localIndex[idx].first) = defaultValue;
-    // }
+        flagInitial[localIndex[idx].first] = true; // Reset flag to indicate not all data source are nan
+      }
+    }
+
+    // If all data source are nan then data destination must be nan
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      if (!flagInitial[localIndex[idx].first])
+        dataOut(localIndex[idx].first) = defaultValue;
+    }
   }
   else
