Index: XIOS/dev/dev_olga/src/node/field.cpp
===================================================================
--- XIOS/dev/dev_olga/src/node/field.cpp	(revision 1594)
+++ XIOS/dev/dev_olga/src/node/field.cpp	(revision 1612)
@@ -71,27 +71,36 @@
 
    void CField::setVirtualVariableGroup(CVariableGroup* newVVariableGroup)
+   TRY
    {
       this->vVariableGroup = newVVariableGroup;
    }
+   CATCH
 
    CVariableGroup* CField::getVirtualVariableGroup(void) const
+   TRY
    {
       return this->vVariableGroup;
    }
+   CATCH
 
    std::vector<CVariable*> CField::getAllVariables(void) const
+   TRY
    {
       return this->vVariableGroup->getAllChildren();
    }
+   CATCH
 
    void CField::solveDescInheritance(bool apply, const CAttributeMap* const parent)
+   TRY
    {
       SuperClassAttribute::setAttributes(parent, apply);
       this->getVirtualVariableGroup()->solveDescInheritance(apply, NULL);
    }
+   CATCH_DUMP_ATTR
 
   //----------------------------------------------------------------
 
   bool CField::dispatchEvent(CEventServer& event)
+  TRY
   {
     if (SuperClass::dispatchEvent(event)) return true;
@@ -131,6 +140,8 @@
     }
   }
+  CATCH
 
   void CField::sendUpdateData(const CArray<double,1>& data)
+  TRY
   {
     CTimer::get("Field : send data").resume();
@@ -189,6 +200,8 @@
     CTimer::get("Field : send data").suspend();
   }
+  CATCH_DUMP_ATTR
 
   void CField::recvUpdateData(CEventServer& event)
+  TRY
   {
     std::map<int,CBufferIn*> rankBuffers;
@@ -207,6 +220,8 @@
     CTimer::get("Field : recv data").suspend();
   }
+  CATCH
 
   void  CField::recvUpdateData(std::map<int,CBufferIn*>& rankBuffers)
+  TRY
   {
     CContext* context = CContext::getCurrent();
@@ -249,6 +264,8 @@
     recvDataSrv.reset() ;
   }
+  CATCH_DUMP_ATTR
 
   void CField::writeUpdateData(const CArray<double,1>& data)
+  TRY
   {
     CContext* context = CContext::getCurrent();
@@ -277,6 +294,8 @@
     }
   }
+  CATCH_DUMP_ATTR
 
   void CField::writeField(void)
+  TRY
   {
     if (!getRelFile()->isEmptyZone())
@@ -290,4 +309,5 @@
     }
   }
+  CATCH_DUMP_ATTR
 
   /*
@@ -299,4 +319,5 @@
   */
   bool CField::sendReadDataRequest(const CDate& tsDataRequested)
+  TRY
   {
     CContext* context = CContext::getCurrent();
@@ -330,4 +351,5 @@
     return !isEOF;
   }
+  CATCH_DUMP_ATTR
 
   /*!
@@ -336,4 +358,5 @@
   */
   bool CField::sendReadDataRequestIfNeeded(void)
+  TRY
   {
     const CDate& currentDate = CContext::getCurrent()->getCalendar()->getCurrentDate();
@@ -353,6 +376,8 @@
     return dataRequested;
   }
+  CATCH_DUMP_ATTR
 
   void CField::recvReadDataRequest(CEventServer& event)
+  TRY
   {
     CBufferIn* buffer = event.subEvents.begin()->buffer;
@@ -361,4 +386,5 @@
     get(fieldId)->recvReadDataRequest();
   }
+  CATCH
 
   /*!
@@ -369,4 +395,5 @@
   */
   void CField::recvReadDataRequest(void)
+  TRY
   {
     CContext* context = CContext::getCurrent();
@@ -449,4 +476,5 @@
     }
   }
+  CATCH_DUMP_ATTR
 
   /*!
@@ -456,4 +484,5 @@
   */
   CField::EReadField CField::readField(void)
+  TRY
   {
     CContext* context = CContext::getCurrent();
@@ -508,4 +537,5 @@
     return readState;
   }
+  CATCH_DUMP_ATTR
 
   /*
@@ -516,4 +546,5 @@
   */
   void CField::recvReadDataReady(CEventServer& event)
+  TRY
   {
     string fieldId;
@@ -531,4 +562,5 @@
     get(fieldId)->recvReadDataReady(ranks, buffers);
   }
+  CATCH
 
   /*!
@@ -538,4 +570,5 @@
   */
   void CField::recvReadDataReady(vector<int> ranks, vector<CBufferIn*> buffers)
+  TRY
   {
     CContext* context = CContext::getCurrent();
@@ -574,6 +607,8 @@
       serverSourceFilter->streamDataFromServer(lastDataReceivedFromServer, data);
   }
+  CATCH_DUMP_ATTR
 
   void CField::checkForLateDataFromServer(void)
+  TRY
   {
     CContext* context = CContext::getCurrent();
@@ -607,23 +642,30 @@
     }
   }
+  CATCH_DUMP_ATTR
 
   void CField::checkIfMustAutoTrigger(void)
+  TRY
   {
     mustAutoTrigger = serverSourceFilter ? serverSourceFilter->mustAutoTrigger() : false;
   }
+  CATCH_DUMP_ATTR
 
   void CField::autoTriggerIfNeeded(void)
+  TRY
   {
     if (mustAutoTrigger)
       serverSourceFilter->trigger(CContext::getCurrent()->getCalendar()->getCurrentDate());
   }
+  CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
 
    void CField::setRelFile(CFile* _file)
+   TRY
    {
       this->file = _file;
       hasOutputFile = true;
    }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
@@ -636,46 +678,61 @@
 
    CGrid* CField::getRelGrid(void) const
+   TRY
    {
       return this->grid;
    }
+   CATCH
 
    //----------------------------------------------------------------
 
    CFile* CField::getRelFile(void) const
+   TRY
    {
       return this->file;
    }
+   CATCH
 
    int CField::getNStep(void) const
+   TRY
    {
       return this->nstep;
    }
+   CATCH
 
    func::CFunctor::ETimeType CField::getOperationTimeType() const
+   TRY
    {
      return operationTimeType;
    }
+   CATCH
 
    //----------------------------------------------------------------
 
    void CField::incrementNStep(void)
+   TRY
    {
       this->nstep++;
    }
+   CATCH_DUMP_ATTR
 
    void CField::resetNStep(int nstep /*= 0*/)
+   TRY
    {
       this->nstep = nstep;
    }
+   CATCH_DUMP_ATTR
 
    void CField::resetNStepMax(void)
+   TRY
    {
       this->nstepMax = 0;
       nstepMaxRead = false;
    }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
 
    bool CField::isActive(bool atCurrentTimestep /*= false*/) const
+   TRY
    {
       if (clientSourceFilter)
@@ -689,35 +746,46 @@
       return false;
    }
+   CATCH
 
    //----------------------------------------------------------------
 
    bool CField::wasWritten() const
+   TRY
    {
      return written;
    }
+   CATCH
 
    void CField::setWritten()
+   TRY
    {
      written = true;
    }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
 
    bool CField::getUseCompressedOutput() const
+   TRY
    {
      return useCompressedOutput;
    }
+   CATCH
 
    void CField::setUseCompressedOutput()
+   TRY
    {
      useCompressedOutput = true;
    }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
 
    std::shared_ptr<COutputPin> CField::getInstantDataFilter()
+   TRY
    {
      return instantDataFilter;
    }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
@@ -728,4 +796,5 @@
    */
    void CField::buildGridTransformationGraph()
+   TRY
    {
      CContext* context = CContext::getCurrent();
@@ -738,4 +807,5 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -743,4 +813,5 @@
    */
    void CField::generateNewTransformationGridDest()
+   TRY
    {
      CContext* context = CContext::getCurrent();
@@ -797,6 +868,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CField::updateRef(CGrid* grid)
+   TRY
    {
      if (!grid_ref.isEmpty()) grid_ref.setValue(grid->getId());
@@ -820,4 +893,5 @@
      }
    }
+   CATCH_DUMP_ATTR
    
    /*!
@@ -826,4 +900,5 @@
    */
    void CField::solveAllEnabledFieldsAndTransform()
+   TRY
    {
      CContext* context = CContext::getCurrent();
@@ -862,6 +937,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CField::checkGridOfEnabledFields()
+   TRY
    {
      if (!isGridChecked)
@@ -871,18 +948,24 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CField::sendGridComponentOfEnabledFields()
+   TRY
    {
       solveGridDomainAxisRef(true);
       // solveCheckMaskIndex(true);
    }
+   CATCH_DUMP_ATTR
 
    void CField::sendGridOfEnabledFields()
+   TRY
    {
       // solveGridDomainAxisRef(true);
       solveCheckMaskIndex(true);
    }   
+   CATCH_DUMP_ATTR
 
    void CField::solveOnlyReferenceEnabledField(bool doSending2Server)
+   TRY
    {
      CContext* context = CContext::getCurrent();
@@ -910,6 +993,8 @@
      }
    }
-     
+   CATCH_DUMP_ATTR
+
    void CField::solveAllReferenceEnabledField(bool doSending2Server)
+   TRY
    {
      CContext* context = CContext::getCurrent();
@@ -940,23 +1025,31 @@
      solveCheckMaskIndex(doSending2Server);
    }
+   CATCH_DUMP_ATTR
 
    std::map<int, StdSize> CField::getGridAttributesBufferSize(CContextClient* client, bool bufferForWriting /*= "false"*/)
+   TRY
    {
      return grid->getAttributesBufferSize(client, bufferForWriting);
    }
+   CATCH_DUMP_ATTR
 
    std::map<int, StdSize> CField::getGridDataBufferSize(CContextClient* client, bool bufferForWriting /*= "false"*/)
+   TRY
    {
      return grid->getDataBufferSize(client, getId(), bufferForWriting);
    }
+   CATCH_DUMP_ATTR
 
    size_t CField::getGlobalWrittenSize()
+   TRY
    {
      return grid->getGlobalWrittenSize();
    }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
 
    void CField::solveServerOperation(void)
+   TRY
    {
       CContext* context = CContext::getCurrent();
@@ -1001,4 +1094,5 @@
       operationTimeType = functor->timeType();
    }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
@@ -1013,4 +1107,5 @@
     */
    void CField::buildFilterGraph(CGarbageCollector& gc, bool enableOutput)
+   TRY
    {     
     if (!isReferenceSolvedAndTransformed) solveAllEnabledFieldsAndTransform();
@@ -1118,4 +1213,5 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1127,4 +1223,5 @@
     */
    std::shared_ptr<COutputPin> CField::getFieldReference(CGarbageCollector& gc)
+   TRY
    {
      if (instantDataFilter || field_ref.isEmpty())
@@ -1150,4 +1247,5 @@
      return filters.second;
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1161,4 +1259,5 @@
     */
    std::shared_ptr<COutputPin> CField::getSelfReference(CGarbageCollector& gc)
+   TRY
    {
      if (instantDataFilter || !hasExpression())
@@ -1203,4 +1302,5 @@
      return selfReferenceFilter;
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1214,4 +1314,5 @@
     */
    std::shared_ptr<COutputPin> CField::getTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq)
+   TRY
    {
      std::map<CDuration, std::shared_ptr<COutputPin> >::iterator it = temporalDataFilters.find(outFreq);
@@ -1237,4 +1338,5 @@
      return it->second;
    }
+   CATCH_DUMP_ATTR
 
   /*!
@@ -1248,4 +1350,5 @@
    
    std::shared_ptr<COutputPin> CField::getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq)
+   TRY
    {
      if (instantDataFilter || !hasExpression())
@@ -1278,4 +1381,5 @@
      }
   }
+   CATCH_DUMP_ATTR
 
    //----------------------------------------------------------------
@@ -1296,4 +1400,5 @@
 
    void CField::solveGridReference(void)
+   TRY
    {
       if (grid_ref.isEmpty() && domain_ref.isEmpty() && axis_ref.isEmpty() && scalar_ref.isEmpty())
@@ -1379,16 +1484,22 @@
       }
    }
+   CATCH_DUMP_ATTR
 
    void CField::solveGridDomainAxisRef(bool checkAtt)
+   TRY
    {
      grid->solveDomainAxisRef(checkAtt);
    }
+   CATCH_DUMP_ATTR
 
    void CField::solveCheckMaskIndex(bool doSendingIndex)
+   TRY
    {
      grid->checkMaskIndex(doSendingIndex);
    }
+   CATCH_DUMP_ATTR
 
    void CField::solveTransformedGrid()
+   TRY
    {
      if (grid && !grid->isTransformed() && hasDirectFieldReference() && grid != getDirectFieldReference()->grid)
@@ -1439,6 +1550,8 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    void CField::solveGenerateGrid()
+   TRY
    {
      if (grid && !grid->isTransformed() && hasDirectFieldReference() && grid != getDirectFieldReference()->grid)
@@ -1447,10 +1560,13 @@
        grid->completeGrid();
    }
+   CATCH_DUMP_ATTR
 
    void CField::solveGridDomainAxisBaseRef()
+   TRY
    {
      grid->solveDomainAxisRef(false);
      grid->solveDomainAxisBaseRef();
    }
+   CATCH_DUMP_ATTR
 
    ///-------------------------------------------------------------------
@@ -1458,4 +1574,5 @@
    template <>
    void CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void)
+   TRY
    {
       if (this->group_ref.isEmpty()) return;
@@ -1481,16 +1598,22 @@
       }
    }
+   CATCH_DUMP_ATTR
 
    void CField::scaleFactorAddOffset(double scaleFactor, double addOffset)
+   TRY
    {
      recvDataSrv = (recvDataSrv - addOffset) / scaleFactor;
    }
+   CATCH_DUMP_ATTR
 
    void CField::invertScaleFactorAddOffset(double scaleFactor, double addOffset)
+   TRY
    {
      recvDataSrv = recvDataSrv * scaleFactor + addOffset;
    }
+   CATCH_DUMP_ATTR
 
    void CField::outputField(CArray<double,1>& fieldOut)
+   TRY
    { 
       CArray<size_t,1>& outIndexClient = grid->localIndexToWriteOnClient;
@@ -1501,6 +1624,8 @@
       }
    }
+   CATCH_DUMP_ATTR
 
    void CField::inputField(CArray<double,1>& fieldIn)
+   TRY
    {
       CArray<size_t,1>& outIndexClient = grid->localIndexToWriteOnClient;
@@ -1510,8 +1635,9 @@
         recvDataSrv(outIndexClient(idx)) = fieldIn(outIndexServer(idx));
       }
-
-   }
+   }
+   CATCH_DUMP_ATTR
 
    void CField::outputCompressedField(CArray<double,1>& fieldOut)
+   TRY
    {
       CArray<size_t,1>& outIndexClient = grid->localIndexToWriteOnClient;
@@ -1522,8 +1648,10 @@
       }
    }
+   CATCH_DUMP_ATTR
 
    ///-------------------------------------------------------------------
 
    void CField::parse(xml::CXMLNode& node)
+   TRY
    {
       string newContent ;
@@ -1540,4 +1668,5 @@
       if (node.getContent(newContent)) content=newContent ;
     }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1547,4 +1676,5 @@
    */
    const std::vector<StdString>& CField::getRefDomainAxisIds()
+   TRY
    {
      CGrid* cgPtr = getRelGrid();
@@ -1575,16 +1705,22 @@
      return (domAxisScalarIds_);
    }
+   CATCH_DUMP_ATTR
 
    CVariable* CField::addVariable(const string& id)
+   TRY
    {
      return vVariableGroup->createChild(id);
    }
+   CATCH
 
    CVariableGroup* CField::addVariableGroup(const string& id)
+   TRY
    {
      return vVariableGroup->createChildGroup(id);
    }
+   CATCH
 
    void CField::setContextClient(CContextClient* contextClient)
+   TRY
    {
      CContext* context = CContext::getCurrent();
@@ -1602,11 +1738,15 @@
      }
    }
+   CATCH_DUMP_ATTR
 
    CContextClient* CField::getContextClient()
+   TRY
    {
      return client;
    }
+   CATCH
 
    void CField::sendAddAllVariables(CContextClient* client)
+   TRY
    {
      std::vector<CVariable*> allVar = getAllVariables();
@@ -1621,5 +1761,5 @@
      }
    }
-
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1629,4 +1769,5 @@
     
    void CField::sendAllAttributesToServer(CContextClient* client)
+   TRY
    {
      if (grid_ref.isEmpty())
@@ -1638,16 +1779,22 @@
      else SuperClass::sendAllAttributesToServer(client) ;
    }
+   CATCH_DUMP_ATTR
     
    void CField::sendAddVariable(const string& id, CContextClient* client)
+   TRY
    {
       sendAddItem(id, (int)EVENT_ID_ADD_VARIABLE, client);
    }
+   CATCH_DUMP_ATTR
 
    void CField::sendAddVariableGroup(const string& id, CContextClient* client)
+   TRY
    {
       sendAddItem(id, (int)EVENT_ID_ADD_VARIABLE_GROUP, client);
    }
+   CATCH_DUMP_ATTR
 
    void CField::recvAddVariable(CEventServer& event)
+   TRY
    {
 
@@ -1657,6 +1804,8 @@
       get(id)->recvAddVariable(*buffer);
    }
+   CATCH
 
    void CField::recvAddVariable(CBufferIn& buffer)
+   TRY
    {
       string id;
@@ -1664,6 +1813,8 @@
       addVariable(id);
    }
+   CATCH_DUMP_ATTR
 
    void CField::recvAddVariableGroup(CEventServer& event)
+   TRY
    {
 
@@ -1673,6 +1824,8 @@
       get(id)->recvAddVariableGroup(*buffer);
    }
+   CATCH
 
    void CField::recvAddVariableGroup(CBufferIn& buffer)
+   TRY
    {
       string id;
@@ -1680,4 +1833,5 @@
       addVariableGroup(id);
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1685,4 +1839,5 @@
     */
    void CField::checkTimeAttributes(CDuration* freqOp)
+   TRY
    {
      bool isFieldRead  = file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read;
@@ -1706,4 +1861,5 @@
        freq_offset.setValue(isFieldRead ? NoneDu : (freq_op.getValue() - TimeStep));
    }
+   CATCH_DUMP_ATTR
 
    /*!
@@ -1712,4 +1868,5 @@
     */
    const string& CField::getExpression(void)
+   TRY
    {
      if (!expr.isEmpty() && content.empty())
@@ -1721,14 +1878,19 @@
      return content;
    }
+   CATCH_DUMP_ATTR
 
    bool CField::hasExpression(void) const
+   TRY
    {
      return (!expr.isEmpty() || !content.empty());
    }
+   CATCH
 
    bool CField::hasGridMask(void) const
+   TRY
    {
      return (this->grid->hasMask());
    }
+   CATCH
 
    DEFINE_REF_FUNC(Field,field)
