Index: XIOS/dev/dev_trunk_omp/src/node/context.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/node/context.cpp	(revision 1628)
+++ XIOS/dev/dev_trunk_omp/src/node/context.cpp	(revision 1646)
@@ -21,5 +21,7 @@
 #include "distribute_file_server2.hpp"
 
+#ifdef _usingEP
 using namespace ep_lib;
+#endif
 
 namespace xios {
@@ -35,4 +37,5 @@
       , idServer_(), client(0), server(0)
       , allProcessed(false), countChildCtx_(0)
+
    { /* Ne rien faire de plus */ }
 
@@ -67,8 +70,10 @@
    */
    CContextGroup* CContext::getRoot(void)
+   TRY
    {
       if(root_ptr == 0) root_ptr = new std::shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName()));
       return root_ptr->get();
    }
+   CATCH
 
    //----------------------------------------------------------------
@@ -79,7 +84,9 @@
    */
    std::shared_ptr<CCalendar> CContext::getCalendar(void) const
+   TRY
    {
       return (this->calendar);
    }
+   CATCH
 
    //----------------------------------------------------------------
@@ -90,7 +97,9 @@
    */
    void CContext::setCalendar(std::shared_ptr<CCalendar> newCalendar)
+   TRY
    {
       this->calendar = newCalendar;
    }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
@@ -100,4 +109,5 @@
    */
    void CContext::parse(xml::CXMLNode & node)
+   TRY
    {
       CContext::SuperClass::parse(node);
@@ -154,8 +164,10 @@
       }
    }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
    //! Show tree structure of context
    void CContext::ShowTree(StdOStream & out)
+   TRY
    {
       StdString currentContextId = CContext::getCurrent() -> getId();
@@ -178,5 +190,5 @@
       CContext::setCurrent(currentContextId);
    }
-
+   CATCH
 
    //----------------------------------------------------------------
@@ -184,4 +196,5 @@
    //! Convert context object into string (to print)
    StdString CContext::toString(void) const
+   TRY
    {
       StdOStringStream oss;
@@ -203,9 +216,8 @@
 
       }
-
       oss << "</" << CContext::GetName() << " >";
-
       return (oss.str());
    }
+   CATCH
 
    //----------------------------------------------------------------
@@ -218,4 +230,5 @@
    */
    void CContext::solveDescInheritance(bool apply, const CAttributeMap * const UNUSED(parent))
+   TRY
    {
 #define DECLARE_NODE(Name_, name_)    \
@@ -225,4 +238,5 @@
 #include "node_type.conf"
    }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
@@ -230,4 +244,5 @@
    //! Verify if all root definition in the context have child.
    bool CContext::hasChild(void) const
+   TRY
    {
       return (
@@ -238,8 +253,10 @@
       false);
 }
+   CATCH
 
    //----------------------------------------------------------------
 
    void CContext::CleanTree(void)
+   TRY
    {
 #define DECLARE_NODE(Name_, name_) C##Name_##Definition::ClearAllAttributes();
@@ -247,8 +264,11 @@
 #include "node_type.conf"
    }
+   CATCH
+
    ///---------------------------------------------------------------
 
    //! Initialize client side
    void CContext::initClient(ep_lib::MPI_Comm intraComm, ep_lib::MPI_Comm interComm, CContext* cxtServer /*= 0*/)
+   TRY
    {
 
@@ -299,4 +319,5 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -307,4 +328,5 @@
   */
    void CContext::setClientServerBuffer(CContextClient* contextClient, bool bufferForWriting)
+   TRY
    {
       // Estimated minimum event size for small events (10 is an arbitrary constant just for safety)
@@ -353,14 +375,17 @@
      }
      contextClient->setBufferSize(bufferSize, maxEventSize);
-
-   }
+   }
+   CATCH_DUMP_ATTR
 
    //! Verify whether a context is initialized
    bool CContext::isInitialized(void)
+   TRY
    {
      return hasClient;
    }
+   CATCH_DUMP_ATTR
 
    void CContext::initServer(ep_lib::MPI_Comm intraComm, ep_lib::MPI_Comm interComm, CContext* cxtClient /*= 0*/)
+   TRY
    {
      hasServer=true;
@@ -395,7 +420,9 @@
      client = new CContextClient(this,intraCommClient,interCommClient, cxtClient);
    }
+   CATCH_DUMP_ATTR
 
    //! Try to send the buffers and receive possible answers
   bool CContext::checkBuffersAndListen(bool enableEventsProcessing /*= true*/)
+  TRY
   {
     bool clientReady, serverFinished;
@@ -435,7 +462,9 @@
     }
   }
+   CATCH_DUMP_ATTR
 
    //! Terminate a context
    void CContext::finalize(void)
+   TRY
    {
       if (hasClient && !hasServer) // For now we only use server level 1 to read data
@@ -481,5 +510,7 @@
 
          #pragma omp critical (_output)
-         info(20)<<"CContext: Context <"<<getId()<<"> is finalized."<<endl;
+         {
+          info(20)<<"CContext: Context <"<<getId()<<"> is finalized."<<endl;
+         }
        }
      }
@@ -497,5 +528,7 @@
          // Blocking send of context finalize message to its client (e.g. primary server or model)
          #pragma omp critical (_output)
-         info(100)<<"DEBUG: context "<<getId()<<" Send client finalize<<"<<endl ;
+         {
+          info(100)<<"DEBUG: context "<<getId()<<" Send client finalize<<"<<endl ;
+         }
          client->finalize();
          bool bufferReleased;
@@ -525,5 +558,7 @@
 
          #pragma omp critical (_output)
-         info(20)<<"CContext: Context <"<<getId()<<"> is finalized."<<endl;
+         {
+          info(20)<<"CContext: Context <"<<getId()<<"> is finalized."<<endl;
+         }
        }
 
@@ -531,7 +566,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Free internally allocated communicators
    void CContext::freeComms(void)
+   TRY
    {
      for (std::list<ep_lib::MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it)
@@ -539,7 +576,9 @@
      comms.clear();
    }
+   CATCH_DUMP_ATTR
 
    //! Deallocate buffers allocated by clientContexts
    void CContext::releaseClientBuffers(void)
+   TRY
    {
      client->releaseBuffers();
@@ -547,6 +586,8 @@
        clientPrimServer[i]->releaseBuffers();
    }
+   CATCH_DUMP_ATTR
 
    void CContext::postProcessingGlobalAttributes()
+   TRY
    {
      if (allProcessed) return;  
@@ -612,6 +653,8 @@
      allProcessed = true;
    }
+   CATCH_DUMP_ATTR
 
    void CContext::sendPostProcessingGlobalAttributes()
+   TRY
    {
       // Use correct context client to send message
@@ -638,6 +681,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CContext::recvPostProcessingGlobalAttributes(CEventServer& event)
+   TRY
    {
       CBufferIn* buffer=event.subEvents.begin()->buffer;
@@ -646,9 +691,12 @@
       get(id)->recvPostProcessingGlobalAttributes(*buffer);
    }
+   CATCH
 
    void CContext::recvPostProcessingGlobalAttributes(CBufferIn& buffer)
+   TRY
    {      
       postProcessingGlobalAttributes();
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -661,5 +709,7 @@
    and the active fields (fields will be written onto active files)
    */
+
    void CContext::closeDefinition(void)
+   TRY
    {
     CTimer::get("Context : close definition").resume() ;
@@ -692,18 +742,24 @@
     CTimer::get("Context : close definition").suspend() ;
    }
+   CATCH_DUMP_ATTR
 
    void CContext::findAllEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)
+   TRY
    {
      for (unsigned int i = 0; i < activeFiles.size(); i++)
      (void)activeFiles[i]->getEnabledFields();
    }
+   CATCH_DUMP_ATTR
 
    void CContext::readAttributesOfEnabledFieldsInReadModeFiles()
+   TRY
    {
       for (unsigned int i = 0; i < this->enabledReadModeFiles.size(); ++i)
         (void)this->enabledReadModeFiles[i]->readAttributesOfEnabledFieldsInReadMode();
    }
+   CATCH_DUMP_ATTR
 
    void CContext::sendGridComponentEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)
+   TRY
    {
      int size = activeFiles.size();
@@ -713,4 +769,5 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -719,4 +776,5 @@
    */
    void CContext::sendGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)
+   TRY
    {
      int size = activeFiles.size();
@@ -726,6 +784,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CContext::checkGridEnabledFields()
+   TRY
    {
      int size = enabledFiles.size();
@@ -735,4 +795,5 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -741,4 +802,5 @@
    */
    void CContext::checkGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)
+   TRY
    {
      int size = activeFiles.size();
@@ -748,4 +810,5 @@
      }
    }
+   CATCH_DUMP_ATTR
 
     /*!
@@ -755,4 +818,5 @@
    */
    void CContext::solveOnlyRefOfEnabledFields(bool sendToServer)
+   TRY
    {
      int size = this->enabledFiles.size();
@@ -767,4 +831,5 @@
      }
    }
+   CATCH_DUMP_ATTR
 
     /*!
@@ -775,4 +840,5 @@
    */
    void CContext::solveAllRefOfEnabledFieldsAndTransform(bool sendToServer)
+   TRY
    {
      int size = this->enabledFiles.size();
@@ -782,6 +848,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CContext::buildFilterGraphOfEnabledFields()
+   TRY
    {
      int size = this->enabledFiles.size();
@@ -791,6 +859,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CContext::postProcessFilterGraph()
+   TRY
    {
      int size = enabledFiles.size();
@@ -800,6 +870,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CContext::startPrefetchingOfEnabledReadModeFiles()
+   TRY
    {
      int size = enabledReadModeFiles.size();
@@ -809,6 +881,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CContext::doPreTimestepOperationsForEnabledReadModeFiles()
+   TRY
    {
      int size = enabledReadModeFiles.size();
@@ -818,6 +892,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CContext::doPostTimestepOperationsForEnabledReadModeFiles()
+   TRY
    {
      int size = enabledReadModeFiles.size();
@@ -827,6 +903,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
   void CContext::findFieldsWithReadAccess(void)
+  TRY
   {
     fieldsWithReadAccess.clear();
@@ -842,18 +920,24 @@
     }
   }
+  CATCH_DUMP_ATTR
 
   void CContext::solveAllRefOfFieldsWithReadAccess()
+  TRY
   {
     for (size_t i = 0; i < fieldsWithReadAccess.size(); ++i)
       fieldsWithReadAccess[i]->solveAllReferenceEnabledField(false);
   }
+  CATCH_DUMP_ATTR
 
   void CContext::buildFilterGraphOfFieldsWithReadAccess()
+  TRY
   {
     for (size_t i = 0; i < fieldsWithReadAccess.size(); ++i)
       fieldsWithReadAccess[i]->buildFilterGraph(garbageCollector, true);
   }
+  CATCH_DUMP_ATTR
 
    void CContext::solveAllInheritance(bool apply)
+   TRY
    {
      // RÃ©solution des hÃ©ritages descendants (cÃ d des hÃ©ritages de groupes)
@@ -878,6 +962,8 @@
 
    }
+  CATCH_DUMP_ATTR
 
    void CContext::findEnabledFiles(void)
+   TRY
    {
       const std::vector<CFile*> allFiles = CFile::getAll();
@@ -928,6 +1014,8 @@
 
    }
+   CATCH_DUMP_ATTR
 
    void CContext::distributeFiles(void)
+   TRY
    {
      bool distFileMemory=false ;
@@ -937,7 +1025,8 @@
      else distributeFileOverBandwith() ;
    }
-
+   CATCH_DUMP_ATTR
 
    void CContext::distributeFileOverBandwith(void)
+   TRY
    {
      double eps=std::numeric_limits<double>::epsilon()*10 ;
@@ -1009,5 +1098,7 @@
        {
          #pragma omp critical (_output)
-         info(30)<<"Load Balancing for servers (perfect=1) : "<<it->second<<" :  ratio "<<it->first*1./dataPerPool<<endl ;
+         {
+          info(30)<<"Load Balancing for servers (perfect=1) : "<<it->second<<" :  ratio "<<it->first*1./dataPerPool<<endl ;
+         }
        }
 
@@ -1023,6 +1114,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CContext::distributeFileOverMemoryBandwith(void)
+   TRY
    {
      // If primary server
@@ -1102,10 +1195,14 @@
        {
          #pragma omp critical (_output)
-         info(100)<<"Pool server level2 "<<i<<"   assigned file bandwith "<<bandwithSize[i]*86400.*4./1024/1024.<<" Mb / days"<<endl ;
+         {
+          info(100)<<"Pool server level2 "<<i<<"   assigned file bandwith "<<bandwithSize[i]*86400.*4./1024/1024.<<" Mb / days"<<endl ;
+         }
        }
        for (int i = 0; i < nbPools; ++i)
        {
          #pragma omp critical (_output)
-         info(100)<<"Pool server level2 "<<i<<"   assigned grid memory "<<memorySize[i]*100/1024./1024.<<" Mb"<<endl ;
+         {
+          info(100)<<"Pool server level2 "<<i<<"   assigned grid memory "<<memorySize[i]*100/1024./1024.<<" Mb"<<endl ;
+         }
        }
 
@@ -1122,6 +1219,5 @@
    }
 }
-
-
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1129,4 +1225,5 @@
    */
    void CContext::findEnabledWriteModeFiles(void)
+   TRY
    {
      int size = this->enabledFiles.size();
@@ -1138,4 +1235,5 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1143,4 +1241,5 @@
    */
    void CContext::findEnabledReadModeFiles(void)
+   TRY
    {
      int size = this->enabledFiles.size();
@@ -1151,6 +1250,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CContext::closeAllFile(void)
+   TRY
    {
      std::vector<CFile*>::const_iterator
@@ -1160,8 +1261,11 @@
      {
        #pragma omp critical (_output)
-       info(30)<<"Closing File : "<<(*it)->getId()<<endl;
+       {
+        info(30)<<"Closing File : "<<(*it)->getId()<<endl;
+       }
        (*it)->close();
      }
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1173,4 +1277,5 @@
    */
    bool CContext::dispatchEvent(CEventServer& event)
+   TRY
    {
 
@@ -1214,7 +1319,9 @@
       }
    }
+   CATCH
 
    //! Client side: Send a message to server to make it close
    void CContext::sendCloseDefinition(void)
+   TRY
    {
      // Use correct context client to send message
@@ -1239,7 +1346,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Server side: Receive a message of client announcing a context close
    void CContext::recvCloseDefinition(CEventServer& event)
+   TRY
    {
       CBufferIn* buffer=event.subEvents.begin()->buffer;
@@ -1248,7 +1357,9 @@
       get(id)->closeDefinition();
    }
+   CATCH
 
    //! Client side: Send a message to update calendar in each time step
    void CContext::sendUpdateCalendar(int step)
+   TRY
    {
      // Use correct context client to send message
@@ -1274,7 +1385,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Server side: Receive a message of client annoucing calendar update
    void CContext::recvUpdateCalendar(CEventServer& event)
+   TRY
    {
       CBufferIn* buffer=event.subEvents.begin()->buffer;
@@ -1283,7 +1396,9 @@
       get(id)->recvUpdateCalendar(*buffer);
    }
+   CATCH
 
    //! Server side: Receive a message of client annoucing calendar update
    void CContext::recvUpdateCalendar(CBufferIn& buffer)
+   TRY
    {
       int step;
@@ -1295,7 +1410,9 @@
       }
    }
+   CATCH_DUMP_ATTR
 
    //! Client side: Send a message to create header part of netcdf file
    void CContext::sendCreateFileHeader(void)
+   TRY
    {
      // Use correct context client to send message
@@ -1322,7 +1439,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Server side: Receive a message of client annoucing the creation of header part of netcdf file
    void CContext::recvCreateFileHeader(CEventServer& event)
+   TRY
    {
       CBufferIn* buffer=event.subEvents.begin()->buffer;
@@ -1331,14 +1450,18 @@
       get(id)->recvCreateFileHeader(*buffer);
    }
+   CATCH
 
    //! Server side: Receive a message of client annoucing the creation of header part of netcdf file
    void CContext::recvCreateFileHeader(CBufferIn& buffer)
+   TRY
    {
       if (!hasClient && hasServer) 
         createFileHeader();
    }
+   CATCH_DUMP_ATTR
 
    //! Client side: Send a message to do some post processing on server
    void CContext::sendProcessingGridOfEnabledFields()
+   TRY
    {
       // Use correct context client to send message
@@ -1364,7 +1487,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Server side: Receive a message to do some post processing
    void CContext::recvProcessingGridOfEnabledFields(CEventServer& event)
+   TRY
    {
       CBufferIn* buffer=event.subEvents.begin()->buffer;
@@ -1372,7 +1497,9 @@
       *buffer>>id;      
    }
+   CATCH
 
    //! Client side: Send a message to do some post processing on server
    void CContext::sendPostProcessing()
+   TRY
    {
       // Use correct context client to send message
@@ -1398,7 +1525,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Server side: Receive a message to do some post processing
    void CContext::recvPostProcessing(CEventServer& event)
+   TRY
    {
       CBufferIn* buffer=event.subEvents.begin()->buffer;
@@ -1407,13 +1536,17 @@
       get(id)->recvPostProcessing(*buffer);
    }
+   CATCH
 
    //! Server side: Receive a message to do some post processing
    void CContext::recvPostProcessing(CBufferIn& buffer)
+   TRY
    {
       CCalendarWrapper::get(CCalendarWrapper::GetDefName())->createCalendar();
       postProcessing();
    }
+   CATCH_DUMP_ATTR
 
    const StdString& CContext::getIdServer()
+   TRY
    {
       if (hasClient)
@@ -1425,6 +1558,8 @@
       if (hasServer) return (this->getId());
    }
+   CATCH_DUMP_ATTR
 
    const StdString& CContext::getIdServer(const int i)
+   TRY
    {
      idServer_ = this->getId();
@@ -1433,5 +1568,5 @@
      return idServer_;
    }
-
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1442,4 +1577,5 @@
    */
    void CContext::postProcessing()
+   TRY
    {
      if (isPostProcessed) return;
@@ -1504,4 +1640,5 @@
       isPostProcessed = true;
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1514,4 +1651,5 @@
    std::map<int, StdSize> CContext::getAttributesBufferSize(std::map<int, StdSize>& maxEventSize,
                                                            CContextClient* contextClient, bool bufferForWriting /*= "false"*/)
+   TRY
    {
 	 // As calendar attributes are sent even if there are no active files or fields, maps are initialized according the size of calendar attributes
@@ -1545,4 +1683,5 @@
      return attributesSize;
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1555,4 +1694,5 @@
    std::map<int, StdSize> CContext::getDataBufferSize(std::map<int, StdSize>& maxEventSize,
                                                       CContextClient* contextClient, bool bufferForWriting /*= "false"*/)
+   TRY
    {
      std::map<int, StdSize> dataSize;
@@ -1563,5 +1703,4 @@
      for (size_t i = 0; i < numEnabledFiles; ++i)
      {
-//       CFile* file = this->enabledFiles[i];
        CFile* file = fileList[i];
        if (file->getContextClient() == contextClient)
@@ -1591,7 +1730,9 @@
      return dataSize;
    }
+   CATCH_DUMP_ATTR
 
    //! Client side: Send infomation of active files (files are enabled to write out)
    void CContext::sendEnabledFiles(const std::vector<CFile*>& activeFiles)
+   TRY
    {
      int size = activeFiles.size();
@@ -1611,7 +1752,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Client side: Send information of active fields (ones are written onto files)
    void CContext::sendEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles)
+   TRY
    {
      int size = activeFiles.size();
@@ -1621,7 +1764,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Client side: Check if the defined axis, domains and grids are eligible for compressed indexed output
    void CContext::checkAxisDomainsGridsEligibilityForCompressedOutput()
+   TRY
    {
      if (!hasClient) return;
@@ -1639,7 +1784,9 @@
        (*it)->checkEligibilityForCompressedOutput();
    }
+   CATCH_DUMP_ATTR
 
    //! Client side: Prepare the timeseries by adding the necessary files
    void CContext::prepareTimeseries()
+   TRY
    {
      if (!hasClient) return;
@@ -1739,7 +1886,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Client side: Send information of reference grid of active fields
    void CContext::sendRefGrid(const std::vector<CFile*>& activeFiles)
+   TRY
    {
      std::set<StdString> gridIds;
@@ -1773,7 +1922,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Client side: Send information of reference domain, axis and scalar of active fields
    void CContext::sendRefDomainsAxisScalars(const std::vector<CFile*>& activeFiles)
+   TRY
    {
      std::set<StdString> domainIds, axisIds, scalarIds;
@@ -1834,7 +1985,9 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    //! Update calendar in each time step
    void CContext::updateCalendar(int step)
+   TRY
    {
       int prevStep = calendar->getStep();
@@ -1847,12 +2000,18 @@
         }
 
-        //#pragma omp critical (_output)
-        info(150) << "updateCalendar : before : " << calendar->getCurrentDate() << endl;
+        #pragma omp critical (_output)
+        {
+          info(100) << "updateCalendar : before : " << calendar->getCurrentDate() << endl;
+        }
         calendar->update(step);
-        //#pragma omp critical (_output)
-        info(150) << "updateCalendar : after : " << calendar->getCurrentDate() << endl;
+        #pragma omp critical (_output)
+        {
+          info(100) << "updateCalendar : after : " << calendar->getCurrentDate() << endl;
+        }
   #ifdef XIOS_MEMTRACK_LIGHT
         #pragma omp critical (_output)
-        info(50) << " Current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte, at timestep "<<step<<" of context "<<this->getId()<<endl ;
+        {
+          info(50) << " Current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte, at timestep "<<step<<" of context "<<this->getId()<<endl ;
+        }
   #endif
 
@@ -1866,5 +2025,7 @@
       {
         #pragma omp critical (_output)
-        info(50) << "updateCalendar: already at step " << step << ", no operation done." << endl;
+        {
+          info(50) << "updateCalendar: already at step " << step << ", no operation done." << endl;
+        }
       }
       else // if (prevStep > step)
@@ -1872,6 +2033,8 @@
               << "Illegal calendar update: previous step was " << prevStep << ", new step " << step << "is in the past!")
    }
+   CATCH_DUMP_ATTR
 
    void CContext::initReadFiles(void)
+   TRY
    {
       vector<CFile*>::const_iterator it;
@@ -1882,7 +2045,9 @@
       }
    }
+   CATCH_DUMP_ATTR
 
    //! Server side: Create header of netcdf file
    void CContext::createFileHeader(void)
+   TRY
    {
       vector<CFile*>::const_iterator it;
@@ -1894,10 +2059,13 @@
       }
    }
+   CATCH_DUMP_ATTR
 
    //! Get current context
    CContext* CContext::getCurrent(void)
+   TRY
    {
      return CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()).get();
    }
+   CATCH
 
    /*!
@@ -1906,8 +2074,10 @@
    */
    void CContext::setCurrent(const string& id)
+   TRY
    {
      CObjectFactory::SetCurrentContextId(id);
      CGroupFactory::SetCurrentContextId(id);
    }
+   CATCH
 
   /*!
@@ -1917,4 +2087,5 @@
   */
   CContext* CContext::create(const StdString& id)
+  TRY
   {
     CContext::setCurrent(id);
@@ -1932,8 +2103,9 @@
     return (context);
   }
-
+  CATCH
 
      //! Server side: Receive a message to do some post processing
   void CContext::recvRegistry(CEventServer& event)
+  TRY
   {
     CBufferIn* buffer=event.subEvents.begin()->buffer;
@@ -1942,6 +2114,8 @@
     get(id)->recvRegistry(*buffer);
   }
+  CATCH
 
   void CContext::recvRegistry(CBufferIn& buffer)
+  TRY
   {
     if (server->intraCommRank==0)
@@ -1952,6 +2126,8 @@
     }
   }
+  CATCH_DUMP_ATTR
 
   void CContext::sendRegistry(void)
+  TRY
   {
     registryOut->hierarchicalGatherRegistry() ;
@@ -1979,4 +2155,5 @@
     }
   }
+  CATCH_DUMP_ATTR
 
   /*!
@@ -1985,7 +2162,23 @@
   */
   bool CContext::isFinalized(void)
+  TRY
   {
     return finalized;
   }
+  CATCH_DUMP_ATTR
+  ///--------------------------------------------------------------
+  StdString CContext::dumpClassAttributes(void)
+  {
+    StdString str;
+    str.append("enabled files=\"");
+    int size = this->enabledFiles.size();
+    for (int i = 0; i < size; ++i)
+    {
+      str.append(enabledFiles[i]->getId());
+      str.append(" ");
+    }
+    str.append("\"");
+    return str;
+  }
 
 } // namespace xios
