Changeset 1612 for XIOS/dev/dev_olga/src


Ignore:
Timestamp:
11/23/18 14:48:14 (5 years ago)
Author:
oabramkina
Message:

Dev: adding exception handling.

To activate it, compilation flag -DXIOS_EXCEPTION should be added.

Location:
XIOS/dev/dev_olga/src
Files:
88 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/array_new.hpp

    r1290 r1612  
    532532      virtual void fromString(const string& str) { istringstream iss(str); iss >> *this; initialized = true; } 
    533533      virtual string toString(void) const { ostringstream oss; oss << *this; return oss.str(); } 
     534 
     535      virtual string dump(void) const 
     536      { 
     537        ostringstream oss; 
     538        oss << this->shape()<<" "; 
     539        if (this->shape().numElements() == 1 && this->shape().dataFirst()[0] == 1) 
     540          oss << this->dataFirst()[0]; 
     541        else 
     542          oss << this->dataFirst()[0] <<" ... "<< this->dataFirst()[this->numElements()-1]; 
     543        return oss.str(); 
     544      } 
     545 
    534546      virtual void reset(void) { this->free(); initialized = false; } 
    535547      virtual bool isEmpty(void) const { return !initialized; } 
  • XIOS/dev/dev_olga/src/attribute.hpp

    r1158 r1612  
    4141            virtual StdString toString(void) const = 0; 
    4242            virtual void fromString(const StdString & str) = 0; 
     43            virtual StdString dump(void) const = 0; 
    4344            virtual bool isEqual(const CAttribute& ) = 0; 
    4445 
  • XIOS/dev/dev_olga/src/attribute_array.hpp

    r1219 r1612  
    5555            virtual bool toBuffer  (CBufferOut& buffer) const { return _toBuffer(buffer);} 
    5656            virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer); } 
     57            virtual string dump(void) const { return _dump();} 
    5758 
    5859            virtual void generateCInterface(ostream& oss,const string& className) ; 
     
    6970          CArray<T_numtype, N_rank> inheritedValue ; 
    7071          StdString _toString(void) const; 
     72          StdString _dump(void) const; 
    7173          void _fromString(const StdString & str); 
    7274          bool _toBuffer  (CBufferOut& buffer) const; 
  • XIOS/dev/dev_olga/src/attribute_array_impl.hpp

    r1219 r1612  
    129129    } 
    130130 
     131    template <typename T_numtype, int N_rank> 
     132    StdString CAttributeArray<T_numtype,N_rank>::_dump(void) const 
     133    { 
     134      StdOStringStream oss; 
     135      if (! isEmpty() && this->hasId() && (this->numElements()!=0)) 
     136        oss << this->getName() << "=\"" << CArray<T_numtype, N_rank>::dump() << "\""; 
     137      return (oss.str()); 
     138    } 
     139 
     140 
    131141      template <typename T_numtype, int N_rank> 
    132142         void CAttributeArray<T_numtype, N_rank>::_fromString(const StdString & str) 
  • XIOS/dev/dev_olga/src/attribute_enum.hpp

    r1219 r1612  
    1414namespace xios 
    1515{ 
    16       /// ////////////////////// Déclarations ////////////////////// /// 
     16      /// ////////////////////// Declarations ////////////////////// /// 
    1717        /*! 
    1818        \class CAttributeEnum 
     
    6262            virtual StdString toString(void) const { return _toString();} 
    6363            virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;}  else _fromString(str);} 
     64            virtual StdString dump(void) const { return _toString();} 
    6465 
    6566            virtual bool toBuffer  (CBufferOut& buffer) const { return _toBuffer(buffer);}  
  • XIOS/dev/dev_olga/src/attribute_map.cpp

    r1158 r1612  
    2828            att.second->reset(); 
    2929         } 
     30      } 
     31 
     32      ///-------------------------------------------------------------- 
     33      /*! 
     34         Dump of all non-empty attributes of an object 
     35      */ 
     36      StdString CAttributeMap::dumpXiosAttributes(void) const 
     37      { 
     38        int maxNbChar = 250; 
     39        StdString str; 
     40        typedef std::pair<StdString, CAttribute*> StdStrAttPair; 
     41        auto it = SuperClassMap::begin(), end = SuperClassMap::end(); 
     42        for (; it != end; it++) 
     43        { 
     44          const StdStrAttPair& att = *it; 
     45          if (!att.second->isEmpty()) 
     46          { 
     47            if (str.length() < maxNbChar) 
     48            { 
     49              str.append(att.second->dump()); 
     50              str.append(" "); 
     51            } 
     52            else if (str.length() == maxNbChar) 
     53            { 
     54              str.append("..."); 
     55            } 
     56          } 
     57        } 
     58        return str; 
    3059      } 
    3160 
  • XIOS/dev/dev_olga/src/attribute_map.hpp

    r1158 r1612  
    3838            void duplicateAttributes(const CAttributeMap* const _parent); 
    3939            void clearAllAttributes(void); 
     40            StdString dumpXiosAttributes(void) const; 
    4041 
    4142            void clearAttribute(const StdString& key); 
  • XIOS/dev/dev_olga/src/attribute_template.hpp

    r1478 r1612  
    7474//            virtual void toBinary  (StdOStream & os) const; 
    7575//            virtual void fromBinary(StdIStream & is); 
     76            virtual StdString dump(void) const { return _dump();} 
    7677 
    7778            virtual bool toBuffer  (CBufferOut& buffer) const { return _toBuffer(buffer);} 
     
    9899          bool isEqual_(const CAttributeTemplate& attr); 
    99100          StdString _toString(void) const; 
     101          StdString _dump(void) const; 
    100102          void _fromString(const StdString & str); 
    101103          bool _toBuffer  (CBufferOut& buffer) const; 
  • XIOS/dev/dev_olga/src/attribute_template_impl.hpp

    r1478 r1612  
    199199        CType<T>::fromString(str) ; 
    200200      } 
     201 
     202      //--------------------------------------------------------------- 
     203 
     204      template <class T> 
     205         StdString CAttributeTemplate<T>::_dump(void) const 
     206      { 
     207         StdOStringStream oss; 
     208         if (!CType<T>::isEmpty() && this->hasId()) 
     209            oss << this->getName() << "=\"" << CType<T>::dump() << "\""; 
     210         return (oss.str()); 
     211      } 
     212 
    201213 
    202214      //--------------------------------------------------------------- 
  • XIOS/dev/dev_olga/src/cxios.cpp

    r1519 r1612  
    2020  string CXios::serverPrmFile="./xios_server1"; 
    2121  string CXios::serverSndFile="./xios_server2"; 
     22 
     23  bool CXios::xiosStack = true; 
     24  bool CXios::systemStack = false; 
    2225 
    2326  bool CXios::isClient ; 
     
    6265    printLogs2Files=getin<bool>("print_file",false); 
    6366 
     67    xiosStack=getin<bool>("xios_stack",true) ; 
     68    systemStack=getin<bool>("system_stack",false) ; 
     69    if (xiosStack && systemStack) 
     70    { 
     71      xiosStack = false; 
     72    } 
     73 
    6474    StdString bufMemory("memory"); 
    6575    StdString bufPerformance("performance"); 
     
    91101  */ 
    92102  void CXios::initClientSide(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm) 
     103  TRY 
    93104  { 
    94105    initialize() ; 
     
    114125    } 
    115126  } 
     127  CATCH 
    116128 
    117129  void CXios::clientFinalize(void) 
  • XIOS/dev/dev_olga/src/cxios.hpp

    r1377 r1612  
    3333     static string serverPrmFile;  //!< Filename template for primary server in case of two server levels 
    3434     static string serverSndFile;  //!< Filename template for secondary server in case of two server levels 
     35 
     36     static bool xiosStack;    //!< Exception handling 
     37     static bool systemStack;  //!< Exception handling 
    3538 
    3639     static bool isClient ; //!< Check if xios is client 
  • XIOS/dev/dev_olga/src/data_output.cpp

    r1542 r1612  
    4747 
    4848      void CDataOutput::writeGrid(CDomain* domain, CAxis* axis) 
     49      TRY 
    4950      { 
    5051         this->writeDomain_(domain); 
    5152         this->writeAxis_(axis); 
    5253      } 
     54      CATCH 
    5355 
    5456      void CDataOutput::writeGrid(std::vector<CDomain*> domains, std::vector<CAxis*> axis) 
     57      TRY 
    5558      { 
    5659        int domSize = domains.size(); 
     
    5962        for (int i = 0; i < aSize; ++i) this->writeAxis_(axis[i]); 
    6063      } 
     64      CATCH 
    6165 
    6266      void CDataOutput::writeGrid(std::vector<CDomain*> domains, std::vector<CAxis*> axis, std::vector<CScalar*> scalars) 
     67      TRY 
    6368      { 
    6469        int domSize = domains.size(); 
     
    6974        for (int i = 0; i < sSize; ++i) this->writeScalar_(scalars[i]); 
    7075      } 
     76      CATCH 
    7177 
    7278      //---------------------------------------------------------------- 
    7379 
    7480      void CDataOutput::writeGrid(CDomain* domain) 
     81      TRY 
    7582      { 
    7683         this->writeDomain_(domain); 
    7784      } 
     85      CATCH 
    7886 
    7987      void CDataOutput::writeTimeDimension(void) 
     88      TRY 
    8089      { 
    8190         this->writeTimeDimension_(); 
    8291      } 
     92      CATCH 
    8393 
    8494      //---------------------------------------------------------------- 
    8595 
    8696      void CDataOutput::writeFieldTimeAxis(CField* field) 
     97      TRY 
    8798      { 
    8899         CContext* context = CContext::getCurrent() ; 
     
    91102         this->writeTimeAxis_(field, calendar); 
    92103      } 
    93        
     104      CATCH 
     105 
    94106      void CDataOutput::writeField(CField* field) 
     107      TRY 
    95108      { 
    96109         this->writeField_(field); 
    97110      } 
     111      CATCH 
    98112 
    99113      //---------------------------------------------------------------- 
    100114 
    101115      void CDataOutput::writeFieldGrid(CField* field) 
     116      TRY 
    102117      { 
    103118         this->writeGrid(field->getRelGrid(), 
    104119                         !field->indexed_output.isEmpty() && field->indexed_output); 
    105120      } 
    106  
     121      CATCH 
    107122      //---------------------------------------------------------------- 
    108123 
    109124      void CDataOutput::writeFieldData(CField* field) 
     125      TRY 
    110126      { 
    111127//         CGrid* grid = CGrid::get(field->grid_ref.getValue()); 
     
    113129         this->writeFieldData_(field); 
    114130      } 
     131      CATCH 
    115132 
    116133      ///---------------------------------------------------------------- 
  • XIOS/dev/dev_olga/src/exception.cpp

    r828 r1612  
    55#include "client.hpp" 
    66#include "server.hpp" 
    7 #include "cxios.hpp" 
    87#include "log.hpp" 
    98 
     
    1211  /// ////////////////////// Définitions ////////////////////// /// 
    1312   CException::CException(void) 
    14       : CObject(), desc_rethrow(true) 
     13      : CObject(), desc_rethrow(true), stream() 
    1514   { /* Ne rien faire de plus */ } 
    1615 
    17    CException::CException(const StdString & id) 
    18       : CObject(id), desc_rethrow(true) 
     16   CException::CException(const std::string & id) 
     17      : CObject(id), desc_rethrow(true), stream() 
    1918   { /* Ne rien faire de plus */ } 
    2019 
    2120   CException::CException(const CException & exception) 
    22       : std::basic_ios<char>() 
    23       , CObject(exception.getId()) 
    24       , StdOStringStream() 
    25       , desc_rethrow(false) 
     21//      : std::basic_ios<char>() 
     22       : CObject(exception.getId()) 
     23//      , StdOStringStream() 
     24//      , desc_rethrow(false) 
    2625   { (*this) << exception.str(); } 
    2726 
    2827   CException::~CException(void) 
    2928   { 
    30       if (desc_rethrow) 
    31 #ifdef __XIOS_NOABORT 
    32       { 
    33         throw (*this); 
    34       } 
    35 #else 
    36      { 
    37       error << this->getMessage() << std::endl; 
    38       MPI_Abort(CXios::globalComm, -1); //abort(); 
    39       } 
    40 #endif 
     29//      if (desc_rethrow) 
     30//#ifdef __XIOS_NOABORT 
     31//      { 
     32//        throw (*this); 
     33//      } 
     34//#else 
     35//     { 
     36//      error << this->getMessage() << std::endl; 
     37//        throw 4; 
     38//      MPI_Abort(CXios::globalComm, -1); //abort(); 
     39//      } 
     40//#endif 
    4141   } 
    4242 
    4343   //--------------------------------------------------------------- 
    4444 
    45    StdString CException::getMessage(void) const 
     45   std::string CException::getMessage(void) const 
    4646   { 
    47       StdOStringStream oss; 
    48       oss << "> Error [" << this->getId() << "] : " << this->str(); 
    49       return (oss.str()); 
     47//     StdOStringStream oss; 
     48//     oss << "> Error [" << this->getId() << "] : " << this->str(); 
     49//     return (oss.str()); 
     50     return (stream.str()); 
    5051   } 
    5152 
    5253   StdOStringStream &  CException::getStream(void) 
    53    { return (*boost::polymorphic_cast<StdOStringStream*>(this)); } 
     54//   { return (*boost::polymorphic_cast<StdOStringStream*>(this)); } 
     55   { return stream; } 
    5456 
    55    StdString CException::toString(void) const 
    56    { return (StdString(this->getMessage())); } 
     57   std::string CException::toString(void) const 
     58//   { return (std::string(this->getMessage())); } 
     59   { return stream.str(); } 
    5760 
    58    void CException::fromString(const StdString & str) 
    59    { this->str(str); } 
     61   void CException::fromString(const std::string & str) 
     62   { } 
     63//   { this->str(str); } 
    6064 
    6165   //--------------------------------------------------------------- 
  • XIOS/dev/dev_olga/src/exception.hpp

    r792 r1612  
    55#include "xios_spl.hpp" 
    66#include "object.hpp" 
     7#include <iomanip> 
     8#include <stdexcept> 
    79 
    810namespace xios 
    911{ 
    1012   /// ////////////////////// Déclarations ////////////////////// /// 
     13 
    1114   class CException 
    1215      : private CObject, public StdOStringStream 
     
    3336         virtual void fromString(const StdString & str); 
    3437 
     38         struct StackInfo 
     39         { 
     40           StdString file; 
     41           StdString function; 
     42           int line; 
     43           StdString info; 
     44         }; 
     45 
     46         std::list<StackInfo> stack; 
     47 
    3548      private : 
    3649 
    3750         /// Propriétés /// 
    3851         bool desc_rethrow; // throw destructor 
     52         StdOStringStream stream; 
    3953 
    4054   }; // CException 
     
    4357/// //////////////////////////// Macros //////////////////////////// /// 
    4458 
     59#define FILE_NAME (std::strrchr("/" __FILE__, '/') + 1) 
     60 
     61#define FUNCTION_NAME (StdString(BOOST_CURRENT_FUNCTION).length() > 100 ? \ 
     62                       StdString(BOOST_CURRENT_FUNCTION).substr(0,100).append("...)") : BOOST_CURRENT_FUNCTION) 
     63 
    4564#define INFO(x) \ 
    46    "In file \'" __FILE__ "\', line " << __LINE__ << " -> " x << std::endl; 
     65   "In file \""<< FILE_NAME <<"\", function \"" << BOOST_CURRENT_FUNCTION <<"\", line " << __LINE__ << " -> " x << std::endl; 
    4766 
    4867#ifdef __XIOS_DEBUG 
     
    5271#endif 
    5372 
    54 #define ERROR(id, x) xios::CException(id).getStream() << INFO(x) 
     73#define ERROR(id, x)  \ 
     74{                     \ 
     75       xios::CException exc(id);                \ 
     76       exc.getStream() << INFO(x);              \ 
     77       error << exc.getMessage() << std::endl;  \ 
     78       throw exc;                               \ 
     79} 
     80 
     81#ifdef __XIOS_EXCEPTION 
     82  #define TRY                          \ 
     83    {                                  \ 
     84      int funcFirstLine = __LINE__;    \ 
     85      try 
     86  #define CATCH                              \ 
     87      catch(CException& e)                   \ 
     88      {                                      \ 
     89        CException::StackInfo stk;           \ 
     90        stk.file = FILE_NAME;                \ 
     91        stk.function = FUNCTION_NAME;        \ 
     92        stk.line = funcFirstLine;            \ 
     93        e.stack.push_back(stk);              \ 
     94        if (CXios::xiosStack)                \ 
     95          throw;                             \ 
     96       else                                  \ 
     97         throw 0;                            \ 
     98      }                                      \ 
     99    } 
     100  #define CATCH_DUMP_ATTR                    \ 
     101      catch(CException& e)                   \ 
     102      {                                      \ 
     103        CException::StackInfo stk;           \ 
     104        stk.info.append(StdString("Object id=\"" + this->getId()) + "\" object type=\"" + this->getName() + "\"\n"); \ 
     105        stk.info.append("*** XIOS attributes as defined in XML file(s) or via Fortran interface:\n");                \ 
     106        stk.info.append("[" + this->dumpXiosAttributes() + "]\n");     \ 
     107        stk.info.append("*** Additional information:\n");              \ 
     108        stk.info.append("[" + this->dumpClassAttributes() + "]\n");    \ 
     109        stk.file = FILE_NAME;                \ 
     110        stk.function = FUNCTION_NAME;        \ 
     111        stk.line = funcFirstLine;            \ 
     112        e.stack.push_back(stk);              \ 
     113        if (CXios::xiosStack)                \ 
     114          throw;                             \ 
     115       else                                  \ 
     116         throw 0;                            \ 
     117      }                                      \ 
     118    } 
     119  #define CATCH_DUMP_STACK                                           \ 
     120      catch(CException& e)                                           \ 
     121      {                                                              \ 
     122        CException::StackInfo stk;                                   \ 
     123        int i = 1;                                                   \ 
     124        stk.file = FILE_NAME;                                        \ 
     125        stk.function = FUNCTION_NAME;                                \ 
     126        stk.line = funcFirstLine;                                    \ 
     127        e.stack.push_back(stk);                                      \ 
     128        for (auto itr = e.stack.crbegin(); itr!=e.stack.crend(); ++itr) \ 
     129        {                                                            \ 
     130          error << "("<< i <<") **************** ";                  \ 
     131          error << itr->function << std::endl;                       \ 
     132          error << itr->info << std::endl;                           \ 
     133          ++i;                                                       \ 
     134        }                                                            \ 
     135        error << left << "      ";                                   \ 
     136        error << left << std::setw(40) << "File " ;                  \ 
     137        error << left << std::setw(106) << "Function " ;             \ 
     138        error << std::setw(5)   << "Line " << std::endl;             \ 
     139        i = e.stack.size();                                          \ 
     140        for (auto itr = e.stack.begin(); itr!=e.stack.end(); itr++)  \ 
     141        {                                                            \ 
     142          StdOStringStream tmp;                                      \ 
     143          tmp <<  "("<< i <<")";                                     \ 
     144          error << left << std::setw(6) << tmp.str();                \ 
     145          error << left << std::setw(40)  << itr->file;              \ 
     146          error << left << std::setw(106) << itr->function;          \ 
     147          error << left << std::setw(5)   << itr->line << std::endl; \ 
     148          --i;                                                       \ 
     149        }                                                            \ 
     150        throw;                                                       \ 
     151      }                                                              \ 
     152    } 
     153#else 
     154  #define TRY 
     155  #define CATCH 
     156  #define CATCH_DUMP_ATTR 
     157  #define CATCH_DUMP_STACK 
     158#endif 
    55159 
    56160#endif // __XIOS_CException__ 
     161 
  • XIOS/dev/dev_olga/src/interface/c/icaxis.cpp

    r1542 r1612  
    2828    
    2929   void cxios_axis_handle_create (XAxisPtr * _ret, const char * _id, int _id_len) 
     30   TRY 
    3031   { 
    3132      std::string id;  
     
    3536      CTimer::get("XIOS").suspend() ; 
    3637   } 
     38   CATCH_DUMP_STACK 
    3739    
    3840   void cxios_axisgroup_handle_create (XAxisGroupPtr * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id;  
     
    4447      CTimer::get("XIOS").suspend() ; 
    4548    } 
     49   CATCH_DUMP_STACK 
    4650 
    4751   // -------------------- Vérification des identifiants ----------------------- 
    4852 
    4953   void cxios_axis_valid_id (bool * _ret, const char * _id, int _id_len) 
     54   TRY 
    5055   { 
    5156      std::string id; 
     
    5661      CTimer::get("XIOS").suspend() ; 
    5762   } 
     63   CATCH_DUMP_STACK 
    5864 
    5965   void cxios_axisgroup_valid_id (bool * _ret, const char * _id, int _id_len) 
     66   TRY 
    6067   { 
    6168      std::string id; 
     
    6774 
    6875   } 
     76   CATCH_DUMP_STACK 
    6977    
    7078} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/iccalendar.cpp

    r1542 r1612  
    1010{ 
    1111  void cxios_update_calendar(int step) 
     12  TRY 
    1213  { 
    1314    CTimer::get("XIOS").resume(); 
     
    1920    CTimer::get("XIOS").suspend(); 
    2021  } 
     22  CATCH_DUMP_STACK 
    2123 
    2224  void cxios_get_current_date(cxios_date* current_date_c) 
     25  TRY 
    2326  { 
    2427    CTimer::get("XIOS").resume(); 
     
    3740    CTimer::get("XIOS").suspend(); 
    3841  } 
     42  CATCH_DUMP_STACK 
    3943 
    4044  int cxios_get_year_length_in_seconds(int year) 
     45  TRY 
    4146  { 
    4247    CTimer::get("XIOS").resume(); 
     
    5055    return length; 
    5156  } 
     57  CATCH_DUMP_STACK 
    5258 
    5359  int cxios_get_day_length_in_seconds() 
     60  TRY 
    5461  { 
    5562    CTimer::get("XIOS").resume(); 
     
    6370    return length; 
    6471  } 
     72  CATCH_DUMP_STACK 
    6573} 
  • XIOS/dev/dev_olga/src/interface/c/iccalendar_wrapper.cpp

    r1542 r1612  
    2929 
    3030  void cxios_calendar_wrapper_handle_create(XCalendarWrapperPtr* _ret, const char* _id, int _id_len) 
     31  TRY 
    3132  { 
    3233    std::string id; 
     
    3637    CTimer::get("XIOS").suspend(); 
    3738  } 
     39  CATCH_DUMP_STACK 
    3840 
    3941  void cxios_get_current_calendar_wrapper(XCalendarWrapperPtr* _ret) 
     42  TRY 
    4043  { 
    4144    CTimer::get("XIOS").resume(); 
     
    4346    CTimer::get("XIOS").suspend(); 
    4447  } 
     48  CATCH_DUMP_STACK 
    4549 
    4650  // -------------------- Vérification des identifiants ----------------------- 
    4751 
    4852  void cxios_calendar_wrapper_valid_id(bool* _ret, const char* _id, int _id_len) 
     53  TRY 
    4954  { 
    5055    std::string id; 
     
    5459    CTimer::get("XIOS").suspend(); 
    5560  } 
     61  CATCH_DUMP_STACK 
    5662 
    5763  // ----------------------- Custom getters and setters ----------------------- 
    5864 
    5965  void cxios_set_calendar_wrapper_date_start_date(XCalendarWrapperPtr calendarWrapper_hdl, cxios_date start_date_c) 
     66  TRY 
    6067  { 
    6168    CTimer::get("XIOS").resume(); 
     
    7077    CTimer::get("XIOS").suspend(); 
    7178  } 
     79  CATCH_DUMP_STACK 
    7280 
    7381  void cxios_get_calendar_wrapper_date_start_date(XCalendarWrapperPtr calendarWrapper_hdl, cxios_date* start_date_c) 
     82  TRY 
    7483  { 
    7584    CTimer::get("XIOS").resume(); 
     
    8392    CTimer::get("XIOS").suspend(); 
    8493  } 
     94  CATCH_DUMP_STACK 
    8595 
    8696  void cxios_set_calendar_wrapper_date_time_origin(XCalendarWrapperPtr calendarWrapper_hdl, cxios_date time_origin_c) 
     97  TRY 
    8798  { 
    8899    CTimer::get("XIOS").resume(); 
     
    97108    CTimer::get("XIOS").suspend(); 
    98109  } 
     110  CATCH_DUMP_STACK 
    99111 
    100112  void cxios_get_calendar_wrapper_date_time_origin(XCalendarWrapperPtr calendarWrapper_hdl, cxios_date* time_origin_c) 
     113  TRY 
    101114  { 
    102115    CTimer::get("XIOS").resume(); 
     
    110123    CTimer::get("XIOS").suspend(); 
    111124  } 
     125  CATCH_DUMP_STACK 
    112126 
    113127  // ----------------------- Calendar creation and update ---------------------- 
    114128 
    115129  void cxios_create_calendar(XCalendarWrapperPtr calendarWrapper_hdl) 
     130  TRY 
    116131  { 
    117132    CTimer::get("XIOS").resume(); 
     
    119134    CTimer::get("XIOS").suspend(); 
    120135  } 
     136  CATCH_DUMP_STACK 
    121137 
    122138  void cxios_update_calendar_timestep(XCalendarWrapperPtr calendarWrapper_hdl) 
     139  TRY 
    123140  { 
    124141    CTimer::get("XIOS").resume(); 
     
    126143    CTimer::get("XIOS").suspend(); 
    127144  } 
     145  CATCH_DUMP_STACK 
    128146} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/iccompute_connectivity_domain.cpp

    r1542 r1612  
    2525   // ------------------------ Création des handle ----------------------------- 
    2626   void cxios_compute_connectivity_domain_handle_create(XComConDomainPtr * _ret, const char * _id, int _id_len) 
     27   TRY 
    2728   { 
    2829      std::string id; 
     
    3233      CTimer::get("XIOS").suspend() ; 
    3334   } 
     35   CATCH_DUMP_STACK 
    3436 
    3537   // -------------------- Vérification des identifiants ----------------------- 
    3638   void cxios_compute_connectivity_domain_valid_id(bool * _ret, const char * _id, int _id_len) 
     39   TRY 
    3740   { 
    3841      std::string id; 
     
    4346      CTimer::get("XIOS").suspend() ; 
    4447   } 
     48   CATCH_DUMP_STACK 
    4549} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/iccontext.cpp

    r1542 r1612  
    3232 
    3333   void cxios_context_handle_create (XContextPtr * _ret, const char * _id, int _id_len) 
     34   TRY 
    3435   { 
    3536      std::string id; 
     
    5455      // Lever une exeception ici 
    5556   } 
     57   CATCH_DUMP_STACK 
    5658 
    5759   // ------------------------ Changements de contextes ------------------------ 
    5860 
    5961   void cxios_context_get_current(XContextPtr* context) 
     62   TRY 
    6063   { 
    6164      CTimer::get("XIOS").resume(); 
     
    6366      CTimer::get("XIOS").suspend(); 
    6467   } 
     68   CATCH_DUMP_STACK 
    6569 
    6670   void cxios_context_set_current(XContextPtr context, bool withswap) 
     71   TRY 
    6772   { 
    6873      CTimer::get("XIOS").resume() ; 
     
    7075      CTimer::get("XIOS").suspend() ; 
    7176   } 
     77   CATCH_DUMP_STACK 
    7278 
    7379   // -------------------- Vérification des identifiants ----------------------- 
    7480 
    7581   void cxios_context_valid_id (bool * _ret, const char * _id, int _id_len) 
     82   TRY 
    7683   { 
    7784      std::string id; 
     
    93100      CTimer::get("XIOS").suspend(); 
    94101   } 
     102   CATCH_DUMP_STACK 
    95103} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icdata.cpp

    r1590 r1612  
    4343   // it is only used from the parse_xml.exe standalone test tool. 
    4444   void cxios_init(void) 
     45   TRY 
    4546   { 
    4647     CXios::initialize(); 
    4748   } 
     49   CATCH_DUMP_STACK 
    4850 
    4951   void cxios_init_server(void) 
     52   TRY 
    5053   { 
    5154     CXios::initServerSide(); 
    5255   } 
     56   CATCH_DUMP_STACK 
    5357 
    5458   void cxios_init_client(const char* client_id , int len_client_id, MPI_Fint* f_local_comm, MPI_Fint* f_return_comm ) 
     59   TRY 
    5560   { 
    5661      std::string str; 
     
    6974      CTimer::get("XIOS").suspend(); 
    7075   } 
     76   CATCH_DUMP_STACK 
    7177 
    7278   void cxios_context_initialize(const char* context_id , int len_context_id, MPI_Fint* f_comm) 
     79   TRY 
    7380   { 
    7481     std::string str; 
     
    8390     CTimer::get("XIOS").suspend(); 
    8491   } 
     92   CATCH_DUMP_STACK 
    8593 
    8694   void cxios_oasis_enddef() 
     95   TRY 
    8796   { 
    8897     CTimer::get("XIOS").resume(); 
     
    9099     CTimer::get("XIOS").suspend(); 
    91100   } 
     101   CATCH_DUMP_STACK 
    92102 
    93103   void cxios_context_is_initialized(const char* context_id , int len_context_id, bool* initialized) 
     104   TRY 
    94105   { 
    95106     std::string str; 
     
    101112     CTimer::get("XIOS").suspend(); 
    102113   } 
    103  
    104     void cxios_context_close_definition() 
     114   CATCH_DUMP_STACK 
     115 
     116   void cxios_context_close_definition() 
     117   TRY 
    105118   { 
    106119     CTimer::get("XIOS").resume(); 
     
    111124     CTimer::get("XIOS").suspend(); 
    112125   } 
     126   CATCH_DUMP_STACK 
    113127 
    114128   void cxios_context_finalize() 
     129   TRY 
    115130   { 
    116131     CTimer::get("XIOS").resume(); 
     
    121136     CTimer::get("XIOS").suspend(); 
    122137   } 
     138   CATCH_DUMP_STACK 
    123139 
    124140   void cxios_finalize() 
     141   TRY 
    125142   { 
    126143     CTimer::get("XIOS").resume(); 
     
    128145     CXios::clientFinalize(); 
    129146   } 
     147   CATCH_DUMP_STACK 
    130148 
    131149   void cxios_solve_inheritance() 
     150   TRY 
    132151   { 
    133152     CTimer::get("XIOS").resume(); 
     
    136155     CTimer::get("XIOS").suspend(); 
    137156   } 
     157   CATCH_DUMP_STACK 
    138158 
    139159   /*! \brief This group of functions retrieve variable information from the configuration file (.xml) 
     
    148168   */ 
    149169   void cxios_get_variable_data_k8(const char* varId, int varIdSize, double* data, bool* isVarExisted) 
     170   TRY 
    150171   { 
    151172      std::string varIdStr; 
     
    166187      CTimer::get("XIOS").suspend(); 
    167188   } 
     189   CATCH_DUMP_STACK 
    168190 
    169191   void cxios_get_variable_data_k4(const char* varId, int varIdSize, float* data, bool* isVarExisted) 
     192   TRY 
    170193   { 
    171194      std::string varIdStr; 
     
    186209      CTimer::get("XIOS").suspend(); 
    187210   } 
     211   CATCH_DUMP_STACK 
    188212 
    189213   void cxios_get_variable_data_int(const char* varId, int varIdSize, int* data, bool* isVarExisted) 
     214   TRY 
    190215   { 
    191216      std::string varIdStr; 
     
    206231      CTimer::get("XIOS").suspend(); 
    207232   } 
     233   CATCH_DUMP_STACK 
    208234 
    209235   void cxios_get_variable_data_logic(const char* varId, int varIdSize, bool* data, bool* isVarExisted) 
     236   TRY 
    210237   { 
    211238      std::string varIdStr; 
     
    226253      CTimer::get("XIOS").suspend(); 
    227254   } 
     255   CATCH_DUMP_STACK 
    228256 
    229257   void cxios_get_variable_data_char(const char* varId, int varIdSize, char* data, int dataSizeIn, bool* isVarExisted) 
     258   TRY 
    230259   { 
    231260      std::string varIdStr; 
     
    247276      CTimer::get("XIOS").suspend(); 
    248277   } 
     278   CATCH_DUMP_STACK 
    249279 
    250280   /*! \brief This group of functions write information into existing variable in the configuration file (.xml) 
     
    259289   */ 
    260290   void cxios_set_variable_data_k8(const char* varId, int varIdSize, double data, bool* isVarExisted) 
    261    { 
     291   TRY 
     292  { 
    262293      std::string varIdStr; 
    263294      if (!cstr2string(varId, varIdSize, varIdStr)) return; 
     
    278309      CTimer::get("XIOS").suspend(); 
    279310   } 
     311   CATCH_DUMP_STACK 
    280312 
    281313   void cxios_set_variable_data_k4(const char* varId, int varIdSize, float data, bool* isVarExisted) 
     314   TRY 
    282315   { 
    283316      std::string varIdStr; 
     
    299332      CTimer::get("XIOS").suspend(); 
    300333   } 
     334   CATCH_DUMP_STACK 
    301335 
    302336   void cxios_set_variable_data_int(const char* varId, int varIdSize, int data, bool* isVarExisted) 
     337   TRY 
    303338   { 
    304339      std::string varIdStr; 
     
    321356      CTimer::get("XIOS").suspend(); 
    322357   } 
     358   CATCH_DUMP_STACK 
    323359 
    324360   void cxios_set_variable_data_logic(const char* varId, int varIdSize, bool data, bool* isVarExisted) 
     361   TRY 
    325362   { 
    326363      std::string varIdStr; 
     
    342379      CTimer::get("XIOS").suspend(); 
    343380   } 
     381   CATCH_DUMP_STACK 
    344382 
    345383   void cxios_set_variable_data_char(const char* varId, int varIdSize, const char* data, int dataSizeIn, bool* isVarExisted) 
    346    { 
     384   TRY 
     385  { 
    347386      std::string varIdStr, dataStr; 
    348387      if (!cstr2string(varId, varIdSize, varIdStr)) return; 
     
    368407      CTimer::get("XIOS").suspend(); 
    369408   } 
    370  
     409   CATCH_DUMP_STACK 
    371410 
    372411   // ---------------------- Ecriture des données ------------------------------ 
    373412 
    374413   void cxios_write_data_k80(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize) 
     414   TRY 
    375415   { 
    376416      std::string fieldid_str; 
     
    387427      CTimer::get("XIOS").suspend(); 
    388428   } 
     429   CATCH_DUMP_STACK 
    389430 
    390431   void cxios_write_data_k81(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize) 
     432   TRY 
    391433   { 
    392434      std::string fieldid_str; 
     
    406448      CTimer::get("XIOS").suspend(); 
    407449   } 
     450   CATCH_DUMP_STACK 
    408451 
    409452   void cxios_write_data_k82(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize) 
     453   TRY 
    410454   { 
    411455      std::string fieldid_str; 
     
    425469      CTimer::get("XIOS").suspend(); 
    426470   } 
     471   CATCH_DUMP_STACK 
    427472 
    428473   void cxios_write_data_k83(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize) 
     474   TRY 
    429475   { 
    430476      std::string fieldid_str; 
     
    444490      CTimer::get("XIOS").suspend(); 
    445491   } 
     492   CATCH_DUMP_STACK 
    446493 
    447494   void cxios_write_data_k84(const char* fieldid, int fieldid_size, double* data_k8, int data_0size, int data_1size, int data_2size, int data_3size) 
     495   TRY 
    448496   { 
    449497      std::string fieldid_str; 
     
    463511      CTimer::get("XIOS").suspend(); 
    464512   } 
     513   CATCH_DUMP_STACK 
    465514 
    466515   void cxios_write_data_k85(const char* fieldid, int fieldid_size, double* data_k8, 
    467516                             int data_0size, int data_1size, int data_2size, 
    468517                             int data_3size, int data_4size) 
     518   TRY 
    469519   { 
    470520      std::string fieldid_str; 
     
    484534      CTimer::get("XIOS").suspend(); 
    485535   } 
     536   CATCH_DUMP_STACK 
    486537 
    487538   void cxios_write_data_k86(const char* fieldid, int fieldid_size, double* data_k8, 
    488539                             int data_0size, int data_1size, int data_2size, 
    489540                             int data_3size, int data_4size, int data_5size) 
     541   TRY 
    490542   { 
    491543      std::string fieldid_str; 
     
    505557      CTimer::get("XIOS").suspend(); 
    506558   } 
     559   CATCH_DUMP_STACK 
    507560 
    508561   void cxios_write_data_k87(const char* fieldid, int fieldid_size, double* data_k8, 
     
    510563                             int data_3size, int data_4size, int data_5size, 
    511564                             int data_6size) 
     565   TRY 
    512566   { 
    513567      std::string fieldid_str; 
     
    527581      CTimer::get("XIOS").suspend(); 
    528582   } 
     583   CATCH_DUMP_STACK 
    529584 
    530585   void cxios_write_data_k40(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize) 
     586   TRY 
    531587   { 
    532588      std::string fieldid_str; 
     
    546602      CTimer::get("XIOS").suspend(); 
    547603   } 
     604   CATCH_DUMP_STACK 
    548605 
    549606   void cxios_write_data_k41(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize) 
     607   TRY 
    550608   { 
    551609      std::string fieldid_str; 
     
    567625      CTimer::get("XIOS").suspend(); 
    568626   } 
     627   CATCH_DUMP_STACK 
    569628 
    570629   void cxios_write_data_k42(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize) 
     630   TRY 
    571631   { 
    572632      std::string fieldid_str; 
     
    588648      CTimer::get("XIOS").suspend(); 
    589649   } 
     650   CATCH_DUMP_STACK 
    590651 
    591652   void cxios_write_data_k43(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize) 
     653   TRY 
    592654   { 
    593655      std::string fieldid_str; 
     
    609671      CTimer::get("XIOS").suspend(); 
    610672    } 
     673   CATCH_DUMP_STACK 
    611674 
    612675   void cxios_write_data_k44(const char* fieldid, int fieldid_size, float* data_k4, 
    613676                             int data_0size, int data_1size, int data_2size, 
    614677                             int data_3size) 
     678   TRY 
    615679   { 
    616680      std::string fieldid_str; 
     
    632696      CTimer::get("XIOS").suspend(); 
    633697    } 
     698   CATCH_DUMP_STACK 
    634699 
    635700   void cxios_write_data_k45(const char* fieldid, int fieldid_size, float* data_k4, 
    636701                             int data_0size, int data_1size, int data_2size, 
    637702                             int data_3size, int data_4size) 
     703   TRY 
    638704   { 
    639705      std::string fieldid_str; 
     
    655721      CTimer::get("XIOS").suspend(); 
    656722    } 
     723   CATCH_DUMP_STACK 
    657724 
    658725   void cxios_write_data_k46(const char* fieldid, int fieldid_size, float* data_k4, 
    659726                             int data_0size, int data_1size, int data_2size, 
    660727                             int data_3size, int data_4size, int data_5size) 
     728   TRY 
    661729   { 
    662730      std::string fieldid_str; 
     
    678746      CTimer::get("XIOS").suspend(); 
    679747    } 
     748   CATCH_DUMP_STACK 
    680749 
    681750   void cxios_write_data_k47(const char* fieldid, int fieldid_size, float* data_k4, 
     
    683752                             int data_3size, int data_4size, int data_5size, 
    684753                             int data_6size) 
     754   TRY 
    685755   { 
    686756      std::string fieldid_str; 
     
    702772      CTimer::get("XIOS").suspend(); 
    703773    } 
     774   CATCH_DUMP_STACK 
    704775 
    705776   // ---------------------- Lecture des données ------------------------------ 
    706777 
    707778   void cxios_read_data_k80(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize) 
     779   TRY 
    708780   { 
    709781      std::string fieldid_str; 
     
    723795      CTimer::get("XIOS").suspend(); 
    724796   } 
     797   CATCH_DUMP_STACK 
    725798 
    726799   void cxios_read_data_k81(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize) 
     800   TRY 
    727801   { 
    728802      std::string fieldid_str; 
     
    742816      CTimer::get("XIOS").suspend(); 
    743817   } 
     818   CATCH_DUMP_STACK 
    744819 
    745820   void cxios_read_data_k82(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize) 
     821   TRY 
    746822   { 
    747823      std::string fieldid_str; 
     
    761837      CTimer::get("XIOS").suspend(); 
    762838   } 
     839   CATCH_DUMP_STACK 
    763840 
    764841   void cxios_read_data_k83(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize) 
     842   TRY 
    765843   { 
    766844      std::string fieldid_str; 
     
    780858      CTimer::get("XIOS").suspend(); 
    781859   } 
     860   CATCH_DUMP_STACK 
    782861 
    783862   void cxios_read_data_k84(const char* fieldid, int fieldid_size, double* data_k8, 
    784863                            int data_0size, int data_1size, int data_2size, 
    785864                            int data_3size) 
     865   TRY 
    786866   { 
    787867      std::string fieldid_str; 
     
    801881      CTimer::get("XIOS").suspend(); 
    802882   } 
     883   CATCH_DUMP_STACK 
    803884 
    804885   void cxios_read_data_k85(const char* fieldid, int fieldid_size, double* data_k8, 
    805886                            int data_0size, int data_1size, int data_2size, 
    806887                            int data_3size, int data_4size) 
     888   TRY 
    807889   { 
    808890      std::string fieldid_str; 
     
    822904      CTimer::get("XIOS").suspend(); 
    823905   } 
     906   CATCH_DUMP_STACK 
    824907 
    825908   void cxios_read_data_k86(const char* fieldid, int fieldid_size, double* data_k8, 
    826909                            int data_0size, int data_1size, int data_2size, 
    827910                            int data_3size, int data_4size, int data_5size) 
     911   TRY 
    828912   { 
    829913      std::string fieldid_str; 
     
    843927      CTimer::get("XIOS").suspend(); 
    844928   } 
     929   CATCH_DUMP_STACK 
    845930 
    846931   void cxios_read_data_k87(const char* fieldid, int fieldid_size, double* data_k8, 
     
    848933                            int data_3size, int data_4size, int data_5size, 
    849934                            int data_6size) 
     935   TRY 
    850936   { 
    851937      std::string fieldid_str; 
     
    865951      CTimer::get("XIOS").suspend(); 
    866952   } 
     953   CATCH_DUMP_STACK 
    867954 
    868955   void cxios_read_data_k40(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize) 
     956   TRY 
    869957   { 
    870958      std::string fieldid_str; 
     
    886974      CTimer::get("XIOS").suspend(); 
    887975   } 
     976   CATCH_DUMP_STACK 
    888977 
    889978   void cxios_read_data_k41(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize) 
     979   TRY 
    890980   { 
    891981      std::string fieldid_str; 
     
    907997      CTimer::get("XIOS").suspend(); 
    908998   } 
     999   CATCH_DUMP_STACK 
    9091000 
    9101001   void cxios_read_data_k42(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize) 
     1002   TRY 
    9111003   { 
    9121004      std::string fieldid_str; 
     
    9281020      CTimer::get("XIOS").suspend(); 
    9291021   } 
     1022   CATCH_DUMP_STACK 
    9301023 
    9311024   void cxios_read_data_k43(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize) 
     1025   TRY 
    9321026   { 
    9331027      std::string fieldid_str; 
     
    9491043      CTimer::get("XIOS").suspend(); 
    9501044    } 
     1045   CATCH_DUMP_STACK 
    9511046 
    9521047   void cxios_read_data_k44(const char* fieldid, int fieldid_size, float* data_k4, 
    9531048                            int data_0size, int data_1size, int data_2size, 
    9541049                            int data_3size) 
     1050   TRY 
    9551051   { 
    9561052      std::string fieldid_str; 
     
    9721068      CTimer::get("XIOS").suspend(); 
    9731069    } 
     1070   CATCH_DUMP_STACK 
    9741071 
    9751072   void cxios_read_data_k45(const char* fieldid, int fieldid_size, float* data_k4, 
    9761073                            int data_0size, int data_1size, int data_2size, 
    9771074                            int data_3size, int data_4size) 
     1075   TRY 
    9781076   { 
    9791077      std::string fieldid_str; 
     
    9951093      CTimer::get("XIOS").suspend(); 
    9961094    } 
     1095   CATCH_DUMP_STACK 
    9971096 
    9981097   void cxios_read_data_k46(const char* fieldid, int fieldid_size, float* data_k4, 
    9991098                            int data_0size, int data_1size, int data_2size, 
    10001099                            int data_3size, int data_4size, int data_5size) 
     1100   TRY 
    10011101   { 
    10021102      std::string fieldid_str; 
     
    10181118      CTimer::get("XIOS").suspend(); 
    10191119    } 
     1120   CATCH_DUMP_STACK 
    10201121 
    10211122   void cxios_read_data_k47(const char* fieldid, int fieldid_size, float* data_k4, 
     
    10231124                            int data_3size, int data_4size, int data_5size, 
    10241125                            int data_6size) 
     1126   TRY 
    10251127   { 
    10261128      std::string fieldid_str; 
     
    10421144      CTimer::get("XIOS").suspend(); 
    10431145    } 
     1146   CATCH_DUMP_STACK 
    10441147} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icdate.cpp

    r1542 r1612  
    3535{ 
    3636  long long int cxios_date_convert_to_seconds(cxios_date date_c) 
     37  TRY 
    3738  { 
    3839    xios::CDate date = xios::CDate(getCalendar("long long int cxios_date_convert_to_seconds(cxios_date date_c)"), 
     
    4142    return date; 
    4243  } 
     44  CATCH_DUMP_STACK 
    4345 
    4446  void cxios_date_convert_to_string(cxios_date date_c, char* str, int str_size) 
     47  TRY 
    4548  { 
    4649    xios::CDate date = xios::CDate(getCalendar("void cxios_date_convert_to_string(cxios_date date_c, char* str, int str_size)"), 
     
    5154      ERROR("void cxios_date_convert_to_string(cxios_date date_c, char* str, int str_size)", << "Input string is too short"); 
    5255  } 
     56  CATCH_DUMP_STACK 
    5357 
    5458  cxios_date cxios_date_convert_from_string(const char* str, int str_size) 
     59  TRY 
    5560  { 
    5661    std::string date_str; 
     
    6368    return { date.getYear(), date.getMonth(), date.getDay(), date.getHour(), date.getMinute(), date.getSecond() }; 
    6469  } 
     70  CATCH_DUMP_STACK 
    6571 
    6672  cxios_date cxios_date_add_duration(cxios_date date_c, cxios_duration dur_c) 
     73  TRY 
    6774  { 
    6875    xios::CDate date = xios::CDate(getCalendar("cxios_date cxios_date_add_duration(cxios_date date_c, cxios_duration dur_c)"), 
     
    7380    return { res.getYear(), res.getMonth(), res.getDay(), res.getHour(), res.getMinute(), res.getSecond() }; 
    7481  } 
     82  CATCH_DUMP_STACK 
    7583 
    7684  cxios_date cxios_date_sub_duration(cxios_date date_c, cxios_duration dur_c) 
     85  TRY 
    7786  { 
    7887    xios::CDate date = xios::CDate(getCalendar("cxios_date cxios_date_sub_duration(cxios_date date_c, cxios_duration dur_c)"), 
     
    8493    return { res.getYear(), res.getMonth(), res.getDay(), res.getHour(), res.getMinute(), res.getSecond() }; 
    8594  } 
     95  CATCH_DUMP_STACK 
    8696 
    8797  cxios_duration cxios_date_sub(cxios_date date1_c, cxios_date date2_c) 
     98  TRY 
    8899  { 
    89100    xios::CDate date1 = xios::CDate(getCalendar("cxios_duration cxios_date_sub(cxios_date date1_c, cxios_date date2_c)"), 
     
    96107    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep }; 
    97108  } 
     109  CATCH_DUMP_STACK 
    98110 
    99111  bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c) 
     112  TRY 
    100113  { 
    101114    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"), 
     
    107120    return (date1 == date2); 
    108121  } 
     122  CATCH_DUMP_STACK 
    109123 
    110124  bool cxios_date_neq(cxios_date date1_c, cxios_date date2_c) 
     125  TRY 
    111126  { 
    112127    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"), 
     
    118133    return (date1 != date2); 
    119134  } 
     135  CATCH_DUMP_STACK 
    120136 
    121137  bool cxios_date_lt(cxios_date date1_c, cxios_date date2_c) 
     138  TRY 
    122139  { 
    123140    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"), 
     
    129146    return (date1 < date2); 
    130147  } 
     148  CATCH_DUMP_STACK 
    131149 
    132150  bool cxios_date_le(cxios_date date1_c, cxios_date date2_c) 
     151  TRY 
    133152  { 
    134153    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"), 
     
    140159    return (date1 <= date2); 
    141160  } 
     161  CATCH_DUMP_STACK 
    142162 
    143163  bool cxios_date_gt(cxios_date date1_c, cxios_date date2_c) 
     164  TRY 
    144165  { 
    145166    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"), 
     
    151172    return (date1 > date2); 
    152173  } 
     174  CATCH_DUMP_STACK 
    153175 
    154176  bool cxios_date_ge(cxios_date date1_c, cxios_date date2_c) 
     177  TRY 
    155178  { 
    156179    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"), 
     
    162185    return (date1 >= date2); 
    163186  } 
     187  CATCH_DUMP_STACK 
    164188 
    165189  int cxios_date_get_second_of_year(cxios_date date_c) 
     190  TRY 
    166191  { 
    167192    xios::CDate date = xios::CDate(getCalendar("int cxios_date_get_second_of_year(cxios_date date_c)"), 
     
    170195    return date.getSecondOfYear(); 
    171196  } 
     197  CATCH_DUMP_STACK 
    172198 
    173199  double cxios_date_get_day_of_year(cxios_date date_c) 
     200  TRY 
    174201  { 
    175202    xios::CDate date = xios::CDate(getCalendar("int cxios_date_get_day_of_year(cxios_date date_c)"), 
     
    178205    return date.getDayOfYear(); 
    179206  } 
     207  CATCH_DUMP_STACK 
    180208 
    181209  double cxios_date_get_fraction_of_year(cxios_date date_c) 
     210  TRY 
    182211  { 
    183212    xios::CDate date = xios::CDate(getCalendar("int cxios_date_get_fraction_of_year(cxios_date date_c)"), 
     
    186215    return date.getFractionOfYear(); 
    187216  } 
     217  CATCH_DUMP_STACK 
    188218 
    189219  int cxios_date_get_second_of_day(cxios_date date_c) 
     220  TRY 
    190221  { 
    191222    xios::CDate date = xios::CDate(getCalendar("int cxios_date_get_second_of_day(cxios_date date_c)"), 
     
    194225    return date.getSecondOfDay(); 
    195226  } 
     227  CATCH_DUMP_STACK 
    196228 
    197229  double cxios_date_get_fraction_of_day(cxios_date date_c) 
     230  TRY 
    198231  { 
    199232    xios::CDate date = xios::CDate(getCalendar("int cxios_date_get_fraction_of_day(cxios_date date_c)"), 
     
    202235    return date.getFractionOfDay(); 
    203236  } 
     237  CATCH_DUMP_STACK 
    204238} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icdomain.cpp

    r1542 r1612  
    2929    
    3030   void cxios_domain_handle_create (XDomainPtr * _ret, const char * _id, int _id_len) 
     31   TRY 
    3132   { 
    3233      std::string id;  
     
    3637      CTimer::get("XIOS").suspend() ; 
    3738   } 
     39   CATCH_DUMP_STACK 
    3840    
    3941   void cxios_domaingroup_handle_create (XDomainGroupPtr * _ret, const char * _id, int _id_len) 
     42   TRY 
    4043   { 
    4144      std::string id;  
     
    4649      CTimer::get("XIOS").suspend() ; 
    4750   } 
     51   CATCH_DUMP_STACK 
    4852 
    4953   // -------------------- Vérification des identifiants ----------------------- 
    5054 
    5155   void cxios_domain_valid_id (bool * _ret, const char * _id, int _id_len) 
     56   TRY 
    5257   { 
    5358      std::string id; 
     
    5863      CTimer::get("XIOS").suspend() ; 
    5964   } 
     65   CATCH_DUMP_STACK 
    6066 
    6167   void cxios_domaingroup_valid_id (bool * _ret, const char * _id, int _id_len) 
     68   TRY 
    6269   { 
    6370      std::string id; 
     
    6774      CTimer::get("XIOS").suspend() ; 
    6875   } 
     76   CATCH_DUMP_STACK 
    6977} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icduplicate_scalar_to_axis.cpp

    r1542 r1612  
    2626   // ------------------------ Création des handle ----------------------------- 
    2727   void cxios_duplicate_scalar_to_axis_handle_create(XDuplicateScalarToAxisPtr * _ret, const char * _id, int _id_len) 
     28   TRY 
    2829   { 
    2930      std::string id; 
     
    3334      CTimer::get("XIOS").suspend() ; 
    3435   } 
     36   CATCH_DUMP_STACK 
    3537 
    3638   // -------------------- Vérification des identifiants ----------------------- 
    3739   void cxios_duplicate_scalar_to_axis_valid_id(bool * _ret, const char * _id, int _id_len) 
     40   TRY 
    3841   { 
    3942      std::string id; 
     
    4447      CTimer::get("XIOS").suspend() ; 
    4548   } 
     49   CATCH_DUMP_STACK 
    4650 
    4751} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icduration.cpp

    r1472 r1612  
     1#include "xios.hpp" 
     2 
    13#include "icutil.hpp" 
    24#include "icdate.hpp" 
     
    68{ 
    79  void cxios_duration_convert_to_string(cxios_duration dur_c, char* str, int str_size) 
     10  TRY 
    811  { 
    912    xios::CDuration dur( dur_c.year, dur_c.month, dur_c.day, dur_c.hour, dur_c.minute, dur_c.second, dur_c.timestep ); 
     
    1215      ERROR("void cxios_duration_convert_to_string(cxios_duration dur_c, char* str, int str_size)", << "Input string is too short"); 
    1316  } 
     17  CATCH_DUMP_STACK 
    1418 
    1519  cxios_duration cxios_duration_convert_from_string(const char* str, int str_size) 
     20  TRY 
    1621  { 
    1722    std::string dur_str; 
     
    2328    return { dur.year, dur.month, dur.day, dur.hour, dur.minute, dur.second, dur.timestep }; 
    2429  } 
     30  CATCH_DUMP_STACK 
    2531 
    2632  cxios_duration cxios_duration_add(cxios_duration dur1_c, cxios_duration dur2_c) 
     33  TRY 
    2734  { 
    2835    xios::CDuration dur1( dur1_c.year, dur1_c.month, dur1_c.day, dur1_c.hour, dur1_c.minute, dur1_c.second, dur1_c.timestep ); 
     
    3239    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep }; 
    3340  } 
     41  CATCH_DUMP_STACK 
    3442 
    3543  cxios_duration cxios_duration_sub(cxios_duration dur1_c, cxios_duration dur2_c) 
     44  TRY 
    3645  { 
    3746    xios::CDuration dur1( dur1_c.year, dur1_c.month, dur1_c.day, dur1_c.hour, dur1_c.minute, dur1_c.second, dur1_c.timestep ); 
     
    4150    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep }; 
    4251  } 
     52  CATCH_DUMP_STACK 
    4353 
    4454  cxios_duration cxios_duration_mult(double val, cxios_duration dur_c) 
     55  TRY 
    4556  { 
    4657    xios::CDuration dur( dur_c.year, dur_c.month, dur_c.day, dur_c.hour, dur_c.minute, dur_c.second, dur_c.timestep ); 
     
    4859    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep }; 
    4960  } 
     61  CATCH_DUMP_STACK 
    5062 
    5163  cxios_duration cxios_duration_neg(cxios_duration dur_c) 
     64  TRY 
    5265  { 
    5366    xios::CDuration dur( dur_c.year, dur_c.month, dur_c.day, dur_c.hour, dur_c.minute, dur_c.second, dur_c.timestep ); 
     
    5568    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep }; 
    5669  } 
     70  CATCH_DUMP_STACK 
    5771 
    5872  bool cxios_duration_eq(cxios_duration dur1_c, cxios_duration dur2_c) 
     73  TRY 
    5974  { 
    6075    xios::CDuration dur1( dur1_c.year, dur1_c.month, dur1_c.day, dur1_c.hour, dur1_c.minute, dur1_c.second, dur1_c.timestep ); 
     
    6277    return (dur1 == dur2); 
    6378  } 
     79  CATCH_DUMP_STACK 
    6480 
    6581  bool cxios_duration_neq(cxios_duration dur1_c, cxios_duration dur2_c) 
     82  TRY 
    6683  { 
    6784    xios::CDuration dur1( dur1_c.year, dur1_c.month, dur1_c.day, dur1_c.hour, dur1_c.minute, dur1_c.second, dur1_c.timestep ); 
     
    6986    return (dur1 != dur2); 
    7087  } 
     88  CATCH_DUMP_STACK 
    7189} 
  • XIOS/dev/dev_olga/src/interface/c/icexpand_domain.cpp

    r1542 r1612  
    2727   // ------------------------ Création des handle ----------------------------- 
    2828   void cxios_expand_domain_handle_create(XExpandDomainPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id; 
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638 
    3739   // -------------------- Vérification des identifiants ----------------------- 
    3840   void cxios_expand_domain_valid_id(bool * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649   } 
     50   CATCH_DUMP_STACK 
    4751} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icextract_to_axis.cpp

    r1542 r1612  
    2626   // ------------------------ Création des handle ----------------------------- 
    2727   void cxios_extract_domain_to_axis_handle_create(XExtractDomainToAxisPtr * _ret, const char * _id, int _id_len) 
     28   TRY 
    2829   { 
    2930      std::string id; 
     
    3334      CTimer::get("XIOS").suspend() ; 
    3435   } 
     36   CATCH_DUMP_STACK 
    3537 
    3638   // -------------------- Vérification des identifiants ----------------------- 
    3739   void cxios_extract_domain_to_axis_valid_id(bool * _ret, const char * _id, int _id_len) 
     40   TRY 
    3841   { 
    3942      std::string id; 
     
    4447      CTimer::get("XIOS").suspend() ; 
    4548   } 
     49   CATCH_DUMP_STACK 
    4650 
    4751} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icextract_to_scalar.cpp

    r1542 r1612  
    2626   // ------------------------ Création des handle ----------------------------- 
    2727   void cxios_extract_axis_to_scalar_handle_create(XExtractAxisToScalarPtr * _ret, const char * _id, int _id_len) 
     28   TRY 
    2829   { 
    2930      std::string id; 
     
    3334      CTimer::get("XIOS").suspend() ; 
    3435   } 
     36   CATCH_DUMP_STACK 
    3537 
    3638   // -------------------- Vérification des identifiants ----------------------- 
    3739   void cxios_extract_axis_to_scalar_valid_id(bool * _ret, const char * _id, int _id_len) 
     40   TRY 
    3841   { 
    3942      std::string id; 
     
    4447      CTimer::get("XIOS").suspend() ; 
    4548   } 
     49   CATCH_DUMP_STACK 
    4650 
    4751} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icfield.cpp

    r1542 r1612  
    3535    
    3636   void cxios_field_handle_create (XFieldPtr * _ret, const char * _id, int _id_len) 
     37   TRY 
    3738   { 
    3839      std::string id;  
     
    4243      CTimer::get("XIOS").suspend() ; 
    4344   } 
     45   CATCH_DUMP_STACK 
    4446    
    4547   void cxios_fieldgroup_handle_create (XFieldGroupPtr * _ret, const char * _id, int _id_len) 
     48   TRY 
    4649   { 
    4750      std::string id;  
     
    5154      CTimer::get("XIOS").suspend() ; 
    5255   } 
    53  
     56   CATCH_DUMP_STACK 
    5457 
    5558   // -------------------- Vérification des identifiants ----------------------- 
    5659 
    5760   void cxios_field_valid_id (bool * _ret, const char * _id, int _id_len) 
     61   TRY 
    5862   { 
    5963      std::string id; 
     
    6367      CTimer::get("XIOS").suspend() ; 
    6468   } 
     69   CATCH_DUMP_STACK 
    6570 
    6671   void cxios_fieldgroup_valid_id (bool * _ret, const char * _id, int _id_len) 
     72   TRY 
    6773   { 
    6874      std::string id; 
     
    7278      CTimer::get("XIOS").suspend() ; 
    7379   } 
     80   CATCH_DUMP_STACK 
    7481 
    7582// -----------------------------------------------------------------------------------------------------    
     
    7885 
    7986  void cxios_field_is_active (XFieldPtr field_hdl, bool at_current_timestep, bool* ret) 
     87  TRY 
    8088  { 
    8189    CTimer::get("XIOS").resume() ; 
     
    8391    CTimer::get("XIOS").suspend() ; 
    8492  } 
     93  CATCH_DUMP_STACK 
    8594 
    8695// ----------------------------------------------------------------------------------------------------- 
     
    8897// ----------------------------------------------------------------------------------------------------- 
    8998  void cxios_field_get_domain_handle(XDomainPtr * domain_hdl_ret, XFieldPtr field_hdl, int domainIndex) 
     99  TRY 
    90100  { 
    91101     CTimer::get("XIOS").resume() ; 
     
    93103     CTimer::get("XIOS").suspend(); 
    94104  } 
     105  CATCH_DUMP_STACK 
    95106 
    96107  void cxios_field_get_axis_handle(XAxisPtr * axis_hdl_ret, XFieldPtr field_hdl, int axisIndex) 
     108  TRY 
    97109  { 
    98110     CTimer::get("XIOS").resume() ; 
     
    100112     CTimer::get("XIOS").suspend(); 
    101113  } 
     114  CATCH_DUMP_STACK 
    102115 
    103116  void cxios_field_get_scalar_handle(XScalarPtr * scalar_hdl_ret, XFieldPtr field_hdl, int scalarIndex) 
     117  TRY 
    104118  { 
    105119     CTimer::get("XIOS").resume() ; 
     
    107121     CTimer::get("XIOS").suspend(); 
    108122  } 
     123  CATCH_DUMP_STACK 
    109124} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icfile.cpp

    r1542 r1612  
    2828    
    2929   void cxios_file_handle_create (XFilePtr * _ret, const char * _id, int _id_len) 
     30   TRY 
    3031   { 
    3132      std::string id;  
     
    3536      CTimer::get("XIOS").suspend() ; 
    3637   } 
     38   CATCH_DUMP_STACK 
    3739    
    3840   void cxios_filegroup_handle_create (XFileGroupPtr * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id;  
     
    4447      CTimer::get("XIOS").suspend() ; 
    4548   } 
     49   CATCH_DUMP_STACK 
    4650 
    4751   // -------------------- Vérification des identifiants ----------------------- 
    4852 
    4953   void cxios_file_valid_id (bool * _ret, const char * _id, int _id_len) 
     54   TRY 
    5055   { 
    5156      std::string id; 
     
    5560      CTimer::get("XIOS").suspend() ; 
    5661   } 
     62   CATCH_DUMP_STACK 
    5763 
    5864   void cxios_filegroup_valid_id (bool * _ret, const char * _id, int _id_len) 
     65   TRY 
    5966   { 
    6067      std::string id; 
     
    6471      CTimer::get("XIOS").suspend() ; 
    6572   } 
     73   CATCH_DUMP_STACK 
    6674} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icgenerate_rectilinear_domain.cpp

    r1542 r1612  
    2727   // ------------------------ Création des handle ----------------------------- 
    2828   void cxios_generate_rectilinear_domain_handle_create(XGenDomainPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id; 
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638 
    3739   // -------------------- Vérification des identifiants ----------------------- 
    3840   void cxios_generate_rectilinear_domain_valid_id(bool * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649   } 
     50   CATCH_DUMP_STACK 
    4751} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icgrid.cpp

    r1542 r1612  
    2727   
    2828   void cxios_grid_handle_create (XGridPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id;  
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638    
    3739   void cxios_gridgroup_handle_create (XGridGroupPtr * _ret, const char * _id, int _id_len) 
     40   TRY 
    3841   { 
    3942      std::string id;  
     
    4346      CTimer::get("XIOS").suspend() ; 
    4447   } 
     48   CATCH_DUMP_STACK 
    4549 
    4650   // -------------------- Vérification des identifiants ----------------------- 
    4751 
    4852   void cxios_grid_valid_id (bool * _ret, const char * _id, int _id_len) 
     53   TRY 
    4954   { 
    5055      std::string id; 
     
    5459      CTimer::get("XIOS").suspend() ; 
    5560   } 
     61   CATCH_DUMP_STACK 
    5662 
    5763   void cxios_gridgroup_valid_id (bool * _ret, const char * _id, int _id_len) 
     64   TRY 
    5865   { 
    5966      std::string id; 
     
    6370      CTimer::get("XIOS").suspend() ; 
    6471   } 
     72   CATCH_DUMP_STACK 
    6573} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icinterpolate.cpp

    r1542 r1612  
    2727   // ------------------------ Création des handle ----------------------------- 
    2828   void cxios_interpolate_domain_handle_create(XInterpolateDomainPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id; 
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638 
    3739   // -------------------- Vérification des identifiants ----------------------- 
    3840   void cxios_interpolate_domain_valid_id(bool * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649   } 
     50   CATCH_DUMP_STACK 
    4751 
    4852    // ------------------------ Création des handle ----------------------------- 
    4953   void cxios_interpolate_axis_handle_create(XInterpolateAxisPtr * _ret, const char * _id, int _id_len) 
     54   TRY 
    5055   { 
    5156      std::string id; 
     
    5560      CTimer::get("XIOS").suspend() ; 
    5661   } 
     62   CATCH_DUMP_STACK 
    5763 
    5864   // -------------------- Vérification des identifiants ----------------------- 
    5965   void cxios_interpolate_axis_valid_id(bool * _ret, const char * _id, int _id_len) 
     66   TRY 
    6067   { 
    6168      std::string id; 
     
    6673      CTimer::get("XIOS").suspend() ; 
    6774   } 
     75   CATCH_DUMP_STACK 
    6876} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icinverse_axis.cpp

    r1542 r1612  
    2727   // ------------------------ Création des handle ----------------------------- 
    2828   void cxios_inverse_axis_handle_create(XInverseAxisPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id; 
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638 
    3739   // -------------------- Vérification des identifiants ----------------------- 
    3840   void cxios_inverse_axis_valid_id(bool * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649   } 
     50   CATCH_DUMP_STACK 
    4751} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icreduce_axis_to_axis.cpp

    r1542 r1612  
    2727   // ------------------------ Création des handle ----------------------------- 
    2828   void cxios_reduce_axis_to_axis_handle_create(XReduceAxisToAxisPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id; 
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638 
    3739   // -------------------- Vérification des identifiants ----------------------- 
    3840   void cxios_reduce_axis_to_axis_valid_id(bool * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649   } 
     50   CATCH_DUMP_STACK 
    4751 
    4852} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icreduce_scalar_to_scalar.cpp

    r1542 r1612  
    2727   // ------------------------ Création des handle ----------------------------- 
    2828   void cxios_reduce_scalar_to_scalar_handle_create(XReduceScalarToScalarPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id; 
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638 
    3739   // -------------------- Vérification des identifiants ----------------------- 
    3840   void cxios_reduce_scalar_to_scalar_valid_id(bool * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649   } 
     50   CATCH_DUMP_STACK 
    4751 
    4852} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icreduce_to_axis.cpp

    r1542 r1612  
    2727   // ------------------------ Création des handle ----------------------------- 
    2828   void cxios_reduce_domain_to_axis_handle_create(XReduceDomainToAxisPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id; 
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638 
    3739   // -------------------- Vérification des identifiants ----------------------- 
    3840   void cxios_reduce_domain_to_axis_valid_id(bool * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649   } 
     50   CATCH_DUMP_STACK 
    4751 
    4852} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icreduce_to_scalar.cpp

    r1542 r1612  
    2727   // ------------------------ Création des handle ----------------------------- 
    2828   void cxios_reduce_axis_to_scalar_handle_create(XReduceAxisToScalarPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id; 
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638 
    3739   // -------------------- Vérification des identifiants ----------------------- 
    3840   void cxios_reduce_axis_to_scalar_valid_id(bool * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649   } 
     50   CATCH_DUMP_STACK 
    4751 
    4852   void cxios_reduce_domain_to_scalar_handle_create(XReduceDomainToScalarPtr * _ret, const char * _id, int _id_len) 
     53   TRY 
    4954   { 
    5055      std::string id; 
     
    5459      CTimer::get("XIOS").suspend() ; 
    5560   } 
     61   CATCH_DUMP_STACK 
    5662 
    5763   // -------------------- Vérification des identifiants ----------------------- 
    5864   void cxios_reduce_domain_to_scalar_valid_id(bool * _ret, const char * _id, int _id_len) 
     65   TRY 
    5966   { 
    6067      std::string id; 
     
    6572      CTimer::get("XIOS").suspend() ; 
    6673   } 
     74   CATCH_DUMP_STACK 
    6775 
    6876} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icreorder_domain.cpp

    r1542 r1612  
    2727   // ------------------------ Création des handle ----------------------------- 
    2828   void cxios_reorder_domain_handle_create(XReorderDomainPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id; 
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638 
    3739   // -------------------- Vérification des identifiants ----------------------- 
    3840   void cxios_reorder_domain_valid_id(bool * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649   } 
     50   CATCH_DUMP_STACK 
    4751} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icscalar.cpp

    r1542 r1612  
    2828 
    2929   void cxios_scalar_handle_create (XScalarPtr * _ret, const char * _id, int _id_len) 
     30   TRY 
    3031   { 
    3132      std::string id; 
     
    3536      CTimer::get("XIOS").suspend() ; 
    3637   } 
     38   CATCH_DUMP_STACK 
    3739 
    3840   void cxios_scalargroup_handle_create (XScalarGroupPtr * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4447      CTimer::get("XIOS").suspend() ; 
    4548    } 
     49   CATCH_DUMP_STACK 
    4650 
    4751   // -------------------- Vérification des identifiants ----------------------- 
    4852 
    4953   void cxios_scalar_valid_id (bool * _ret, const char * _id, int _id_len) 
     54   TRY 
    5055   { 
    5156      std::string id; 
     
    5661      CTimer::get("XIOS").suspend() ; 
    5762   } 
     63   CATCH_DUMP_STACK 
    5864 
    5965   void cxios_scalargroup_valid_id (bool * _ret, const char * _id, int _id_len) 
     66   TRY 
    6067   { 
    6168      std::string id; 
     
    6774 
    6875   } 
     76   CATCH_DUMP_STACK 
    6977 
    7078} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/ictemporal_splitting.cpp

    r1542 r1612  
    2727   // ------------------------ Création des handle ----------------------------- 
    2828   void cxios_temporal_splitting_handle_create(XTemporalSplittingPtr * _ret, const char * _id, int _id_len) 
     29   TRY 
    2930   { 
    3031      std::string id; 
     
    3435      CTimer::get("XIOS").suspend() ; 
    3536   } 
     37   CATCH_DUMP_STACK 
    3638 
    3739   // -------------------- Vérification des identifiants ----------------------- 
    3840   void cxios_temporal_splitting_valid_id(bool * _ret, const char * _id, int _id_len) 
     41   TRY 
    3942   { 
    4043      std::string id; 
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649   } 
     50   CATCH_DUMP_STACK 
    4751 
    4852} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/icvariable.cpp

    r1542 r1612  
    2929    
    3030   void cxios_variable_handle_create (XVariablePtr * _ret, const char * _id, int _id_len) 
     31   TRY 
    3132   { 
    3233      std::string id;  
     
    3637      CTimer::get("XIOS").suspend() ; 
    3738   } 
     39   CATCH_DUMP_STACK 
    3840    
    3941   void cxios_variablegroup_handle_create (XVariableGroupPtr * _ret, const char * _id, int _id_len) 
     42   TRY 
    4043   { 
    4144      std::string id;  
     
    4548      CTimer::get("XIOS").suspend() ; 
    4649    } 
     50   CATCH_DUMP_STACK 
    4751 
    4852   // -------------------- Vérification des identifiants ----------------------- 
    4953 
    5054   void cxios_variable_valid_id (bool * _ret, const char * _id, int _id_len) 
     55   TRY 
    5156   { 
    5257      std::string id; 
     
    5762      CTimer::get("XIOS").suspend() ; 
    5863   } 
     64   CATCH_DUMP_STACK 
    5965 
    6066   void cxios_variablegroup_valid_id (bool * _ret, const char * _id, int _id_len) 
     67   TRY 
    6168   { 
    6269      std::string id; 
     
    6875 
    6976   } 
     77   CATCH_DUMP_STACK 
    7078    
    7179} // extern "C" 
  • XIOS/dev/dev_olga/src/interface/c/iczoom.cpp

    r1542 r1612  
    2828   // ------------------------ Création des handle ----------------------------- 
    2929   void cxios_zoom_axis_handle_create (XZoomAxisPtr * _ret, const char * _id, int _id_len) 
     30   TRY 
    3031   { 
    3132      std::string id; 
     
    3536      CTimer::get("XIOS").suspend() ; 
    3637   } 
     38   CATCH_DUMP_STACK 
    3739 
    3840   // -------------------- Vérification des identifiants ----------------------- 
    3941   void cxios_zoom_axis_valid_id (bool * _ret, const char * _id, int _id_len) 
     42   TRY 
    4043   { 
    4144      std::string id; 
     
    4649      CTimer::get("XIOS").suspend() ; 
    4750   } 
     51   CATCH_DUMP_STACK 
    4852 
    4953   // ------------------------ Création des handle ----------------------------- 
    5054   void cxios_zoom_domain_handle_create(XZoomDomainPtr * _ret, const char * _id, int _id_len) 
     55   TRY 
    5156   { 
    5257      std::string id; 
     
    5661      CTimer::get("XIOS").suspend() ; 
    5762   } 
     63   CATCH_DUMP_STACK 
    5864 
    5965   // -------------------- Vérification des identifiants ----------------------- 
    6066   void cxios_zoom_domain_valid_id(bool * _ret, const char * _id, int _id_len) 
     67   TRY 
    6168   { 
    6269      std::string id; 
     
    6774      CTimer::get("XIOS").suspend() ; 
    6875   } 
     76   CATCH_DUMP_STACK 
    6977} // extern "C" 
  • XIOS/dev/dev_olga/src/io/nc4_data_input.cpp

    r1589 r1612  
    2929 
    3030  StdSize CNc4DataInput::getFieldNbRecords_(CField* field) 
     31  TRY 
    3132  { 
    3233    StdString fieldId = field->getFieldOutputName(); 
     
    4041    return 1; 
    4142  } 
     43  CATCH 
    4244 
    4345  void CNc4DataInput::readFieldData_(CField* field) 
     46  TRY 
    4447  { 
    4548    CContext* context = CContext::getCurrent(); 
     
    121124    } 
    122125  } 
     126  CATCH 
    123127 
    124128  void CNc4DataInput::readFieldAttributes_(CField* field, bool readAttributeValues) 
     129  TRY 
    125130  { 
    126131    StdString fieldId = field->getFieldOutputName(); 
     
    248253    } 
    249254  } 
     255  CATCH 
    250256 
    251257  /*! 
     
    258264  void CNc4DataInput::readDomainAttributeValueFromFile(CDomain* domain, std::list<std::pair<StdString, StdSize> >& dimSizeMap, 
    259265                                                       int elementPosition, const StdString& fieldId) 
     266  TRY 
    260267  { 
    261268    // There are some optional attributes of a domain to retrieve from file    // + lon lat? 
     
    436443    domain->fillInLonLat(); 
    437444  } 
     445  CATCH 
    438446 
    439447  /*! 
     
    446454  void CNc4DataInput::readDomainAttributesFromFile(CDomain* domain, std::list<std::pair<StdString, StdSize> >& dimSizeMap, 
    447455                                                   int elementPosition, const StdString& fieldId) 
     456  TRY 
    448457  { 
    449458    // There are some mandatory attributes of a domain to retrieve from file 
     
    514523    } 
    515524  } 
     525  CATCH 
    516526 
    517527  /*! 
     
    524534  void CNc4DataInput::readAxisAttributesFromFile(CAxis* axis, std::list<std::pair<StdString, StdSize> >& dimSizeMap, 
    525535                                                 int elementPosition, const StdString& fieldId) 
     536  TRY 
    526537  { 
    527538    std::list<std::pair<StdString, StdSize> >::const_iterator itMapN = dimSizeMap.begin(), 
     
    540551    axis->n_glo.setValue(itMapN->second); 
    541552  } 
     553  CATCH 
    542554 
    543555  /*! 
     
    550562  void CNc4DataInput::readAxisAttributeValueFromFile(CAxis* axis, std::list<std::pair<StdString, StdSize> >& dimSizeMap, 
    551563                                                    int elementPosition, const StdString& fieldId) 
     564  TRY 
    552565  { 
    553566    std::list<std::pair<StdString, StdSize> >::const_iterator itMapN = dimSizeMap.begin(), 
     
    570583    } 
    571584  } 
     585  CATCH 
    572586 
    573587  /*! 
     
    598612 
    599613  void CNc4DataInput::closeFile_(void) 
     614  TRY 
    600615  { 
    601616    SuperClassWriter::close(); 
    602617  } 
     618  CATCH 
    603619} // namespace xios 
  • XIOS/dev/dev_olga/src/io/nc4_data_output.cpp

    r1590 r1612  
    5454 
    5555      void CNc4DataOutput::writeDomain_(CDomain* domain) 
     56      TRY 
    5657      { 
    5758        StdString lonName,latName ; 
     
    540541         domain->addRelFile(this->filename); 
    541542      } 
     543      CATCH 
    542544 
    543545    //-------------------------------------------------------------- 
  • XIOS/dev/dev_olga/src/node/axis.cpp

    r1600 r1612  
    4848   bool CAxis::dummyTransformationMapList_ = CAxis::initializeTransformationMap(CAxis::transformationMapList_); 
    4949   bool CAxis::initializeTransformationMap(std::map<StdString, ETranformationType>& m) 
     50   TRY 
    5051   { 
    5152     m["zoom_axis"] = TRANS_ZOOM_AXIS; 
     
    6061 
    6162   } 
     63   CATCH 
    6264 
    6365   ///--------------------------------------------------------------- 
    6466 
    6567   const std::set<StdString> & CAxis::getRelFiles(void) const 
     68   TRY 
    6669   { 
    6770      return (this->relFiles); 
    6871   } 
     72   CATCH 
    6973 
    7074   bool CAxis::IsWritten(const StdString & filename) const 
     75   TRY 
    7176   { 
    7277      return (this->relFiles.find(filename) != this->relFiles.end()); 
    7378   } 
     79   CATCH 
    7480 
    7581   bool CAxis::isWrittenCompressed(const StdString& filename) const 
     82   TRY 
    7683   { 
    7784      return (this->relFilesCompressed.find(filename) != this->relFilesCompressed.end()); 
    7885   } 
     86   CATCH 
    7987 
    8088   bool CAxis::isDistributed(void) const 
     89   TRY 
    8190   { 
    8291      bool distributed = (!this->begin.isEmpty() && !this->n.isEmpty() && (this->begin + this->n < this->n_glo)) || 
    8392             (!this->n.isEmpty() && (this->n != this->n_glo)); 
    84       // A same stupid condition to make sure that if there is only one client, axis 
     93      // A condition to make sure that if there is only one client, axis 
    8594      // should be considered to be distributed. This should be a temporary solution      
    8695      distributed |= (1 == CContext::getCurrent()->client->clientSize); 
    8796      return distributed; 
    8897   } 
     98   CATCH 
    8999 
    90100   /*! 
     
    94104    */ 
    95105   bool CAxis::isCompressible(void) const 
     106   TRY 
    96107   { 
    97108      return isCompressible_; 
    98109   } 
     110   CATCH 
    99111 
    100112   void CAxis::addRelFile(const StdString & filename) 
     113   TRY 
    101114   { 
    102115      this->relFiles.insert(filename); 
    103116   } 
     117   CATCH_DUMP_ATTR 
    104118 
    105119   void CAxis::addRelFileCompressed(const StdString& filename) 
     120   TRY 
    106121   { 
    107122      this->relFilesCompressed.insert(filename); 
    108123   } 
     124   CATCH_DUMP_ATTR 
    109125 
    110126   //---------------------------------------------------------------- 
     
    115131   */ 
    116132   int CAxis::getNumberWrittenIndexes(MPI_Comm writtenCom) 
     133   TRY 
    117134   { 
    118135     int writtenSize; 
     
    120137     return numberWrittenIndexes_[writtenSize]; 
    121138   } 
     139   CATCH_DUMP_ATTR 
    122140 
    123141   /*! 
     
    126144   */ 
    127145   int CAxis::getTotalNumberWrittenIndexes(MPI_Comm writtenCom) 
     146   TRY 
    128147   { 
    129148     int writtenSize; 
     
    131150     return totalNumberWrittenIndexes_[writtenSize]; 
    132151   } 
     152   CATCH_DUMP_ATTR 
    133153 
    134154   /*! 
     
    137157   */ 
    138158   int CAxis::getOffsetWrittenIndexes(MPI_Comm writtenCom) 
     159   TRY 
    139160   { 
    140161     int writtenSize; 
     
    142163     return offsetWrittenIndexes_[writtenSize]; 
    143164   } 
     165   CATCH_DUMP_ATTR 
    144166 
    145167   CArray<int, 1>& CAxis::getCompressedIndexToWriteOnServer(MPI_Comm writtenCom) 
     168   TRY 
    146169   { 
    147170     int writtenSize; 
     
    149172     return compressedIndexToWriteOnServer[writtenSize]; 
    150173   } 
     174   CATCH_DUMP_ATTR 
     175 
    151176   //---------------------------------------------------------------- 
    152177 
     
    158183   std::map<int, StdSize> CAxis::getAttributesBufferSize(CContextClient* client, const std::vector<int>& globalDim, int orderPositionInGrid, 
    159184                                                         CServerDistributionDescription::ServerDistributionType distType) 
     185   TRY 
    160186   { 
    161187 
     
    221247       } 
    222248     } 
    223  
    224249     return attributesSizes; 
    225250   } 
     251   CATCH_DUMP_ATTR 
    226252 
    227253   //---------------------------------------------------------------- 
     
    234260 
    235261   CAxis* CAxis::createAxis() 
     262   TRY 
    236263   { 
    237264     CAxis* axis = CAxisGroup::get("axis_definition")->createChild(); 
    238265     return axis; 
    239266   } 
     267   CATCH 
    240268 
    241269   /*! 
     
    244272   */ 
    245273   void CAxis::checkAttributes(void) 
     274   TRY 
    246275   { 
    247276     CContext* context=CContext::getCurrent(); 
     
    311340      } 
    312341   } 
     342   CATCH_DUMP_ATTR 
    313343 
    314344   /*! 
     
    317347 
    318348   void CAxis::checkData() 
     349   TRY 
    319350   { 
    320351      if (data_begin.isEmpty()) data_begin.setValue(0); 
     
    363394 
    364395   } 
     396   CATCH_DUMP_ATTR 
    365397 
    366398    size_t CAxis::getGlobalWrittenSize(void) 
     
    373405   */ 
    374406   void CAxis::checkMask() 
     407   TRY 
    375408   { 
    376409      if (!mask.isEmpty()) 
     
    391424      } 
    392425   } 
     426   CATCH_DUMP_ATTR 
    393427 
    394428   /*! 
     
    396430   */ 
    397431   void CAxis::checkBounds() 
     432   TRY 
    398433   { 
    399434     if (!bounds.isEmpty()) 
     
    408443     else hasBounds = false; 
    409444   } 
     445   CATCH_DUMP_ATTR 
    410446 
    411447  void CAxis::checkLabel() 
     448  TRY 
    412449  { 
    413450    if (!label.isEmpty()) 
     
    422459    else hasLabel = false; 
    423460  } 
     461  CATCH_DUMP_ATTR 
    424462 
    425463  /*! 
     
    427465  */ 
    428466  void CAxis::checkEligibilityForCompressedOutput() 
     467  TRY 
    429468  { 
    430469    // We don't check if the mask is valid here, just if a mask has been defined at this point. 
    431470    isCompressible_ = !mask.isEmpty(); 
    432471  } 
     472  CATCH_DUMP_ATTR 
    433473 
    434474  /*! 
     
    436476  */ 
    437477  bool CAxis::dispatchEvent(CEventServer& event) 
     478  TRY 
    438479  { 
    439480     if (SuperClass::dispatchEvent(event)) return true; 
     
    461502     } 
    462503  } 
     504  CATCH 
    463505 
    464506   /*! 
     
    466508   */ 
    467509   void CAxis::checkAttributesOnClient() 
     510   TRY 
    468511   { 
    469512     if (this->areClientAttributesChecked_) return; 
     
    474517     this->areClientAttributesChecked_ = true; 
    475518   } 
     519   CATCH_DUMP_ATTR 
    476520 
    477521   /* 
     
    481525   void CAxis::checkAttributesOnClientAfterTransformation(const std::vector<int>& globalDim, int orderPositionInGrid, 
    482526                                                          CServerDistributionDescription::ServerDistributionType distType) 
     527   TRY 
    483528   { 
    484529     CContext* context=CContext::getCurrent() ; 
     
    494539     this->isClientAfterTransformationChecked = true; 
    495540   } 
     541   CATCH_DUMP_ATTR 
    496542 
    497543   /* 
     
    504550   void CAxis::sendCheckedAttributes(const std::vector<int>& globalDim, int orderPositionInGrid, 
    505551                                     CServerDistributionDescription::ServerDistributionType distType) 
     552   TRY 
    506553   { 
    507554     if (!this->areClientAttributesChecked_) checkAttributesOnClient(); 
     
    514561     this->isChecked = true; 
    515562   } 
     563   CATCH_DUMP_ATTR 
    516564 
    517565  /*! 
     
    522570  void CAxis::sendAttributes(const std::vector<int>& globalDim, int orderPositionInGrid, 
    523571                             CServerDistributionDescription::ServerDistributionType distType) 
     572  TRY 
    524573  { 
    525574     sendDistributionAttribute(globalDim, orderPositionInGrid, distType); 
     
    536585     }      
    537586  } 
     587  CATCH_DUMP_ATTR 
    538588 
    539589  /* 
     
    547597  void CAxis::computeConnectedClients(const std::vector<int>& globalDim, int orderPositionInGrid, 
    548598                                     CServerDistributionDescription::ServerDistributionType distType) 
     599  TRY 
    549600  { 
    550601    CContext* context = CContext::getCurrent(); 
     
    666717    } 
    667718  } 
     719  CATCH_DUMP_ATTR 
    668720 
    669721  /* 
     
    673725  */ 
    674726  void CAxis::computeWrittenIndex() 
     727  TRY 
    675728  {   
    676729    if (computedWrittenIndex_) return; 
     
    714767 
    715768  } 
     769  CATCH_DUMP_ATTR 
    716770 
    717771  void CAxis::computeWrittenCompressedIndex(MPI_Comm writtenComm) 
     772  TRY 
    718773  { 
    719774    int writtenCommSize; 
     
    804859    } 
    805860  } 
     861  CATCH_DUMP_ATTR 
    806862 
    807863  /*! 
     
    814870  void CAxis::sendDistributionAttribute(const std::vector<int>& globalDim, int orderPositionInGrid, 
    815871                                        CServerDistributionDescription::ServerDistributionType distType) 
     872  TRY 
    816873  { 
    817874    std::list<CContextClient*>::iterator it; 
     
    852909    } 
    853910  } 
     911  CATCH_DUMP_ATTR 
    854912 
    855913  /* 
     
    858916  */ 
    859917  void CAxis::recvDistributionAttribute(CEventServer& event) 
     918  TRY 
    860919  { 
    861920    CBufferIn* buffer = event.subEvents.begin()->buffer; 
     
    864923    get(axisId)->recvDistributionAttribute(*buffer); 
    865924  } 
     925  CATCH 
    866926 
    867927  /* 
     
    870930  */ 
    871931  void CAxis::recvDistributionAttribute(CBufferIn& buffer) 
     932  TRY 
    872933  { 
    873934    int ni_srv, begin_srv; 
     
    879940    begin.setValue(begin_srv); 
    880941  } 
     942  CATCH_DUMP_ATTR 
    881943 
    882944  /* 
     
    886948  */ 
    887949  void CAxis::sendNonDistributedAttributes() 
     950  TRY 
    888951  { 
    889952    std::list<CContextClient*>::iterator it; 
     
    9391002    } 
    9401003  } 
     1004  CATCH_DUMP_ATTR 
    9411005 
    9421006  /* 
     
    9451009  */ 
    9461010  void CAxis::recvNonDistributedAttributes(CEventServer& event) 
     1011  TRY 
    9471012  { 
    9481013    list<CEventServer::SSubEvent>::iterator it; 
     
    9551020    } 
    9561021  } 
     1022  CATCH 
    9571023 
    9581024  /* 
     
    9621028  */ 
    9631029  void CAxis::recvNonDistributedAttributes(int rank, CBufferIn& buffer) 
     1030  TRY 
    9641031  {  
    9651032    CArray<int,1> tmp_index, tmp_data_index; 
     
    10031070    for (int idx = 0; idx < index.numElements(); ++idx) globalLocalIndexMap_[index(idx)] = idx; 
    10041071  } 
     1072  CATCH_DUMP_ATTR 
    10051073 
    10061074  /* 
     
    10101078  */ 
    10111079  void CAxis::sendDistributedAttributes(void) 
     1080  TRY 
    10121081  { 
    10131082    int ind, idx; 
     
    11131182    } 
    11141183  } 
     1184  CATCH_DUMP_ATTR 
    11151185 
    11161186  /* 
     
    11191189  */ 
    11201190  void CAxis::recvDistributedAttributes(CEventServer& event) 
     1191  TRY 
    11211192  { 
    11221193    string axisId; 
     
    11341205    get(axisId)->recvDistributedAttributes(ranks, buffers); 
    11351206  } 
     1207  CATCH 
    11361208 
    11371209  /* 
     
    11411213  */ 
    11421214  void CAxis::recvDistributedAttributes(vector<int>& ranks, vector<CBufferIn*> buffers) 
     1215  TRY 
    11431216  { 
    11441217    int nbReceived = ranks.size(), idx, ind, gloInd, locInd; 
     
    12591332    data_n.setValue(data_index.numElements()); 
    12601333  } 
     1334  CATCH_DUMP_ATTR 
    12611335 
    12621336  /*! 
     
    12681342  */ 
    12691343  bool CAxis::isEqual(CAxis* obj) 
     1344  TRY 
    12701345  { 
    12711346    vector<StdString> excludedAttr; 
     
    12911366    return objEqual; 
    12921367  } 
     1368  CATCH_DUMP_ATTR 
    12931369 
    12941370  /* 
     
    12981374  */ 
    12991375  CTransformation<CAxis>* CAxis::addTransformation(ETranformationType transType, const StdString& id) 
     1376  TRY 
    13001377  { 
    13011378    transformationMap_.push_back(std::make_pair(transType, CTransformation<CAxis>::createTransformation(transType,id))); 
    13021379    return transformationMap_.back().second; 
    13031380  } 
     1381  CATCH_DUMP_ATTR 
    13041382 
    13051383  /* 
     
    13071385  */ 
    13081386  bool CAxis::hasTransformation() 
     1387  TRY 
    13091388  { 
    13101389    return (!transformationMap_.empty()); 
    13111390  } 
     1391  CATCH_DUMP_ATTR 
    13121392 
    13131393  /* 
     
    13161396  */ 
    13171397  void CAxis::setTransformations(const TransMapTypes& axisTrans) 
     1398  TRY 
    13181399  { 
    13191400    transformationMap_ = axisTrans; 
    13201401  } 
     1402  CATCH_DUMP_ATTR 
    13211403 
    13221404  /* 
     
    13251407  */ 
    13261408  CAxis::TransMapTypes CAxis::getAllTransformations(void) 
     1409  TRY 
    13271410  { 
    13281411    return transformationMap_; 
    13291412  } 
     1413  CATCH_DUMP_ATTR 
    13301414 
    13311415  /* 
     
    13341418  */ 
    13351419  void CAxis::duplicateTransformation(CAxis* src) 
     1420  TRY 
    13361421  { 
    13371422    if (src->hasTransformation()) 
     
    13401425    } 
    13411426  } 
     1427  CATCH_DUMP_ATTR 
    13421428 
    13431429  /*! 
     
    13451431   */ 
    13461432  void CAxis::solveInheritanceTransformation() 
     1433  TRY 
    13471434  { 
    13481435    if (hasTransformation() || !hasDirectAxisReference()) 
     
    13611448        refAxis[i]->setTransformations(axis->getAllTransformations()); 
    13621449  } 
     1450  CATCH_DUMP_ATTR 
    13631451 
    13641452  void CAxis::setContextClient(CContextClient* contextClient) 
     1453  TRY 
    13651454  { 
    13661455    if (clientsSet.find(contextClient)==clientsSet.end()) 
     
    13701459    } 
    13711460  } 
     1461  CATCH_DUMP_ATTR 
    13721462 
    13731463  void CAxis::parse(xml::CXMLNode & node) 
     1464  TRY 
    13741465  { 
    13751466    SuperClass::parse(node); 
     
    14021493    } 
    14031494  } 
     1495  CATCH_DUMP_ATTR 
    14041496 
    14051497  DEFINE_REF_FUNC(Axis,axis) 
  • XIOS/dev/dev_olga/src/node/context.cpp

    r1542 r1612  
    3333      , idServer_(), client(0), server(0) 
    3434      , allProcessed(false), countChildCtx_(0) 
     35 
    3536   { /* Ne rien faire de plus */ } 
    3637 
     
    6566   */ 
    6667   CContextGroup* CContext::getRoot(void) 
     68   TRY 
    6769   { 
    6870      if (root.get()==NULL) root=std::shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 
    6971      return root.get(); 
    7072   } 
     73   CATCH 
    7174 
    7275   //---------------------------------------------------------------- 
     
    7780   */ 
    7881   std::shared_ptr<CCalendar> CContext::getCalendar(void) const 
     82   TRY 
    7983   { 
    8084      return (this->calendar); 
    8185   } 
     86   CATCH 
    8287 
    8388   //---------------------------------------------------------------- 
     
    8893   */ 
    8994   void CContext::setCalendar(std::shared_ptr<CCalendar> newCalendar) 
     95   TRY 
    9096   { 
    9197      this->calendar = newCalendar; 
    9298   } 
     99   CATCH_DUMP_ATTR 
    93100 
    94101   //---------------------------------------------------------------- 
     
    98105   */ 
    99106   void CContext::parse(xml::CXMLNode & node) 
     107   TRY 
    100108   { 
    101109      CContext::SuperClass::parse(node); 
     
    152160      } 
    153161   } 
     162   CATCH_DUMP_ATTR 
    154163 
    155164   //---------------------------------------------------------------- 
    156165   //! Show tree structure of context 
    157166   void CContext::ShowTree(StdOStream & out) 
     167   TRY 
    158168   { 
    159169      StdString currentContextId = CContext::getCurrent() -> getId(); 
     
    176186      CContext::setCurrent(currentContextId); 
    177187   } 
    178  
     188   CATCH 
    179189 
    180190   //---------------------------------------------------------------- 
     
    182192   //! Convert context object into string (to print) 
    183193   StdString CContext::toString(void) const 
     194   TRY 
    184195   { 
    185196      StdOStringStream oss; 
     
    201212 
    202213      } 
    203  
    204214      oss << "</" << CContext::GetName() << " >"; 
    205  
    206215      return (oss.str()); 
    207216   } 
     217   CATCH 
    208218 
    209219   //---------------------------------------------------------------- 
     
    216226   */ 
    217227   void CContext::solveDescInheritance(bool apply, const CAttributeMap * const UNUSED(parent)) 
     228   TRY 
    218229   { 
    219230#define DECLARE_NODE(Name_, name_)    \ 
     
    223234#include "node_type.conf" 
    224235   } 
     236   CATCH_DUMP_ATTR 
    225237 
    226238   //---------------------------------------------------------------- 
     
    228240   //! Verify if all root definition in the context have child. 
    229241   bool CContext::hasChild(void) const 
     242   TRY 
    230243   { 
    231244      return ( 
     
    236249      false); 
    237250} 
     251   CATCH 
    238252 
    239253   //---------------------------------------------------------------- 
    240254 
    241255   void CContext::CleanTree(void) 
     256   TRY 
    242257   { 
    243258#define DECLARE_NODE(Name_, name_) C##Name_##Definition::ClearAllAttributes(); 
     
    245260#include "node_type.conf" 
    246261   } 
     262   CATCH 
     263 
    247264   ///--------------------------------------------------------------- 
    248265 
    249266   //! Initialize client side 
    250267   void CContext::initClient(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtServer /*= 0*/) 
     268   TRY 
    251269   { 
    252270 
     
    298316     } 
    299317   } 
     318   CATCH_DUMP_ATTR 
    300319 
    301320   /*! 
     
    306325  */ 
    307326   void CContext::setClientServerBuffer(CContextClient* contextClient, bool bufferForWriting) 
     327   TRY 
    308328   { 
    309329      // Estimated minimum event size for small events (10 is an arbitrary constant just for safety) 
     
    352372     } 
    353373     contextClient->setBufferSize(bufferSize, maxEventSize); 
    354  
    355    } 
     374   } 
     375   CATCH_DUMP_ATTR 
    356376 
    357377   //! Verify whether a context is initialized 
    358378   bool CContext::isInitialized(void) 
     379   TRY 
    359380   { 
    360381     return hasClient; 
    361382   } 
     383   CATCH_DUMP_ATTR 
    362384 
    363385   void CContext::initServer(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtClient /*= 0*/) 
     386   TRY 
    364387   { 
    365388     hasServer=true; 
     
    394417     client = new CContextClient(this,intraCommClient,interCommClient, cxtClient); 
    395418   } 
     419   CATCH_DUMP_ATTR 
    396420 
    397421   //! Try to send the buffers and receive possible answers 
    398422  bool CContext::checkBuffersAndListen(bool enableEventsProcessing /*= true*/) 
     423  TRY 
    399424  { 
    400425    bool clientReady, serverFinished; 
     
    434459    } 
    435460  } 
     461   CATCH_DUMP_ATTR 
    436462 
    437463   //! Terminate a context 
    438464   void CContext::finalize(void) 
     465   TRY 
    439466   { 
    440467      if (hasClient && !hasServer) // For now we only use server level 1 to read data 
     
    527554     } 
    528555   } 
     556   CATCH_DUMP_ATTR 
    529557 
    530558   //! Free internally allocated communicators 
    531559   void CContext::freeComms(void) 
     560   TRY 
    532561   { 
    533562     for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
     
    535564     comms.clear(); 
    536565   } 
     566   CATCH_DUMP_ATTR 
    537567 
    538568   //! Deallocate buffers allocated by clientContexts 
    539569   void CContext::releaseClientBuffers(void) 
     570   TRY 
    540571   { 
    541572     client->releaseBuffers(); 
     
    543574       clientPrimServer[i]->releaseBuffers(); 
    544575   } 
     576   CATCH_DUMP_ATTR 
    545577 
    546578   void CContext::postProcessingGlobalAttributes() 
     579   TRY 
    547580   { 
    548581     if (allProcessed) return;   
     
    608641     allProcessed = true; 
    609642   } 
     643   CATCH_DUMP_ATTR 
    610644 
    611645   void CContext::sendPostProcessingGlobalAttributes() 
     646   TRY 
    612647   { 
    613648      // Use correct context client to send message 
     
    634669     } 
    635670   } 
     671   CATCH_DUMP_ATTR 
    636672 
    637673   void CContext::recvPostProcessingGlobalAttributes(CEventServer& event) 
     674   TRY 
    638675   { 
    639676      CBufferIn* buffer=event.subEvents.begin()->buffer; 
     
    642679      get(id)->recvPostProcessingGlobalAttributes(*buffer); 
    643680   } 
     681   CATCH 
    644682 
    645683   void CContext::recvPostProcessingGlobalAttributes(CBufferIn& buffer) 
     684   TRY 
    646685   {       
    647686      postProcessingGlobalAttributes(); 
    648687   } 
     688   CATCH_DUMP_ATTR 
    649689 
    650690   /*! 
     
    657697   and the active fields (fields will be written onto active files) 
    658698   */ 
     699 
    659700   void CContext::closeDefinition(void) 
     701   TRY 
    660702   { 
    661703    CTimer::get("Context : close definition").resume() ; 
     
    688730    CTimer::get("Context : close definition").suspend() ; 
    689731   } 
     732   CATCH_DUMP_ATTR 
    690733 
    691734   void CContext::findAllEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles) 
     735   TRY 
    692736   { 
    693737     for (unsigned int i = 0; i < activeFiles.size(); i++) 
    694738     (void)activeFiles[i]->getEnabledFields(); 
    695739   } 
     740   CATCH_DUMP_ATTR 
    696741 
    697742   void CContext::readAttributesOfEnabledFieldsInReadModeFiles() 
     743   TRY 
    698744   { 
    699745      for (unsigned int i = 0; i < this->enabledReadModeFiles.size(); ++i) 
    700746        (void)this->enabledReadModeFiles[i]->readAttributesOfEnabledFieldsInReadMode(); 
    701747   } 
     748   CATCH_DUMP_ATTR 
    702749 
    703750   void CContext::sendGridComponentEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles) 
     751   TRY 
    704752   { 
    705753     int size = activeFiles.size(); 
     
    709757     } 
    710758   } 
     759   CATCH_DUMP_ATTR 
    711760 
    712761   /*! 
     
    715764   */ 
    716765   void CContext::sendGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles) 
     766   TRY 
    717767   { 
    718768     int size = activeFiles.size(); 
     
    722772     } 
    723773   } 
     774   CATCH_DUMP_ATTR 
    724775 
    725776   void CContext::checkGridEnabledFields() 
     777   TRY 
    726778   { 
    727779     int size = enabledFiles.size(); 
     
    731783     } 
    732784   } 
     785   CATCH_DUMP_ATTR 
    733786 
    734787   /*! 
     
    737790   */ 
    738791   void CContext::checkGridEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles) 
     792   TRY 
    739793   { 
    740794     int size = activeFiles.size(); 
     
    744798     } 
    745799   } 
     800   CATCH_DUMP_ATTR 
    746801 
    747802    /*! 
     
    751806   */ 
    752807   void CContext::solveOnlyRefOfEnabledFields(bool sendToServer) 
     808   TRY 
    753809   { 
    754810     int size = this->enabledFiles.size(); 
     
    763819     } 
    764820   } 
     821   CATCH_DUMP_ATTR 
    765822 
    766823    /*! 
     
    771828   */ 
    772829   void CContext::solveAllRefOfEnabledFieldsAndTransform(bool sendToServer) 
     830   TRY 
    773831   { 
    774832     int size = this->enabledFiles.size(); 
     
    778836     } 
    779837   } 
     838   CATCH_DUMP_ATTR 
    780839 
    781840   void CContext::buildFilterGraphOfEnabledFields() 
     841   TRY 
    782842   { 
    783843     int size = this->enabledFiles.size(); 
     
    787847     } 
    788848   } 
     849   CATCH_DUMP_ATTR 
    789850 
    790851   void CContext::postProcessFilterGraph() 
     852   TRY 
    791853   { 
    792854     int size = enabledFiles.size(); 
     
    796858     } 
    797859   } 
     860   CATCH_DUMP_ATTR 
    798861 
    799862   void CContext::startPrefetchingOfEnabledReadModeFiles() 
     863   TRY 
    800864   { 
    801865     int size = enabledReadModeFiles.size(); 
     
    805869     } 
    806870   } 
     871   CATCH_DUMP_ATTR 
    807872 
    808873   void CContext::doPreTimestepOperationsForEnabledReadModeFiles() 
     874   TRY 
    809875   { 
    810876     int size = enabledReadModeFiles.size(); 
     
    814880     } 
    815881   } 
     882   CATCH_DUMP_ATTR 
    816883 
    817884   void CContext::doPostTimestepOperationsForEnabledReadModeFiles() 
     885   TRY 
    818886   { 
    819887     int size = enabledReadModeFiles.size(); 
     
    823891     } 
    824892   } 
     893   CATCH_DUMP_ATTR 
    825894 
    826895  void CContext::findFieldsWithReadAccess(void) 
     896  TRY 
    827897  { 
    828898    fieldsWithReadAccess.clear(); 
     
    838908    } 
    839909  } 
     910  CATCH_DUMP_ATTR 
    840911 
    841912  void CContext::solveAllRefOfFieldsWithReadAccess() 
     913  TRY 
    842914  { 
    843915    for (size_t i = 0; i < fieldsWithReadAccess.size(); ++i) 
    844916      fieldsWithReadAccess[i]->solveAllReferenceEnabledField(false); 
    845917  } 
     918  CATCH_DUMP_ATTR 
    846919 
    847920  void CContext::buildFilterGraphOfFieldsWithReadAccess() 
     921  TRY 
    848922  { 
    849923    for (size_t i = 0; i < fieldsWithReadAccess.size(); ++i) 
    850924      fieldsWithReadAccess[i]->buildFilterGraph(garbageCollector, true); 
    851925  } 
     926  CATCH_DUMP_ATTR 
    852927 
    853928   void CContext::solveAllInheritance(bool apply) 
     929   TRY 
    854930   { 
    855931     // Résolution des héritages descendants (càd des héritages de groupes) 
     
    874950 
    875951   } 
     952  CATCH_DUMP_ATTR 
    876953 
    877954   void CContext::findEnabledFiles(void) 
     955   TRY 
    878956   { 
    879957      const std::vector<CFile*> allFiles = CFile::getAll(); 
     
    9241002 
    9251003   } 
     1004   CATCH_DUMP_ATTR 
    9261005 
    9271006   void CContext::distributeFiles(void) 
     1007   TRY 
    9281008   { 
    9291009     bool distFileMemory=false ; 
     
    9331013     else distributeFileOverBandwith() ; 
    9341014   } 
    935  
     1015   CATCH_DUMP_ATTR 
    9361016 
    9371017   void CContext::distributeFileOverBandwith(void) 
     1018   TRY 
    9381019   { 
    9391020     double eps=std::numeric_limits<double>::epsilon()*10 ; 
     
    10151096     } 
    10161097   } 
     1098   CATCH_DUMP_ATTR 
    10171099 
    10181100   void CContext::distributeFileOverMemoryBandwith(void) 
     1101   TRY 
    10191102   { 
    10201103     // If primary server 
     
    11071190   } 
    11081191} 
    1109  
    1110  
     1192   CATCH_DUMP_ATTR 
    11111193 
    11121194   /*! 
     
    11141196   */ 
    11151197   void CContext::findEnabledWriteModeFiles(void) 
     1198   TRY 
    11161199   { 
    11171200     int size = this->enabledFiles.size(); 
     
    11231206     } 
    11241207   } 
     1208   CATCH_DUMP_ATTR 
    11251209 
    11261210   /*! 
     
    11281212   */ 
    11291213   void CContext::findEnabledReadModeFiles(void) 
     1214   TRY 
    11301215   { 
    11311216     int size = this->enabledFiles.size(); 
     
    11361221     } 
    11371222   } 
     1223   CATCH_DUMP_ATTR 
    11381224 
    11391225   void CContext::closeAllFile(void) 
     1226   TRY 
    11401227   { 
    11411228     std::vector<CFile*>::const_iterator 
     
    11481235     } 
    11491236   } 
     1237   CATCH_DUMP_ATTR 
    11501238 
    11511239   /*! 
     
    11571245   */ 
    11581246   bool CContext::dispatchEvent(CEventServer& event) 
     1247   TRY 
    11591248   { 
    11601249 
     
    11981287      } 
    11991288   } 
     1289   CATCH 
    12001290 
    12011291   //! Client side: Send a message to server to make it close 
    12021292   void CContext::sendCloseDefinition(void) 
     1293   TRY 
    12031294   { 
    12041295     // Use correct context client to send message 
     
    12231314     } 
    12241315   } 
     1316   CATCH_DUMP_ATTR 
    12251317 
    12261318   //! Server side: Receive a message of client announcing a context close 
    12271319   void CContext::recvCloseDefinition(CEventServer& event) 
     1320   TRY 
    12281321   { 
    12291322      CBufferIn* buffer=event.subEvents.begin()->buffer; 
     
    12321325      get(id)->closeDefinition(); 
    12331326   } 
     1327   CATCH 
    12341328 
    12351329   //! Client side: Send a message to update calendar in each time step 
    12361330   void CContext::sendUpdateCalendar(int step) 
     1331   TRY 
    12371332   { 
    12381333     // Use correct context client to send message 
     
    12581353     } 
    12591354   } 
     1355   CATCH_DUMP_ATTR 
    12601356 
    12611357   //! Server side: Receive a message of client annoucing calendar update 
    12621358   void CContext::recvUpdateCalendar(CEventServer& event) 
     1359   TRY 
    12631360   { 
    12641361      CBufferIn* buffer=event.subEvents.begin()->buffer; 
     
    12671364      get(id)->recvUpdateCalendar(*buffer); 
    12681365   } 
     1366   CATCH 
    12691367 
    12701368   //! Server side: Receive a message of client annoucing calendar update 
    12711369   void CContext::recvUpdateCalendar(CBufferIn& buffer) 
     1370   TRY 
    12721371   { 
    12731372      int step; 
     
    12791378      } 
    12801379   } 
     1380   CATCH_DUMP_ATTR 
    12811381 
    12821382   //! Client side: Send a message to create header part of netcdf file 
    12831383   void CContext::sendCreateFileHeader(void) 
     1384   TRY 
    12841385   { 
    12851386     // Use correct context client to send message 
     
    13061407     } 
    13071408   } 
     1409   CATCH_DUMP_ATTR 
    13081410 
    13091411   //! Server side: Receive a message of client annoucing the creation of header part of netcdf file 
    13101412   void CContext::recvCreateFileHeader(CEventServer& event) 
     1413   TRY 
    13111414   { 
    13121415      CBufferIn* buffer=event.subEvents.begin()->buffer; 
     
    13151418      get(id)->recvCreateFileHeader(*buffer); 
    13161419   } 
     1420   CATCH 
    13171421 
    13181422   //! Server side: Receive a message of client annoucing the creation of header part of netcdf file 
    13191423   void CContext::recvCreateFileHeader(CBufferIn& buffer) 
     1424   TRY 
    13201425   { 
    13211426      if (!hasClient && hasServer)  
    13221427        createFileHeader(); 
    13231428   } 
     1429   CATCH_DUMP_ATTR 
    13241430 
    13251431   //! Client side: Send a message to do some post processing on server 
    13261432   void CContext::sendProcessingGridOfEnabledFields() 
     1433   TRY 
    13271434   { 
    13281435      // Use correct context client to send message 
     
    13481455     } 
    13491456   } 
     1457   CATCH_DUMP_ATTR 
    13501458 
    13511459   //! Server side: Receive a message to do some post processing 
    13521460   void CContext::recvProcessingGridOfEnabledFields(CEventServer& event) 
     1461   TRY 
    13531462   { 
    13541463      CBufferIn* buffer=event.subEvents.begin()->buffer; 
     
    13561465      *buffer>>id;       
    13571466   } 
     1467   CATCH 
    13581468 
    13591469   //! Client side: Send a message to do some post processing on server 
    13601470   void CContext::sendPostProcessing() 
     1471   TRY 
    13611472   { 
    13621473      // Use correct context client to send message 
     
    13821493     } 
    13831494   } 
     1495   CATCH_DUMP_ATTR 
    13841496 
    13851497   //! Server side: Receive a message to do some post processing 
    13861498   void CContext::recvPostProcessing(CEventServer& event) 
     1499   TRY 
    13871500   { 
    13881501      CBufferIn* buffer=event.subEvents.begin()->buffer; 
     
    13911504      get(id)->recvPostProcessing(*buffer); 
    13921505   } 
     1506   CATCH 
    13931507 
    13941508   //! Server side: Receive a message to do some post processing 
    13951509   void CContext::recvPostProcessing(CBufferIn& buffer) 
     1510   TRY 
    13961511   { 
    13971512      CCalendarWrapper::get(CCalendarWrapper::GetDefName())->createCalendar(); 
    13981513      postProcessing(); 
    13991514   } 
     1515   CATCH_DUMP_ATTR 
    14001516 
    14011517   const StdString& CContext::getIdServer() 
     1518   TRY 
    14021519   { 
    14031520      if (hasClient) 
     
    14091526      if (hasServer) return (this->getId()); 
    14101527   } 
     1528   CATCH_DUMP_ATTR 
    14111529 
    14121530   const StdString& CContext::getIdServer(const int i) 
     1531   TRY 
    14131532   { 
    14141533     idServer_ = this->getId(); 
     
    14171536     return idServer_; 
    14181537   } 
    1419  
     1538   CATCH_DUMP_ATTR 
    14201539 
    14211540   /*! 
     
    14261545   */ 
    14271546   void CContext::postProcessing() 
     1547   TRY 
    14281548   { 
    14291549     if (isPostProcessed) return; 
     
    14881608      isPostProcessed = true; 
    14891609   } 
     1610   CATCH_DUMP_ATTR 
    14901611 
    14911612   /*! 
     
    14981619   std::map<int, StdSize> CContext::getAttributesBufferSize(std::map<int, StdSize>& maxEventSize, 
    14991620                                                           CContextClient* contextClient, bool bufferForWriting /*= "false"*/) 
     1621   TRY 
    15001622   { 
    15011623         // As calendar attributes are sent even if there are no active files or fields, maps are initialized according the size of calendar attributes 
     
    15291651     return attributesSize; 
    15301652   } 
     1653   CATCH_DUMP_ATTR 
    15311654 
    15321655   /*! 
     
    15391662   std::map<int, StdSize> CContext::getDataBufferSize(std::map<int, StdSize>& maxEventSize, 
    15401663                                                      CContextClient* contextClient, bool bufferForWriting /*= "false"*/) 
     1664   TRY 
    15411665   { 
    15421666     std::map<int, StdSize> dataSize; 
     
    15471671     for (size_t i = 0; i < numEnabledFiles; ++i) 
    15481672     { 
    1549 //       CFile* file = this->enabledFiles[i]; 
    15501673       CFile* file = fileList[i]; 
    15511674       if (file->getContextClient() == contextClient) 
     
    15751698     return dataSize; 
    15761699   } 
     1700   CATCH_DUMP_ATTR 
    15771701 
    15781702   //! Client side: Send infomation of active files (files are enabled to write out) 
    15791703   void CContext::sendEnabledFiles(const std::vector<CFile*>& activeFiles) 
     1704   TRY 
    15801705   { 
    15811706     int size = activeFiles.size(); 
     
    15951720     } 
    15961721   } 
     1722   CATCH_DUMP_ATTR 
    15971723 
    15981724   //! Client side: Send information of active fields (ones are written onto files) 
    15991725   void CContext::sendEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles) 
     1726   TRY 
    16001727   { 
    16011728     int size = activeFiles.size(); 
     
    16051732     } 
    16061733   } 
     1734   CATCH_DUMP_ATTR 
    16071735 
    16081736   //! Client side: Check if the defined axis, domains and grids are eligible for compressed indexed output 
    16091737   void CContext::checkAxisDomainsGridsEligibilityForCompressedOutput() 
     1738   TRY 
    16101739   { 
    16111740     if (!hasClient) return; 
     
    16231752       (*it)->checkEligibilityForCompressedOutput(); 
    16241753   } 
     1754   CATCH_DUMP_ATTR 
    16251755 
    16261756   //! Client side: Prepare the timeseries by adding the necessary files 
    16271757   void CContext::prepareTimeseries() 
     1758   TRY 
    16281759   { 
    16291760     if (!hasClient) return; 
     
    17231854     } 
    17241855   } 
     1856   CATCH_DUMP_ATTR 
    17251857 
    17261858   //! Client side: Send information of reference grid of active fields 
    17271859   void CContext::sendRefGrid(const std::vector<CFile*>& activeFiles) 
     1860   TRY 
    17281861   { 
    17291862     std::set<StdString> gridIds; 
     
    17571890     } 
    17581891   } 
     1892   CATCH_DUMP_ATTR 
    17591893 
    17601894   //! Client side: Send information of reference domain, axis and scalar of active fields 
    17611895   void CContext::sendRefDomainsAxisScalars(const std::vector<CFile*>& activeFiles) 
     1896   TRY 
    17621897   { 
    17631898     std::set<StdString> domainIds, axisIds, scalarIds; 
     
    18181953     } 
    18191954   } 
     1955   CATCH_DUMP_ATTR 
    18201956 
    18211957   //! Update calendar in each time step 
    18221958   void CContext::updateCalendar(int step) 
     1959   TRY 
    18231960   { 
    18241961      int prevStep = calendar->getStep(); 
     
    18501987              << "Illegal calendar update: previous step was " << prevStep << ", new step " << step << "is in the past!") 
    18511988   } 
     1989   CATCH_DUMP_ATTR 
    18521990 
    18531991   void CContext::initReadFiles(void) 
     1992   TRY 
    18541993   { 
    18551994      vector<CFile*>::const_iterator it; 
     
    18601999      } 
    18612000   } 
     2001   CATCH_DUMP_ATTR 
    18622002 
    18632003   //! Server side: Create header of netcdf file 
    18642004   void CContext::createFileHeader(void) 
     2005   TRY 
    18652006   { 
    18662007      vector<CFile*>::const_iterator it; 
     
    18722013      } 
    18732014   } 
     2015   CATCH_DUMP_ATTR 
    18742016 
    18752017   //! Get current context 
    18762018   CContext* CContext::getCurrent(void) 
     2019   TRY 
    18772020   { 
    18782021     return CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()).get(); 
    18792022   } 
     2023   CATCH 
    18802024 
    18812025   /*! 
     
    18842028   */ 
    18852029   void CContext::setCurrent(const string& id) 
     2030   TRY 
    18862031   { 
    18872032     CObjectFactory::SetCurrentContextId(id); 
    18882033     CGroupFactory::SetCurrentContextId(id); 
    18892034   } 
     2035   CATCH 
    18902036 
    18912037  /*! 
     
    18952041  */ 
    18962042  CContext* CContext::create(const StdString& id) 
     2043  TRY 
    18972044  { 
    18982045    CContext::setCurrent(id); 
     
    19102057    return (context); 
    19112058  } 
    1912  
     2059  CATCH 
    19132060 
    19142061     //! Server side: Receive a message to do some post processing 
    19152062  void CContext::recvRegistry(CEventServer& event) 
     2063  TRY 
    19162064  { 
    19172065    CBufferIn* buffer=event.subEvents.begin()->buffer; 
     
    19202068    get(id)->recvRegistry(*buffer); 
    19212069  } 
     2070  CATCH 
    19222071 
    19232072  void CContext::recvRegistry(CBufferIn& buffer) 
     2073  TRY 
    19242074  { 
    19252075    if (server->intraCommRank==0) 
     
    19302080    } 
    19312081  } 
     2082  CATCH_DUMP_ATTR 
    19322083 
    19332084  void CContext::sendRegistry(void) 
     2085  TRY 
    19342086  { 
    19352087    registryOut->hierarchicalGatherRegistry() ; 
     
    19572109    } 
    19582110  } 
     2111  CATCH_DUMP_ATTR 
    19592112 
    19602113  /*! 
     
    19632116  */ 
    19642117  bool CContext::isFinalized(void) 
     2118  TRY 
    19652119  { 
    19662120    return finalized; 
    19672121  } 
     2122  CATCH_DUMP_ATTR 
     2123  ///-------------------------------------------------------------- 
     2124  StdString CContext::dumpClassAttributes(void) 
     2125  { 
     2126    StdString str; 
     2127    str.append("enabled files=\""); 
     2128    int size = this->enabledFiles.size(); 
     2129    for (int i = 0; i < size; ++i) 
     2130    { 
     2131      str.append(enabledFiles[i]->getId()); 
     2132      str.append(" "); 
     2133    } 
     2134    str.append("\""); 
     2135    return str; 
     2136  } 
    19682137 
    19692138} // namespace xios 
  • XIOS/dev/dev_olga/src/node/context.hpp

    r1542 r1612  
    9191         void initServer(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtClient = 0); 
    9292         bool isInitialized(void); 
     93 
     94         StdString dumpClassAttributes(void); 
    9395 
    9496         // Put sever or client into loop state 
     
    143145         void distributeFileOverMemoryBandwith() ; 
    144146          
    145  
    146147         // Send context close definition 
    147148         void sendCloseDefinition(void); 
  • XIOS/dev/dev_olga/src/node/domain.cpp

    r1600 r1612  
    5858 
    5959   void CDomain::assignMesh(const StdString meshName, const int nvertex) 
     60   TRY 
    6061   { 
    6162     mesh = CMesh::getMesh(meshName, nvertex); 
    6263   } 
     64   CATCH_DUMP_ATTR 
    6365 
    6466   CDomain* CDomain::createDomain() 
     67   TRY 
    6568   { 
    6669     CDomain* domain = CDomainGroup::get("domain_definition")->createChild(); 
    6770     return domain; 
    6871   } 
     72   CATCH 
    6973 
    7074   std::map<StdString, ETranformationType> CDomain::transformationMapList_ = std::map<StdString, ETranformationType>(); 
     
    7276 
    7377   bool CDomain::initializeTransformationMap(std::map<StdString, ETranformationType>& m) 
     78   TRY 
    7479   { 
    7580     m["zoom_domain"] = TRANS_ZOOM_DOMAIN; 
     
    8186     m["extract_domain"] = TRANS_EXTRACT_DOMAIN; 
    8287   } 
     88   CATCH 
    8389 
    8490   const std::set<StdString> & CDomain::getRelFiles(void) const 
     91   TRY 
    8592   { 
    8693      return (this->relFiles); 
    8794   } 
    88  
     95   CATCH 
    8996 
    9097   /*! 
     
    93100   */ 
    94101   int CDomain::getNumberWrittenIndexes(MPI_Comm writtenCom) 
     102   TRY 
    95103   { 
    96104     int writtenSize; 
     
    98106     return numberWrittenIndexes_[writtenSize]; 
    99107   } 
     108   CATCH_DUMP_ATTR 
    100109 
    101110   /*! 
     
    104113   */ 
    105114   int CDomain::getTotalNumberWrittenIndexes(MPI_Comm writtenCom) 
     115   TRY 
    106116   { 
    107117     int writtenSize; 
     
    109119     return totalNumberWrittenIndexes_[writtenSize]; 
    110120   } 
     121   CATCH_DUMP_ATTR 
    111122 
    112123   /*! 
     
    115126   */ 
    116127   int CDomain::getOffsetWrittenIndexes(MPI_Comm writtenCom) 
     128   TRY 
    117129   { 
    118130     int writtenSize; 
     
    120132     return offsetWrittenIndexes_[writtenSize]; 
    121133   } 
     134   CATCH_DUMP_ATTR 
    122135 
    123136   CArray<int, 1>& CDomain::getCompressedIndexToWriteOnServer(MPI_Comm writtenCom) 
     137   TRY 
    124138   { 
    125139     int writtenSize; 
     
    127141     return compressedIndexToWriteOnServer[writtenSize]; 
    128142   } 
     143   CATCH_DUMP_ATTR 
    129144 
    130145   //---------------------------------------------------------------- 
     
    136151    */ 
    137152   std::map<int, StdSize> CDomain::getAttributesBufferSize(CContextClient* client, bool bufferForWriting /*= false*/) 
     153   TRY 
    138154   { 
    139155 
     
    176192     return attributesSizes; 
    177193   } 
     194   CATCH_DUMP_ATTR 
    178195 
    179196   //---------------------------------------------------------------- 
    180197 
    181198   bool CDomain::isEmpty(void) const 
     199   TRY 
    182200   { 
    183201     return ((this->i_index.isEmpty()) || (0 == this->i_index.numElements())); 
    184202   } 
     203   CATCH 
    185204 
    186205   //---------------------------------------------------------------- 
    187206 
    188207   bool CDomain::IsWritten(const StdString & filename) const 
     208   TRY 
    189209   { 
    190210      return (this->relFiles.find(filename) != this->relFiles.end()); 
    191211   } 
     212   CATCH 
    192213 
    193214   bool CDomain::isWrittenCompressed(const StdString& filename) const 
     215   TRY 
    194216   { 
    195217      return (this->relFilesCompressed.find(filename) != this->relFilesCompressed.end()); 
    196218   } 
     219   CATCH 
    197220 
    198221   //---------------------------------------------------------------- 
    199222 
    200223   bool CDomain::isDistributed(void) const 
     224   TRY 
    201225   { 
    202226      bool distributed =  !((!ni.isEmpty() && (ni == ni_glo) && !nj.isEmpty() && (nj == nj_glo)) || 
     
    206230      return distributed; 
    207231   } 
     232   CATCH 
    208233 
    209234   //---------------------------------------------------------------- 
     
    215240    */ 
    216241   bool CDomain::isCompressible(void) const 
     242   TRY 
    217243   { 
    218244      return isCompressible_; 
    219245   } 
     246   CATCH 
    220247 
    221248   void CDomain::addRelFile(const StdString & filename) 
     249   TRY 
    222250   { 
    223251      this->relFiles.insert(filename); 
    224252   } 
     253   CATCH_DUMP_ATTR 
    225254 
    226255   void CDomain::addRelFileCompressed(const StdString& filename) 
     256   TRY 
    227257   { 
    228258      this->relFilesCompressed.insert(filename); 
    229259   } 
     260   CATCH_DUMP_ATTR 
    230261 
    231262   StdString CDomain::GetName(void)   { return (StdString("domain")); } 
     
    240271   */ 
    241272   bool CDomain::distributionAttributesHaveValue() const 
     273   TRY 
    242274   { 
    243275      bool hasValues = true; 
     
    251283      return hasValues; 
    252284   } 
     285   CATCH 
    253286 
    254287   /*! 
     
    260293   */ 
    261294   void CDomain::redistribute(int nbLocalDomain) 
     295   TRY 
    262296   { 
    263297     if (this->isRedistributed_) return; 
     
    422456     checkDomain(); 
    423457   } 
     458   CATCH_DUMP_ATTR 
    424459 
    425460   /*! 
     
    427462   */ 
    428463   void CDomain::fillInLonLat() 
     464   TRY 
    429465   { 
    430466     switch (type) 
     
    444480     } 
    445481     completeLonLatClient() ; 
    446  
    447    } 
     482   } 
     483   CATCH_DUMP_ATTR 
    448484 
    449485   /*! 
     
    453489   */ 
    454490   void CDomain::fillInRectilinearLonLat() 
     491   TRY 
    455492   { 
    456493     if (!lonvalue_rectilinear_read_from_file.isEmpty() && lonvalue_2d.isEmpty() && lonvalue_1d.isEmpty()) 
     
    462499       lon_end.setValue(lonvalue_rectilinear_read_from_file(ni_glo-1)); 
    463500     } 
    464      else 
     501     else if (!hasLonInReadFile_) 
    465502     { 
    466503       if (!lonvalue_2d.isEmpty()) lonvalue_2d.free(); 
     
    496533       lat_end.setValue(latvalue_rectilinear_read_from_file(nj_glo-1)); 
    497534     } 
    498      else 
     535     else if (!hasLatInReadFile_) 
    499536     { 
    500537       if (!latvalue_2d.isEmpty()) latvalue_1d.free(); 
     
    521558     } 
    522559   } 
     560   CATCH_DUMP_ATTR 
    523561 
    524562    /* 
     
    527565    */ 
    528566   void CDomain::fillInCurvilinearLonLat() 
     567   TRY 
    529568   { 
    530569     if (!lonvalue_curvilinear_read_from_file.isEmpty() && lonvalue_2d.isEmpty() && lonvalue_1d.isEmpty()) 
     
    569608       bounds_latvalue_curvilinear_read_from_file.free(); 
    570609     } 
    571  
    572    } 
     610   } 
     611   CATCH_DUMP_ATTR 
    573612 
    574613    /* 
     
    577616    */ 
    578617   void CDomain::fillInUnstructuredLonLat() 
     618   TRY 
    579619   { 
    580620     if (i_index.isEmpty()) 
     
    628668     } 
    629669   } 
     670   CATCH_DUMP_ATTR 
    630671 
    631672  /* 
     
    633674  */ 
    634675   void CDomain::AllgatherRectilinearLonLat(CArray<double,1>& lon, CArray<double,1>& lat, CArray<double,1>& lon_g, CArray<double,1>& lat_g) 
     676   TRY 
    635677   { 
    636678     CContext* context = CContext::getCurrent(); 
     
    664706      delete[] nj_g ; 
    665707   } 
     708   CATCH_DUMP_ATTR 
    666709 
    667710   void CDomain::fillInRectilinearBoundLonLat(CArray<double,1>& lon, CArray<double,1>& lat, 
    668711                                              CArray<double,2>& boundsLon, CArray<double,2>& boundsLat) 
    669    { 
     712   TRY 
     713  { 
    670714     int i,j,k; 
    671715 
     
    766810      } 
    767811   } 
     812   CATCH_DUMP_ATTR 
    768813 
    769814   /* 
     
    771816   */ 
    772817   void CDomain::checkDomain(void) 
     818   TRY 
    773819   { 
    774820     if (type.isEmpty()) 
     
    862908     } 
    863909   } 
     910   CATCH_DUMP_ATTR 
    864911 
    865912   size_t CDomain::getGlobalWrittenSize(void) 
     
    871918   // Check validity of local domain on using the combination of 3 parameters: ibegin, ni and i_index 
    872919   void CDomain::checkLocalIDomain(void) 
     920   TRY 
    873921   { 
    874922      // If ibegin and ni are provided then we use them to check the validity of local domain 
     
    929977      } 
    930978   } 
     979   CATCH_DUMP_ATTR 
    931980 
    932981   // Check validity of local domain on using the combination of 3 parameters: jbegin, nj and j_index 
    933982   void CDomain::checkLocalJDomain(void) 
     983   TRY 
    934984   { 
    935985    // If jbegin and nj are provided then we use them to check the validity of local domain 
     
    9801030     } 
    9811031   } 
     1032   CATCH_DUMP_ATTR 
    9821033 
    9831034   //---------------------------------------------------------------- 
    9841035 
    9851036   void CDomain::checkMask(void) 
     1037   TRY 
    9861038   { 
    9871039      if (!mask_1d.isEmpty() && !mask_2d.isEmpty()) 
     
    10291081     } 
    10301082   } 
     1083   CATCH_DUMP_ATTR 
    10311084 
    10321085   //---------------------------------------------------------------- 
    10331086 
    10341087   void CDomain::checkDomainData(void) 
     1088   TRY 
    10351089   { 
    10361090      if (data_dim.isEmpty()) 
     
    10721126      } 
    10731127   } 
     1128   CATCH_DUMP_ATTR 
    10741129 
    10751130   //---------------------------------------------------------------- 
    10761131 
    10771132   void CDomain::checkCompression(void) 
     1133   TRY 
    10781134   { 
    10791135     int i,j,ind; 
     
    12021258      } 
    12031259   } 
     1260   CATCH_DUMP_ATTR 
    12041261 
    12051262   //---------------------------------------------------------------- 
    12061263   void CDomain::computeLocalMask(void) 
     1264   TRY 
    12071265   { 
    12081266     localMask.resize(i_index.numElements()) ; 
     
    12361294     } 
    12371295   } 
     1296   CATCH_DUMP_ATTR 
    12381297 
    12391298   void CDomain::checkEligibilityForCompressedOutput(void) 
     1299   TRY 
    12401300   { 
    12411301     // We don't check if the mask or the indexes are valid here, just if they have been defined at this point. 
    12421302     isCompressible_ = !mask_1d.isEmpty() || !mask_2d.isEmpty() || !data_i_index.isEmpty(); 
    12431303   } 
     1304   CATCH_DUMP_ATTR 
    12441305 
    12451306   //---------------------------------------------------------------- 
     
    12501311   */ 
    12511312   void CDomain::completeLonLatClient(void) 
     1313   TRY 
    12521314   { 
    12531315     bool lonlatValueExisted = (0 != lonvalue.numElements()) || (0 != latvalue.numElements()); 
     
    13631425     } 
    13641426   } 
     1427   CATCH_DUMP_ATTR 
    13651428 
    13661429   /* 
     
    13681431   */ 
    13691432   void CDomain::convertLonLatValue(void) 
     1433   TRY 
    13701434   { 
    13711435     bool lonlatValueExisted = (0 != lonvalue.numElements()) || (0 != latvalue.numElements()); 
     
    14651529     } 
    14661530   } 
    1467  
     1531   CATCH_DUMP_ATTR 
    14681532 
    14691533   void CDomain::checkBounds(void) 
     1534   TRY 
    14701535   { 
    14711536     bool hasBoundValues = (0 != bounds_lonvalue.numElements()) || (0 != bounds_latvalue.numElements()); 
     
    15591624     } 
    15601625   } 
     1626   CATCH_DUMP_ATTR 
    15611627 
    15621628   void CDomain::checkArea(void) 
     1629   TRY 
    15631630   { 
    15641631     bool hasAreaValue = (!areavalue.isEmpty() && 0 != areavalue.numElements()); 
     
    15881655     } 
    15891656   } 
     1657   CATCH_DUMP_ATTR 
    15901658 
    15911659   void CDomain::checkLonLat() 
     1660   TRY 
    15921661   { 
    15931662     if (!hasLonLat) hasLonLat = (!latvalue_1d.isEmpty() && !lonvalue_1d.isEmpty()) || 
     
    16491718     } 
    16501719   } 
     1720   CATCH_DUMP_ATTR 
    16511721 
    16521722   void CDomain::checkAttributesOnClientAfterTransformation() 
     1723   TRY 
    16531724   { 
    16541725     CContext* context=CContext::getCurrent() ; 
     
    16651736     this->isClientAfterTransformationChecked = true; 
    16661737   } 
     1738   CATCH_DUMP_ATTR 
    16671739 
    16681740   //---------------------------------------------------------------- 
     
    16701742   // This function only checks all attributes of current domain 
    16711743   void CDomain::checkAttributesOnClient() 
     1744   TRY 
    16721745   { 
    16731746     if (this->isClientChecked) return; 
     
    16951768      this->isClientChecked = true; 
    16961769   } 
     1770   CATCH_DUMP_ATTR 
    16971771 
    16981772   // Send all checked attributes to server 
    16991773   void CDomain::sendCheckedAttributes() 
     1774   TRY 
    17001775   { 
    17011776     if (!this->isClientChecked) checkAttributesOnClient(); 
     
    17101785     this->isChecked = true; 
    17111786   } 
     1787   CATCH_DUMP_ATTR 
    17121788 
    17131789   void CDomain::checkAttributes(void) 
     1790   TRY 
    17141791   { 
    17151792      if (this->isChecked) return; 
     
    17411818      this->isChecked = true; 
    17421819   } 
     1820   CATCH_DUMP_ATTR 
    17431821 
    17441822  /*! 
     
    17491827  */ 
    17501828  void CDomain::computeConnectedClients() 
     1829  TRY 
    17511830  { 
    17521831    CContext* context=CContext::getCurrent() ; 
     
    18761955    } 
    18771956  } 
     1957  CATCH_DUMP_ATTR 
    18781958 
    18791959   /*! 
     
    18831963   */ 
    18841964   void CDomain::computeWrittenIndex() 
     1965   TRY 
    18851966   {   
    18861967      if (computedWrittenIndex_) return; 
     
    19202001      } 
    19212002   } 
     2003   CATCH_DUMP_ATTR 
    19222004 
    19232005  void CDomain::computeWrittenCompressedIndex(MPI_Comm writtenComm) 
     2006  TRY 
    19242007  { 
    19252008    int writtenCommSize; 
     
    19892072      } 
    19902073  } 
     2074  CATCH_DUMP_ATTR 
    19912075 
    19922076  /*! 
     
    19952079  */ 
    19962080  void CDomain::sendAttributes() 
     2081  TRY 
    19972082  { 
    19982083    sendDistributionAttributes(); 
     
    20022087    sendDataIndex(); 
    20032088  } 
    2004  
     2089  CATCH 
    20052090  /*! 
    20062091    Send global index from client to connected client(s) 
    20072092  */ 
    20082093  void CDomain::sendIndex() 
     2094  TRY 
    20092095  { 
    20102096    int ns, n, i, j, ind, nv, idx; 
     
    20492135    } 
    20502136  } 
     2137  CATCH_DUMP_ATTR 
    20512138 
    20522139  /*! 
     
    20562143  */ 
    20572144  void CDomain::sendDistributionAttributes(void) 
     2145  TRY 
    20582146  { 
    20592147    std::list<CContextClient*>::iterator it; 
     
    21022190    } 
    21032191  } 
     2192  CATCH_DUMP_ATTR 
    21042193 
    21052194  /*! 
     
    21072196  */ 
    21082197  void CDomain::sendArea() 
     2198  TRY 
    21092199  { 
    21102200    if (!hasArea) return; 
     
    21502240    } 
    21512241  } 
     2242  CATCH_DUMP_ATTR 
    21522243 
    21532244  /*! 
     
    21572248  */ 
    21582249  void CDomain::sendLonLat() 
     2250  TRY 
    21592251  { 
    21602252    if (!hasLonLat) return; 
     
    22452337    } 
    22462338  } 
     2339  CATCH_DUMP_ATTR 
    22472340 
    22482341  /*! 
     
    22532346  */ 
    22542347  void CDomain::sendDataIndex() 
     2348  TRY 
    22552349  { 
    22562350    int ns, n, i, j, ind, nv, idx; 
     
    23212415    } 
    23222416  } 
     2417  CATCH 
    23232418   
    23242419  bool CDomain::dispatchEvent(CEventServer& event) 
     2420  TRY 
    23252421  { 
    23262422    if (SuperClass::dispatchEvent(event)) return true; 
     
    23602456    } 
    23612457  } 
     2458  CATCH 
    23622459 
    23632460  /*! 
     
    23662463  */ 
    23672464  void CDomain::recvIndex(CEventServer& event) 
     2465  TRY 
    23682466  { 
    23692467    string domainId; 
     
    23792477    get(domainId)->recvIndex(rankBuffers); 
    23802478  } 
     2479  CATCH 
    23812480 
    23822481  /*! 
     
    23862485  */ 
    23872486  void CDomain::recvIndex(std::map<int, CBufferIn*>& rankBuffers) 
     2487  TRY 
    23882488  { 
    23892489    int nbReceived = rankBuffers.size(), i, ind, index, type_int, iIndex, jIndex; 
     
    24452545    domainMask.resize(0); // Mask is not defined anymore on servers 
    24462546  } 
     2547  CATCH 
    24472548 
    24482549  /*! 
     
    24512552  */ 
    24522553  void CDomain::recvDistributionAttributes(CEventServer& event) 
     2554  TRY 
    24532555  { 
    24542556    CBufferIn* buffer=event.subEvents.begin()->buffer; 
     
    24572559    get(domainId)->recvDistributionAttributes(*buffer); 
    24582560  } 
     2561  CATCH 
    24592562 
    24602563  /*! 
     
    24642567  */ 
    24652568  void CDomain::recvDistributionAttributes(CBufferIn& buffer) 
     2569  TRY 
    24662570  { 
    24672571    int ni_tmp, ibegin_tmp, nj_tmp, jbegin_tmp; 
     
    24792583 
    24802584  } 
    2481  
     2585 CATCH_DUMP_ATTR 
    24822586  /*! 
    24832587    Receive longitude event from clients(s) 
     
    24852589  */ 
    24862590  void CDomain::recvLon(CEventServer& event) 
     2591  TRY 
    24872592  { 
    24882593    string domainId; 
     
    24982603    get(domainId)->recvLon(rankBuffers); 
    24992604  } 
     2605  CATCH 
    25002606 
    25012607  /*! 
     
    25042610  */ 
    25052611  void CDomain::recvLon(std::map<int, CBufferIn*>& rankBuffers) 
     2612  TRY 
    25062613  { 
    25072614    int nbReceived = rankBuffers.size(), i, ind, index, iindex, jindex, lInd; 
     
    25632670    } 
    25642671  } 
     2672  CATCH_DUMP_ATTR 
    25652673 
    25662674  /*! 
     
    25692677  */ 
    25702678  void CDomain::recvLat(CEventServer& event) 
     2679  TRY 
    25712680  { 
    25722681    string domainId; 
     
    25822691    get(domainId)->recvLat(rankBuffers); 
    25832692  } 
     2693  CATCH 
    25842694 
    25852695  /*! 
     
    25882698  */ 
    25892699  void CDomain::recvLat(std::map<int, CBufferIn*>& rankBuffers) 
     2700  TRY 
    25902701  { 
    25912702    int nbReceived = rankBuffers.size(), i, ind, index, iindex, jindex, lInd; 
     
    26492760    } 
    26502761  } 
     2762  CATCH_DUMP_ATTR 
    26512763 
    26522764  /*! 
     
    26552767  */ 
    26562768  void CDomain::recvArea(CEventServer& event) 
     2769  TRY 
    26572770  { 
    26582771    string domainId; 
     
    26682781    get(domainId)->recvArea(rankBuffers); 
    26692782  } 
     2783  CATCH 
    26702784 
    26712785  /*! 
     
    26742788  */ 
    26752789  void CDomain::recvArea(std::map<int, CBufferIn*>& rankBuffers) 
     2790  TRY 
    26762791  { 
    26772792    int nbReceived = rankBuffers.size(), i, ind, index, lInd; 
     
    27192834    } 
    27202835  } 
     2836  CATCH_DUMP_ATTR 
    27212837 
    27222838  /*! 
     
    27282844  */ 
    27292845  bool CDomain::isEqual(CDomain* obj) 
     2846  TRY 
    27302847  { 
    27312848    vector<StdString> excludedAttr; 
     
    27502867    return objEqual; 
    27512868  } 
     2869  CATCH_DUMP_ATTR 
    27522870 
    27532871  /*! 
     
    27562874  */ 
    27572875  void CDomain::recvDataIndex(CEventServer& event) 
     2876  TRY 
    27582877  { 
    27592878    string domainId; 
     
    27692888    get(domainId)->recvDataIndex(rankBuffers); 
    27702889  } 
     2890  CATCH 
    27712891 
    27722892  /*! 
     
    27802900  */ 
    27812901  void CDomain::recvDataIndex(std::map<int, CBufferIn*>& rankBuffers) 
     2902  TRY 
    27822903  { 
    27832904    int nbReceived = rankBuffers.size(), i, ind, index, indexI, indexJ, type_int, lInd;     
     
    28462967    data_jbegin.setValue(0); 
    28472968  } 
     2969  CATCH_DUMP_ATTR 
    28482970 
    28492971  CTransformation<CDomain>* CDomain::addTransformation(ETranformationType transType, const StdString& id) 
     2972  TRY 
    28502973  { 
    28512974    transformationMap_.push_back(std::make_pair(transType, CTransformation<CDomain>::createTransformation(transType,id))); 
    28522975    return transformationMap_.back().second; 
    28532976  } 
     2977  CATCH_DUMP_ATTR 
    28542978 
    28552979  /*! 
     
    28582982  */ 
    28592983  bool CDomain::hasTransformation() 
     2984  TRY 
    28602985  { 
    28612986    return (!transformationMap_.empty()); 
    28622987  } 
     2988  CATCH_DUMP_ATTR 
    28632989 
    28642990  /*! 
     
    28672993  */ 
    28682994  void CDomain::setTransformations(const TransMapTypes& domTrans) 
     2995  TRY 
    28692996  { 
    28702997    transformationMap_ = domTrans; 
    28712998  } 
     2999  CATCH_DUMP_ATTR 
    28723000 
    28733001  /*! 
     
    28763004  */ 
    28773005  CDomain::TransMapTypes CDomain::getAllTransformations(void) 
     3006  TRY 
    28783007  { 
    28793008    return transformationMap_; 
    28803009  } 
     3010  CATCH_DUMP_ATTR 
    28813011 
    28823012  void CDomain::duplicateTransformation(CDomain* src) 
     3013  TRY 
    28833014  { 
    28843015    if (src->hasTransformation()) 
     
    28873018    } 
    28883019  } 
     3020  CATCH_DUMP_ATTR 
    28893021 
    28903022  /*! 
     
    28923024   */ 
    28933025  void CDomain::solveInheritanceTransformation() 
     3026  TRY 
    28943027  { 
    28953028    if (hasTransformation() || !hasDirectDomainReference()) 
     
    29083041        refDomains[i]->setTransformations(domain->getAllTransformations()); 
    29093042  } 
     3043  CATCH_DUMP_ATTR 
    29103044 
    29113045  void CDomain::setContextClient(CContextClient* contextClient) 
     3046  TRY 
    29123047  { 
    29133048    if (clientsSet.find(contextClient)==clientsSet.end()) 
     
    29173052    } 
    29183053  } 
     3054  CATCH_DUMP_ATTR 
    29193055 
    29203056  /*! 
     
    29243060  */ 
    29253061  void CDomain::parse(xml::CXMLNode & node) 
     3062  TRY 
    29263063  { 
    29273064    SuperClass::parse(node); 
     
    29543091    } 
    29553092  } 
     3093  CATCH_DUMP_ATTR 
    29563094   //---------------------------------------------------------------- 
    29573095 
  • XIOS/dev/dev_olga/src/node/field.cpp

    r1594 r1612  
    7171 
    7272   void CField::setVirtualVariableGroup(CVariableGroup* newVVariableGroup) 
     73   TRY 
    7374   { 
    7475      this->vVariableGroup = newVVariableGroup; 
    7576   } 
     77   CATCH 
    7678 
    7779   CVariableGroup* CField::getVirtualVariableGroup(void) const 
     80   TRY 
    7881   { 
    7982      return this->vVariableGroup; 
    8083   } 
     84   CATCH 
    8185 
    8286   std::vector<CVariable*> CField::getAllVariables(void) const 
     87   TRY 
    8388   { 
    8489      return this->vVariableGroup->getAllChildren(); 
    8590   } 
     91   CATCH 
    8692 
    8793   void CField::solveDescInheritance(bool apply, const CAttributeMap* const parent) 
     94   TRY 
    8895   { 
    8996      SuperClassAttribute::setAttributes(parent, apply); 
    9097      this->getVirtualVariableGroup()->solveDescInheritance(apply, NULL); 
    9198   } 
     99   CATCH_DUMP_ATTR 
    92100 
    93101  //---------------------------------------------------------------- 
    94102 
    95103  bool CField::dispatchEvent(CEventServer& event) 
     104  TRY 
    96105  { 
    97106    if (SuperClass::dispatchEvent(event)) return true; 
     
    131140    } 
    132141  } 
     142  CATCH 
    133143 
    134144  void CField::sendUpdateData(const CArray<double,1>& data) 
     145  TRY 
    135146  { 
    136147    CTimer::get("Field : send data").resume(); 
     
    189200    CTimer::get("Field : send data").suspend(); 
    190201  } 
     202  CATCH_DUMP_ATTR 
    191203 
    192204  void CField::recvUpdateData(CEventServer& event) 
     205  TRY 
    193206  { 
    194207    std::map<int,CBufferIn*> rankBuffers; 
     
    207220    CTimer::get("Field : recv data").suspend(); 
    208221  } 
     222  CATCH 
    209223 
    210224  void  CField::recvUpdateData(std::map<int,CBufferIn*>& rankBuffers) 
     225  TRY 
    211226  { 
    212227    CContext* context = CContext::getCurrent(); 
     
    249264    recvDataSrv.reset() ; 
    250265  } 
     266  CATCH_DUMP_ATTR 
    251267 
    252268  void CField::writeUpdateData(const CArray<double,1>& data) 
     269  TRY 
    253270  { 
    254271    CContext* context = CContext::getCurrent(); 
     
    277294    } 
    278295  } 
     296  CATCH_DUMP_ATTR 
    279297 
    280298  void CField::writeField(void) 
     299  TRY 
    281300  { 
    282301    if (!getRelFile()->isEmptyZone()) 
     
    290309    } 
    291310  } 
     311  CATCH_DUMP_ATTR 
    292312 
    293313  /* 
     
    299319  */ 
    300320  bool CField::sendReadDataRequest(const CDate& tsDataRequested) 
     321  TRY 
    301322  { 
    302323    CContext* context = CContext::getCurrent(); 
     
    330351    return !isEOF; 
    331352  } 
     353  CATCH_DUMP_ATTR 
    332354 
    333355  /*! 
     
    336358  */ 
    337359  bool CField::sendReadDataRequestIfNeeded(void) 
     360  TRY 
    338361  { 
    339362    const CDate& currentDate = CContext::getCurrent()->getCalendar()->getCurrentDate(); 
     
    353376    return dataRequested; 
    354377  } 
     378  CATCH_DUMP_ATTR 
    355379 
    356380  void CField::recvReadDataRequest(CEventServer& event) 
     381  TRY 
    357382  { 
    358383    CBufferIn* buffer = event.subEvents.begin()->buffer; 
     
    361386    get(fieldId)->recvReadDataRequest(); 
    362387  } 
     388  CATCH 
    363389 
    364390  /*! 
     
    369395  */ 
    370396  void CField::recvReadDataRequest(void) 
     397  TRY 
    371398  { 
    372399    CContext* context = CContext::getCurrent(); 
     
    449476    } 
    450477  } 
     478  CATCH_DUMP_ATTR 
    451479 
    452480  /*! 
     
    456484  */ 
    457485  CField::EReadField CField::readField(void) 
     486  TRY 
    458487  { 
    459488    CContext* context = CContext::getCurrent(); 
     
    508537    return readState; 
    509538  } 
     539  CATCH_DUMP_ATTR 
    510540 
    511541  /* 
     
    516546  */ 
    517547  void CField::recvReadDataReady(CEventServer& event) 
     548  TRY 
    518549  { 
    519550    string fieldId; 
     
    531562    get(fieldId)->recvReadDataReady(ranks, buffers); 
    532563  } 
     564  CATCH 
    533565 
    534566  /*! 
     
    538570  */ 
    539571  void CField::recvReadDataReady(vector<int> ranks, vector<CBufferIn*> buffers) 
     572  TRY 
    540573  { 
    541574    CContext* context = CContext::getCurrent(); 
     
    574607      serverSourceFilter->streamDataFromServer(lastDataReceivedFromServer, data); 
    575608  } 
     609  CATCH_DUMP_ATTR 
    576610 
    577611  void CField::checkForLateDataFromServer(void) 
     612  TRY 
    578613  { 
    579614    CContext* context = CContext::getCurrent(); 
     
    607642    } 
    608643  } 
     644  CATCH_DUMP_ATTR 
    609645 
    610646  void CField::checkIfMustAutoTrigger(void) 
     647  TRY 
    611648  { 
    612649    mustAutoTrigger = serverSourceFilter ? serverSourceFilter->mustAutoTrigger() : false; 
    613650  } 
     651  CATCH_DUMP_ATTR 
    614652 
    615653  void CField::autoTriggerIfNeeded(void) 
     654  TRY 
    616655  { 
    617656    if (mustAutoTrigger) 
    618657      serverSourceFilter->trigger(CContext::getCurrent()->getCalendar()->getCurrentDate()); 
    619658  } 
     659  CATCH_DUMP_ATTR 
    620660 
    621661   //---------------------------------------------------------------- 
    622662 
    623663   void CField::setRelFile(CFile* _file) 
     664   TRY 
    624665   { 
    625666      this->file = _file; 
    626667      hasOutputFile = true; 
    627668   } 
     669   CATCH_DUMP_ATTR 
    628670 
    629671   //---------------------------------------------------------------- 
     
    636678 
    637679   CGrid* CField::getRelGrid(void) const 
     680   TRY 
    638681   { 
    639682      return this->grid; 
    640683   } 
     684   CATCH 
    641685 
    642686   //---------------------------------------------------------------- 
    643687 
    644688   CFile* CField::getRelFile(void) const 
     689   TRY 
    645690   { 
    646691      return this->file; 
    647692   } 
     693   CATCH 
    648694 
    649695   int CField::getNStep(void) const 
     696   TRY 
    650697   { 
    651698      return this->nstep; 
    652699   } 
     700   CATCH 
    653701 
    654702   func::CFunctor::ETimeType CField::getOperationTimeType() const 
     703   TRY 
    655704   { 
    656705     return operationTimeType; 
    657706   } 
     707   CATCH 
    658708 
    659709   //---------------------------------------------------------------- 
    660710 
    661711   void CField::incrementNStep(void) 
     712   TRY 
    662713   { 
    663714      this->nstep++; 
    664715   } 
     716   CATCH_DUMP_ATTR 
    665717 
    666718   void CField::resetNStep(int nstep /*= 0*/) 
     719   TRY 
    667720   { 
    668721      this->nstep = nstep; 
    669722   } 
     723   CATCH_DUMP_ATTR 
    670724 
    671725   void CField::resetNStepMax(void) 
     726   TRY 
    672727   { 
    673728      this->nstepMax = 0; 
    674729      nstepMaxRead = false; 
    675730   } 
     731   CATCH_DUMP_ATTR 
    676732 
    677733   //---------------------------------------------------------------- 
    678734 
    679735   bool CField::isActive(bool atCurrentTimestep /*= false*/) const 
     736   TRY 
    680737   { 
    681738      if (clientSourceFilter) 
     
    689746      return false; 
    690747   } 
     748   CATCH 
    691749 
    692750   //---------------------------------------------------------------- 
    693751 
    694752   bool CField::wasWritten() const 
     753   TRY 
    695754   { 
    696755     return written; 
    697756   } 
     757   CATCH 
    698758 
    699759   void CField::setWritten() 
     760   TRY 
    700761   { 
    701762     written = true; 
    702763   } 
     764   CATCH_DUMP_ATTR 
    703765 
    704766   //---------------------------------------------------------------- 
    705767 
    706768   bool CField::getUseCompressedOutput() const 
     769   TRY 
    707770   { 
    708771     return useCompressedOutput; 
    709772   } 
     773   CATCH 
    710774 
    711775   void CField::setUseCompressedOutput() 
     776   TRY 
    712777   { 
    713778     useCompressedOutput = true; 
    714779   } 
     780   CATCH_DUMP_ATTR 
    715781 
    716782   //---------------------------------------------------------------- 
    717783 
    718784   std::shared_ptr<COutputPin> CField::getInstantDataFilter() 
     785   TRY 
    719786   { 
    720787     return instantDataFilter; 
    721788   } 
     789   CATCH_DUMP_ATTR 
    722790 
    723791   //---------------------------------------------------------------- 
     
    728796   */ 
    729797   void CField::buildGridTransformationGraph() 
     798   TRY 
    730799   { 
    731800     CContext* context = CContext::getCurrent(); 
     
    738807     } 
    739808   } 
     809   CATCH_DUMP_ATTR 
    740810 
    741811   /*! 
     
    743813   */ 
    744814   void CField::generateNewTransformationGridDest() 
     815   TRY 
    745816   { 
    746817     CContext* context = CContext::getCurrent(); 
     
    797868     } 
    798869   } 
     870   CATCH_DUMP_ATTR 
    799871 
    800872   void CField::updateRef(CGrid* grid) 
     873   TRY 
    801874   { 
    802875     if (!grid_ref.isEmpty()) grid_ref.setValue(grid->getId()); 
     
    820893     } 
    821894   } 
     895   CATCH_DUMP_ATTR 
    822896    
    823897   /*! 
     
    826900   */ 
    827901   void CField::solveAllEnabledFieldsAndTransform() 
     902   TRY 
    828903   { 
    829904     CContext* context = CContext::getCurrent(); 
     
    862937     } 
    863938   } 
     939   CATCH_DUMP_ATTR 
    864940 
    865941   void CField::checkGridOfEnabledFields() 
     942   TRY 
    866943   { 
    867944     if (!isGridChecked) 
     
    871948     } 
    872949   } 
     950   CATCH_DUMP_ATTR 
    873951 
    874952   void CField::sendGridComponentOfEnabledFields() 
     953   TRY 
    875954   { 
    876955      solveGridDomainAxisRef(true); 
    877956      // solveCheckMaskIndex(true); 
    878957   } 
     958   CATCH_DUMP_ATTR 
    879959 
    880960   void CField::sendGridOfEnabledFields() 
     961   TRY 
    881962   { 
    882963      // solveGridDomainAxisRef(true); 
    883964      solveCheckMaskIndex(true); 
    884965   }    
     966   CATCH_DUMP_ATTR 
    885967 
    886968   void CField::solveOnlyReferenceEnabledField(bool doSending2Server) 
     969   TRY 
    887970   { 
    888971     CContext* context = CContext::getCurrent(); 
     
    910993     } 
    911994   } 
    912       
     995   CATCH_DUMP_ATTR 
     996 
    913997   void CField::solveAllReferenceEnabledField(bool doSending2Server) 
     998   TRY 
    914999   { 
    9151000     CContext* context = CContext::getCurrent(); 
     
    9401025     solveCheckMaskIndex(doSending2Server); 
    9411026   } 
     1027   CATCH_DUMP_ATTR 
    9421028 
    9431029   std::map<int, StdSize> CField::getGridAttributesBufferSize(CContextClient* client, bool bufferForWriting /*= "false"*/) 
     1030   TRY 
    9441031   { 
    9451032     return grid->getAttributesBufferSize(client, bufferForWriting); 
    9461033   } 
     1034   CATCH_DUMP_ATTR 
    9471035 
    9481036   std::map<int, StdSize> CField::getGridDataBufferSize(CContextClient* client, bool bufferForWriting /*= "false"*/) 
     1037   TRY 
    9491038   { 
    9501039     return grid->getDataBufferSize(client, getId(), bufferForWriting); 
    9511040   } 
     1041   CATCH_DUMP_ATTR 
    9521042 
    9531043   size_t CField::getGlobalWrittenSize() 
     1044   TRY 
    9541045   { 
    9551046     return grid->getGlobalWrittenSize(); 
    9561047   } 
     1048   CATCH_DUMP_ATTR 
    9571049 
    9581050   //---------------------------------------------------------------- 
    9591051 
    9601052   void CField::solveServerOperation(void) 
     1053   TRY 
    9611054   { 
    9621055      CContext* context = CContext::getCurrent(); 
     
    10011094      operationTimeType = functor->timeType(); 
    10021095   } 
     1096   CATCH_DUMP_ATTR 
    10031097 
    10041098   //---------------------------------------------------------------- 
     
    10131107    */ 
    10141108   void CField::buildFilterGraph(CGarbageCollector& gc, bool enableOutput) 
     1109   TRY 
    10151110   {      
    10161111    if (!isReferenceSolvedAndTransformed) solveAllEnabledFieldsAndTransform(); 
     
    11181213     } 
    11191214   } 
     1215   CATCH_DUMP_ATTR 
    11201216 
    11211217   /*! 
     
    11271223    */ 
    11281224   std::shared_ptr<COutputPin> CField::getFieldReference(CGarbageCollector& gc) 
     1225   TRY 
    11291226   { 
    11301227     if (instantDataFilter || field_ref.isEmpty()) 
     
    11501247     return filters.second; 
    11511248   } 
     1249   CATCH_DUMP_ATTR 
    11521250 
    11531251   /*! 
     
    11611259    */ 
    11621260   std::shared_ptr<COutputPin> CField::getSelfReference(CGarbageCollector& gc) 
     1261   TRY 
    11631262   { 
    11641263     if (instantDataFilter || !hasExpression()) 
     
    12031302     return selfReferenceFilter; 
    12041303   } 
     1304   CATCH_DUMP_ATTR 
    12051305 
    12061306   /*! 
     
    12141314    */ 
    12151315   std::shared_ptr<COutputPin> CField::getTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq) 
     1316   TRY 
    12161317   { 
    12171318     std::map<CDuration, std::shared_ptr<COutputPin> >::iterator it = temporalDataFilters.find(outFreq); 
     
    12371338     return it->second; 
    12381339   } 
     1340   CATCH_DUMP_ATTR 
    12391341 
    12401342  /*! 
     
    12481350    
    12491351   std::shared_ptr<COutputPin> CField::getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq) 
     1352   TRY 
    12501353   { 
    12511354     if (instantDataFilter || !hasExpression()) 
     
    12781381     } 
    12791382  } 
     1383   CATCH_DUMP_ATTR 
    12801384 
    12811385   //---------------------------------------------------------------- 
     
    12961400 
    12971401   void CField::solveGridReference(void) 
     1402   TRY 
    12981403   { 
    12991404      if (grid_ref.isEmpty() && domain_ref.isEmpty() && axis_ref.isEmpty() && scalar_ref.isEmpty()) 
     
    13791484      } 
    13801485   } 
     1486   CATCH_DUMP_ATTR 
    13811487 
    13821488   void CField::solveGridDomainAxisRef(bool checkAtt) 
     1489   TRY 
    13831490   { 
    13841491     grid->solveDomainAxisRef(checkAtt); 
    13851492   } 
     1493   CATCH_DUMP_ATTR 
    13861494 
    13871495   void CField::solveCheckMaskIndex(bool doSendingIndex) 
     1496   TRY 
    13881497   { 
    13891498     grid->checkMaskIndex(doSendingIndex); 
    13901499   } 
     1500   CATCH_DUMP_ATTR 
    13911501 
    13921502   void CField::solveTransformedGrid() 
     1503   TRY 
    13931504   { 
    13941505     if (grid && !grid->isTransformed() && hasDirectFieldReference() && grid != getDirectFieldReference()->grid) 
     
    14391550     } 
    14401551   } 
     1552   CATCH_DUMP_ATTR 
    14411553 
    14421554   void CField::solveGenerateGrid() 
     1555   TRY 
    14431556   { 
    14441557     if (grid && !grid->isTransformed() && hasDirectFieldReference() && grid != getDirectFieldReference()->grid) 
     
    14471560       grid->completeGrid(); 
    14481561   } 
     1562   CATCH_DUMP_ATTR 
    14491563 
    14501564   void CField::solveGridDomainAxisBaseRef() 
     1565   TRY 
    14511566   { 
    14521567     grid->solveDomainAxisRef(false); 
    14531568     grid->solveDomainAxisBaseRef(); 
    14541569   } 
     1570   CATCH_DUMP_ATTR 
    14551571 
    14561572   ///------------------------------------------------------------------- 
     
    14581574   template <> 
    14591575   void CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void) 
     1576   TRY 
    14601577   { 
    14611578      if (this->group_ref.isEmpty()) return; 
     
    14811598      } 
    14821599   } 
     1600   CATCH_DUMP_ATTR 
    14831601 
    14841602   void CField::scaleFactorAddOffset(double scaleFactor, double addOffset) 
     1603   TRY 
    14851604   { 
    14861605     recvDataSrv = (recvDataSrv - addOffset) / scaleFactor; 
    14871606   } 
     1607   CATCH_DUMP_ATTR 
    14881608 
    14891609   void CField::invertScaleFactorAddOffset(double scaleFactor, double addOffset) 
     1610   TRY 
    14901611   { 
    14911612     recvDataSrv = recvDataSrv * scaleFactor + addOffset; 
    14921613   } 
     1614   CATCH_DUMP_ATTR 
    14931615 
    14941616   void CField::outputField(CArray<double,1>& fieldOut) 
     1617   TRY 
    14951618   {  
    14961619      CArray<size_t,1>& outIndexClient = grid->localIndexToWriteOnClient; 
     
    15011624      } 
    15021625   } 
     1626   CATCH_DUMP_ATTR 
    15031627 
    15041628   void CField::inputField(CArray<double,1>& fieldIn) 
     1629   TRY 
    15051630   { 
    15061631      CArray<size_t,1>& outIndexClient = grid->localIndexToWriteOnClient; 
     
    15101635        recvDataSrv(outIndexClient(idx)) = fieldIn(outIndexServer(idx)); 
    15111636      } 
    1512  
    1513    } 
     1637   } 
     1638   CATCH_DUMP_ATTR 
    15141639 
    15151640   void CField::outputCompressedField(CArray<double,1>& fieldOut) 
     1641   TRY 
    15161642   { 
    15171643      CArray<size_t,1>& outIndexClient = grid->localIndexToWriteOnClient; 
     
    15221648      } 
    15231649   } 
     1650   CATCH_DUMP_ATTR 
    15241651 
    15251652   ///------------------------------------------------------------------- 
    15261653 
    15271654   void CField::parse(xml::CXMLNode& node) 
     1655   TRY 
    15281656   { 
    15291657      string newContent ; 
     
    15401668      if (node.getContent(newContent)) content=newContent ; 
    15411669    } 
     1670   CATCH_DUMP_ATTR 
    15421671 
    15431672   /*! 
     
    15471676   */ 
    15481677   const std::vector<StdString>& CField::getRefDomainAxisIds() 
     1678   TRY 
    15491679   { 
    15501680     CGrid* cgPtr = getRelGrid(); 
     
    15751705     return (domAxisScalarIds_); 
    15761706   } 
     1707   CATCH_DUMP_ATTR 
    15771708 
    15781709   CVariable* CField::addVariable(const string& id) 
     1710   TRY 
    15791711   { 
    15801712     return vVariableGroup->createChild(id); 
    15811713   } 
     1714   CATCH 
    15821715 
    15831716   CVariableGroup* CField::addVariableGroup(const string& id) 
     1717   TRY 
    15841718   { 
    15851719     return vVariableGroup->createChildGroup(id); 
    15861720   } 
     1721   CATCH 
    15871722 
    15881723   void CField::setContextClient(CContextClient* contextClient) 
     1724   TRY 
    15891725   { 
    15901726     CContext* context = CContext::getCurrent(); 
     
    16021738     } 
    16031739   } 
     1740   CATCH_DUMP_ATTR 
    16041741 
    16051742   CContextClient* CField::getContextClient() 
     1743   TRY 
    16061744   { 
    16071745     return client; 
    16081746   } 
     1747   CATCH 
    16091748 
    16101749   void CField::sendAddAllVariables(CContextClient* client) 
     1750   TRY 
    16111751   { 
    16121752     std::vector<CVariable*> allVar = getAllVariables(); 
     
    16211761     } 
    16221762   } 
    1623  
     1763   CATCH_DUMP_ATTR 
    16241764 
    16251765   /*! 
     
    16291769     
    16301770   void CField::sendAllAttributesToServer(CContextClient* client) 
     1771   TRY 
    16311772   { 
    16321773     if (grid_ref.isEmpty()) 
     
    16381779     else SuperClass::sendAllAttributesToServer(client) ; 
    16391780   } 
     1781   CATCH_DUMP_ATTR 
    16401782     
    16411783   void CField::sendAddVariable(const string& id, CContextClient* client) 
     1784   TRY 
    16421785   { 
    16431786      sendAddItem(id, (int)EVENT_ID_ADD_VARIABLE, client); 
    16441787   } 
     1788   CATCH_DUMP_ATTR 
    16451789 
    16461790   void CField::sendAddVariableGroup(const string& id, CContextClient* client) 
     1791   TRY 
    16471792   { 
    16481793      sendAddItem(id, (int)EVENT_ID_ADD_VARIABLE_GROUP, client); 
    16491794   } 
     1795   CATCH_DUMP_ATTR 
    16501796 
    16511797   void CField::recvAddVariable(CEventServer& event) 
     1798   TRY 
    16521799   { 
    16531800 
     
    16571804      get(id)->recvAddVariable(*buffer); 
    16581805   } 
     1806   CATCH 
    16591807 
    16601808   void CField::recvAddVariable(CBufferIn& buffer) 
     1809   TRY 
    16611810   { 
    16621811      string id; 
     
    16641813      addVariable(id); 
    16651814   } 
     1815   CATCH_DUMP_ATTR 
    16661816 
    16671817   void CField::recvAddVariableGroup(CEventServer& event) 
     1818   TRY 
    16681819   { 
    16691820 
     
    16731824      get(id)->recvAddVariableGroup(*buffer); 
    16741825   } 
     1826   CATCH 
    16751827 
    16761828   void CField::recvAddVariableGroup(CBufferIn& buffer) 
     1829   TRY 
    16771830   { 
    16781831      string id; 
     
    16801833      addVariableGroup(id); 
    16811834   } 
     1835   CATCH_DUMP_ATTR 
    16821836 
    16831837   /*! 
     
    16851839    */ 
    16861840   void CField::checkTimeAttributes(CDuration* freqOp) 
     1841   TRY 
    16871842   { 
    16881843     bool isFieldRead  = file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read; 
     
    17061861       freq_offset.setValue(isFieldRead ? NoneDu : (freq_op.getValue() - TimeStep)); 
    17071862   } 
     1863   CATCH_DUMP_ATTR 
    17081864 
    17091865   /*! 
     
    17121868    */ 
    17131869   const string& CField::getExpression(void) 
     1870   TRY 
    17141871   { 
    17151872     if (!expr.isEmpty() && content.empty()) 
     
    17211878     return content; 
    17221879   } 
     1880   CATCH_DUMP_ATTR 
    17231881 
    17241882   bool CField::hasExpression(void) const 
     1883   TRY 
    17251884   { 
    17261885     return (!expr.isEmpty() || !content.empty()); 
    17271886   } 
     1887   CATCH 
    17281888 
    17291889   bool CField::hasGridMask(void) const 
     1890   TRY 
    17301891   { 
    17311892     return (this->grid->hasMask()); 
    17321893   } 
     1894   CATCH 
    17331895 
    17341896   DEFINE_REF_FUNC(Field,field) 
  • XIOS/dev/dev_olga/src/node/file.cpp

    r1542 r1612  
    5353 
    5454   const StdString CFile::getFileOutputName(void) const 
     55   TRY 
    5556   { 
    5657     return (name.isEmpty() ? getId() : name) + (name_suffix.isEmpty() ? StdString("") :  name_suffix.getValue()); 
    5758   } 
     59   CATCH 
    5860 
    5961   //---------------------------------------------------------------- 
     
    6567   */ 
    6668   std::shared_ptr<CDataOutput> CFile::getDataOutput(void) const 
     69   TRY 
    6770   { 
    6871      return data_out; 
    6972   } 
     73   CATCH 
    7074 
    7175   /*! 
     
    7680   */ 
    7781   std::shared_ptr<CDataInput> CFile::getDataInput(void) const 
     82   TRY 
    7883   { 
    7984      return data_in; 
    8085   } 
     86   CATCH 
    8187 
    8288   /*! 
     
    8894   */ 
    8995   CFieldGroup* CFile::getVirtualFieldGroup(void) const 
     96   TRY 
    9097   { 
    9198      return (this->vFieldGroup); 
    9299   } 
     100   CATCH 
    93101 
    94102   /*! 
     
    100108   */ 
    101109   CVariableGroup* CFile::getVirtualVariableGroup(void) const 
     110   TRY 
    102111   { 
    103112      return (this->vVariableGroup); 
    104113   } 
     114   CATCH 
    105115 
    106116   //! Get all fields of a file 
    107117   std::vector<CField*> CFile::getAllFields(void) const 
     118   TRY 
    108119   { 
    109120      return (this->vFieldGroup->getAllChildren()); 
    110121   } 
     122   CATCH 
    111123 
    112124   //! Get all variables of a file 
    113125   std::vector<CVariable*> CFile::getAllVariables(void) const 
     126   TRY 
    114127   { 
    115128      return (this->vVariableGroup->getAllChildren()); 
    116129   } 
     130   CATCH 
    117131 
    118132   //---------------------------------------------------------------- 
     
    129143                                                int default_level, 
    130144                                                bool default_enabled) 
     145   TRY 
    131146   { 
    132147      if (!this->enabledFields.empty()) 
     
    145160         { 
    146161            if (! (*it)->enabled.getValue()) continue; 
    147 //            { it--; this->enabledFields.erase(it+1); continue; } 
    148162         } 
    149163         else // Si l'attribut 'enabled' n'est pas dfini ... 
    150164         { 
    151165            if (!default_enabled) continue; 
    152 //            { it--; this->enabledFields.erase(it+1); continue; } 
    153166         } 
    154167 
     
    156169         { 
    157170            if ((*it)->level.getValue() > _outputlevel) continue; 
    158 //            { it--; this->enabledFields.erase(it+1); continue; } 
    159171         } 
    160172         else // Si l'attribut 'level' n'est pas dfini ... 
    161173         { 
    162174            if (default_level > _outputlevel) continue; 
    163 //            { it--; this->enabledFields.erase(it+1); continue; } 
    164175         } 
    165176 
    166 //         CField* field_tmp=(*it).get(); 
    167 //         shared_ptr<CField> sptfield=*it; 
    168 //         field_tmp->refObject.push_back(sptfield); 
    169177         newEnabledFields.push_back(*it); 
    170          // Le champ est finalement actif, on y ajoute sa propre reference. 
    171 //         (*it)->refObject.push_back(*it); 
    172178         // Le champ est finalement actif, on y ajoute la rfrence au champ de base. 
    173179         (*it)->setRelFile(CFile::get(this)); 
     
    177183      return (this->enabledFields); 
    178184   } 
     185   CATCH_DUMP_ATTR 
    179186 
    180187   //---------------------------------------------------------------- 
    181188   //! Change virtual field group to a new one 
    182189   void CFile::setVirtualFieldGroup(CFieldGroup* newVFieldGroup) 
     190   TRY 
    183191   { 
    184192      this->vFieldGroup = newVFieldGroup; 
    185193   } 
     194   CATCH_DUMP_ATTR 
    186195 
    187196   //! Change virtual variable group to new one 
    188197   void CFile::setVirtualVariableGroup(CVariableGroup* newVVariableGroup) 
     198   TRY 
    189199   { 
    190200      this->vVariableGroup = newVVariableGroup; 
    191201   } 
     202   CATCH_DUMP_ATTR 
    192203 
    193204   //---------------------------------------------------------------- 
    194205   bool CFile::isSyncTime(void) 
     206   TRY 
    195207   { 
    196208     CContext* context = CContext::getCurrent(); 
     
    206218      return false; 
    207219    } 
     220    CATCH_DUMP_ATTR 
    208221 
    209222   //! Initialize a file in order to write into it 
    210223   void CFile::initWrite(void) 
     224   TRY 
    211225   { 
    212226      CContext* context = CContext::getCurrent(); 
     
    261275      if (time_counter_name.isEmpty()) time_counter_name = "time_counter"; 
    262276    } 
     277    CATCH_DUMP_ATTR 
    263278 
    264279    //! Initialize a file in order to write into it 
    265280    void CFile::initRead(void) 
     281    TRY 
    266282    { 
    267283      if (checkRead) return; 
     
    269285      checkRead = true; 
    270286    } 
     287    CATCH_DUMP_ATTR 
    271288 
    272289    /*! 
     
    274291    */ 
    275292    void CFile::createSubComFile() 
     293    TRY 
    276294    { 
    277295      CContext* context = CContext::getCurrent(); 
     
    292310      if (allZoneEmpty) MPI_Comm_free(&fileComm); 
    293311    } 
     312    CATCH_DUMP_ATTR 
    294313 
    295314    /* 
     
    299318    */ 
    300319    void CFile::checkWriteFile(void) 
     320    TRY 
    301321    { 
    302322      CContext* context = CContext::getCurrent(); 
     
    315335      } 
    316336    } 
     337    CATCH_DUMP_ATTR 
    317338 
    318339    /* 
     
    323344    */ 
    324345    void CFile::checkReadFile(void) 
     346    TRY 
    325347    { 
    326348      CContext* context = CContext::getCurrent(); 
     
    340362      } 
    341363    } 
     364    CATCH_DUMP_ATTR 
    342365 
    343366    /*! 
     
    346369    */ 
    347370    bool CFile::isEmptyZone() 
     371    TRY 
    348372    { 
    349373      return allZoneEmpty; 
    350374    } 
     375    CATCH_DUMP_ATTR 
    351376 
    352377    /*! 
     
    357382    */ 
    358383   bool CFile::checkSync(void) 
     384   TRY 
    359385   { 
    360386     CContext* context = CContext::getCurrent(); 
     
    371397      return false; 
    372398    } 
     399   CATCH_DUMP_ATTR 
    373400 
    374401    /*! 
     
    379406    */ 
    380407    bool CFile::checkSplit(void) 
     408    TRY 
    381409    { 
    382410      CContext* context = CContext::getCurrent(); 
     
    402430      return false; 
    403431    } 
     432    CATCH_DUMP_ATTR 
    404433 
    405434   /*! 
     
    408437   */ 
    409438   void CFile::createHeader(void) 
     439   TRY 
    410440   { 
    411441      CContext* context = CContext::getCurrent(); 
     
    594624      } 
    595625   } 
     626   CATCH_DUMP_ATTR 
    596627 
    597628  /*! 
     
    599630  */ 
    600631  void CFile::openInReadMode() 
     632  TRY 
    601633  { 
    602634    CContext* context = CContext::getCurrent(); 
     
    675707    } 
    676708  } 
     709  CATCH_DUMP_ATTR 
    677710 
    678711   //! Close file 
    679712   void CFile::close(void) 
     713   TRY 
    680714   { 
    681715     if (!allZoneEmpty) 
     
    690724      if (fileComm != MPI_COMM_NULL) MPI_Comm_free(&fileComm); 
    691725   } 
     726   CATCH_DUMP_ATTR 
     727 
    692728   //---------------------------------------------------------------- 
    693729 
    694730   void CFile::readAttributesOfEnabledFieldsInReadMode() 
     731   TRY 
    695732   { 
    696733     if (enabledFields.empty()) return; 
     
    722759     close(); 
    723760   } 
    724  
     761   CATCH_DUMP_ATTR 
    725762 
    726763   /*! 
     
    729766   */ 
    730767   void CFile::parse(xml::CXMLNode & node) 
     768   TRY 
    731769   { 
    732770      SuperClass::parse(node); 
     
    741779        node.goToParentElement(); 
    742780      } 
    743  
    744    } 
     781   } 
     782   CATCH_DUMP_ATTR 
     783 
    745784   //---------------------------------------------------------------- 
    746785 
     
    750789   */ 
    751790   StdString CFile::toString(void) const 
     791   TRY 
    752792   { 
    753793      StdOStringStream oss; 
     
    762802      return (oss.str()); 
    763803   } 
     804   CATCH 
    764805 
    765806   //---------------------------------------------------------------- 
     
    772813   */ 
    773814   void CFile::solveDescInheritance(bool apply, const CAttributeMap * const parent) 
     815   TRY 
    774816   { 
    775817      SuperClassAttribute::setAttributes(parent,apply); 
     
    777819      this->getVirtualVariableGroup()->solveDescInheritance(apply, NULL); 
    778820   } 
     821   CATCH_DUMP_ATTR 
    779822 
    780823   //---------------------------------------------------------------- 
     
    789832   */ 
    790833   void CFile::solveOnlyRefOfEnabledFields(bool sendToServer) 
     834   TRY 
    791835   { 
    792836     int size = this->enabledFields.size(); 
     
    796840     } 
    797841   } 
     842   CATCH_DUMP_ATTR 
    798843 
    799844   void CFile::checkGridOfEnabledFields() 
     845   TRY 
    800846   {  
    801847     int size = this->enabledFields.size(); 
     
    805851     } 
    806852   } 
     853   CATCH_DUMP_ATTR 
    807854 
    808855   void CFile::sendGridComponentOfEnabledFields() 
     856   TRY 
    809857   {  
    810858     int size = this->enabledFields.size(); 
     
    814862     } 
    815863   } 
     864   CATCH_DUMP_ATTR 
    816865 
    817866   /*! 
     
    820869   */ 
    821870   void CFile::sortEnabledFieldsForUgrid() 
     871   TRY 
    822872   { 
    823873     int size = this->enabledFields.size(); 
     
    868918     } 
    869919   } 
     920   CATCH_DUMP_ATTR 
    870921 
    871922   void CFile::sendGridOfEnabledFields() 
     923   TRY 
    872924   {  
    873925     int size = this->enabledFields.size(); 
     
    877929     } 
    878930   } 
     931   CATCH_DUMP_ATTR 
    879932 
    880933   void CFile::generateNewTransformationGridDest() 
     934   TRY 
    881935   { 
    882936     int size = this->enabledFields.size(); 
     
    886940     } 
    887941   } 
     942   CATCH_DUMP_ATTR 
    888943 
    889944   /*! 
     
    896951   */ 
    897952   void CFile::solveAllRefOfEnabledFieldsAndTransform(bool sendToServer) 
     953   TRY 
    898954   { 
    899955     int size = this->enabledFields.size(); 
     
    903959     } 
    904960   } 
     961   CATCH_DUMP_ATTR 
    905962 
    906963   /*! 
     
    910967    */ 
    911968   void CFile::buildFilterGraphOfEnabledFields(CGarbageCollector& gc) 
     969   TRY 
    912970   { 
    913971     int size = this->enabledFields.size(); 
     
    917975     } 
    918976   } 
     977   CATCH_DUMP_ATTR 
    919978 
    920979   /*! 
     
    922981    */ 
    923982   void CFile::postProcessFilterGraph() 
     983   TRY 
    924984   { 
    925985     int size = this->enabledFields.size(); 
     
    929989     } 
    930990   } 
     991   CATCH_DUMP_ATTR 
    931992 
    932993   /*! 
     
    934995   */ 
    935996   void CFile::prefetchEnabledReadModeFields(void) 
     997   TRY 
    936998   { 
    937999     if (mode.isEmpty() || mode.getValue() != mode_attr::read) 
     
    9421004       this->enabledFields[i]->sendReadDataRequest(CContext::getCurrent()->getCalendar()->getCurrentDate()); 
    9431005   } 
     1006   CATCH_DUMP_ATTR 
    9441007 
    9451008   /*! 
     
    9491012   */ 
    9501013   void CFile::doPreTimestepOperationsForEnabledReadModeFields(void) 
     1014   TRY 
    9511015   { 
    9521016     if (mode.isEmpty() || mode.getValue() != mode_attr::read) 
     
    9601024     } 
    9611025   } 
     1026   CATCH_DUMP_ATTR 
    9621027 
    9631028   /*! 
     
    9661031   */ 
    9671032   void CFile::doPostTimestepOperationsForEnabledReadModeFields(void) 
     1033   TRY 
    9681034   { 
    9691035     if (mode.isEmpty() || mode.getValue() != mode_attr::read) 
     
    9761042     } 
    9771043   } 
     1044   CATCH_DUMP_ATTR 
    9781045 
    9791046   void CFile::solveFieldRefInheritance(bool apply) 
     1047   TRY 
    9801048   { 
    9811049      // Rsolution des hritages par rfrence de chacun des champs contenus dans le fichier. 
     
    9841052         allF[i]->solveRefInheritance(apply); 
    9851053   } 
     1054   CATCH_DUMP_ATTR 
    9861055 
    9871056   //---------------------------------------------------------------- 
     
    9961065   */ 
    9971066   CField* CFile::addField(const string& id) 
     1067   TRY 
    9981068   { 
    9991069     return vFieldGroup->createChild(id); 
    10001070   } 
     1071   CATCH_DUMP_ATTR 
    10011072 
    10021073   /*! 
     
    10081079   */ 
    10091080   CFieldGroup* CFile::addFieldGroup(const string& id) 
     1081   TRY 
    10101082   { 
    10111083     return vFieldGroup->createChildGroup(id); 
    10121084   } 
     1085   CATCH_DUMP_ATTR 
    10131086 
    10141087   /*! 
     
    10231096   */ 
    10241097   CVariable* CFile::addVariable(const string& id) 
     1098   TRY 
    10251099   { 
    10261100     return vVariableGroup->createChild(id); 
    10271101   } 
     1102   CATCH_DUMP_ATTR 
    10281103 
    10291104   /*! 
     
    10351110   */ 
    10361111   CVariableGroup* CFile::addVariableGroup(const string& id) 
     1112   TRY 
    10371113   { 
    10381114     return vVariableGroup->createChildGroup(id); 
    10391115   } 
     1116   CATCH_DUMP_ATTR 
    10401117 
    10411118   void CFile::setContextClient(CContextClient* newContextClient) 
     1119   TRY 
    10421120   { 
    10431121     client = newContextClient; 
     
    10481126     } 
    10491127   } 
     1128   CATCH_DUMP_ATTR 
    10501129 
    10511130   CContextClient* CFile::getContextClient() 
     1131   TRY 
    10521132   { 
    10531133     return client; 
    10541134   } 
     1135   CATCH_DUMP_ATTR 
    10551136 
    10561137   void CFile::setReadContextClient(CContextClient* readContextclient) 
     1138   TRY 
    10571139   { 
    10581140     read_client = readContextclient; 
    10591141   } 
     1142   CATCH_DUMP_ATTR 
    10601143 
    10611144   CContextClient* CFile::getReadContextClient() 
     1145   TRY 
    10621146   { 
    10631147     return read_client; 
    10641148   } 
     1149   CATCH_DUMP_ATTR 
    10651150 
    10661151   /*! 
     
    10691154   */ 
    10701155   void CFile::sendAddField(const string& id, CContextClient* client) 
     1156   TRY 
    10711157   { 
    10721158      sendAddItem(id, EVENT_ID_ADD_FIELD, client); 
    10731159   } 
     1160   CATCH_DUMP_ATTR 
    10741161 
    10751162   /*! 
     
    10781165   */ 
    10791166   void CFile::sendAddFieldGroup(const string& id, CContextClient* client) 
     1167   TRY 
    10801168   { 
    10811169      sendAddItem(id, (int)EVENT_ID_ADD_FIELD_GROUP, client); 
    10821170   } 
     1171   CATCH_DUMP_ATTR 
    10831172 
    10841173   /*! 
     
    10871176   */ 
    10881177   void CFile::recvAddField(CEventServer& event) 
     1178   TRY 
    10891179   { 
    10901180 
     
    10941184      get(id)->recvAddField(*buffer); 
    10951185   } 
     1186   CATCH 
    10961187 
    10971188   /*! 
     
    11001191   */ 
    11011192   void CFile::recvAddField(CBufferIn& buffer) 
     1193   TRY 
    11021194   { 
    11031195      string id; 
     
    11051197      addField(id); 
    11061198   } 
     1199   CATCH_DUMP_ATTR 
    11071200 
    11081201   /*! 
     
    11111204   */ 
    11121205   void CFile::recvAddFieldGroup(CEventServer& event) 
     1206   TRY 
    11131207   { 
    11141208 
     
    11181212      get(id)->recvAddFieldGroup(*buffer); 
    11191213   } 
     1214   CATCH 
    11201215 
    11211216   /*! 
     
    11241219   */ 
    11251220   void CFile::recvAddFieldGroup(CBufferIn& buffer) 
     1221   TRY 
    11261222   { 
    11271223      string id; 
     
    11291225      addFieldGroup(id); 
    11301226   } 
     1227   CATCH_DUMP_ATTR 
    11311228 
    11321229   /*! 
     
    11371234   */ 
    11381235   void CFile::sendAddAllVariables(CContextClient* client) 
     1236   TRY 
    11391237   { 
    11401238     std::vector<CVariable*> allVar = getAllVariables(); 
     
    11491247     } 
    11501248   } 
     1249   CATCH_DUMP_ATTR 
    11511250 
    11521251   /*! 
     
    11561255   */ 
    11571256   void CFile::sendAddVariableGroup(const string& id, CContextClient* client) 
     1257   TRY 
    11581258   { 
    11591259      sendAddItem(id, (int)EVENT_ID_ADD_VARIABLE_GROUP, client); 
    11601260   } 
     1261   CATCH_DUMP_ATTR 
    11611262 
    11621263   /* 
     
    11661267   */ 
    11671268   void CFile::sendAddVariable(const string& id, CContextClient* client) 
     1269   TRY 
    11681270   { 
    11691271      sendAddItem(id, (int)EVENT_ID_ADD_VARIABLE, client); 
    11701272   } 
     1273   CATCH_DUMP_ATTR 
    11711274 
    11721275   /*! 
     
    11751278   */ 
    11761279   void CFile::recvAddVariable(CEventServer& event) 
    1177    { 
    1178  
     1280   TRY 
     1281   { 
    11791282      CBufferIn* buffer = event.subEvents.begin()->buffer; 
    11801283      string id; 
     
    11821285      get(id)->recvAddVariable(*buffer); 
    11831286   } 
     1287   CATCH 
    11841288 
    11851289   /*! 
     
    11881292   */ 
    11891293   void CFile::recvAddVariable(CBufferIn& buffer) 
     1294   TRY 
    11901295   { 
    11911296      string id; 
     
    11931298      addVariable(id); 
    11941299   } 
     1300   CATCH_DUMP_ATTR 
    11951301 
    11961302   /*! 
     
    11991305   */ 
    12001306   void CFile::recvAddVariableGroup(CEventServer& event) 
     1307   TRY 
    12011308   { 
    12021309 
     
    12061313      get(id)->recvAddVariableGroup(*buffer); 
    12071314   } 
     1315   CATCH 
    12081316 
    12091317   /*! 
     
    12121320   */ 
    12131321   void CFile::recvAddVariableGroup(CBufferIn& buffer) 
     1322   TRY 
    12141323   { 
    12151324      string id; 
     
    12171326      addVariableGroup(id); 
    12181327   } 
     1328   CATCH_DUMP_ATTR 
    12191329 
    12201330   /*! 
     
    12261336   */ 
    12271337   void CFile::sendEnabledFields(CContextClient* client) 
     1338   TRY 
    12281339   { 
    12291340     size_t size = this->enabledFields.size(); 
     
    12371348     } 
    12381349   } 
    1239  
     1350   CATCH_DUMP_ATTR 
    12401351 
    12411352   /*! 
     
    12471358   */ 
    12481359   bool CFile::dispatchEvent(CEventServer& event) 
     1360   TRY 
    12491361   { 
    12501362      if (SuperClass::dispatchEvent(event)) return true; 
     
    12781390      } 
    12791391   } 
    1280  
    1281  
    1282  
     1392   CATCH 
     1393 
     1394   ///-------------------------------------------------------------- 
     1395   /*! 
     1396   */ 
     1397   StdString CFile::dumpClassAttributes(void) 
     1398   { 
     1399     StdString str; 
     1400     CContext* context = CContext::getCurrent(); 
     1401     str.append("context=\""); 
     1402     str.append(context->getId()); 
     1403     str.append("\""); 
     1404     str.append(" enabled fields=\""); 
     1405     int size = this->enabledFields.size(); 
     1406     for (int i = 0; i < size; ++i) 
     1407     { 
     1408       str.append(this->enabledFields[i]->getId()); 
     1409       str.append(" "); 
     1410     } 
     1411     str.append("\""); 
     1412     return str; 
     1413   } 
    12831414 
    12841415   ///--------------------------------------------------------------- 
  • XIOS/dev/dev_olga/src/node/file.hpp

    r1542 r1612  
    8181                                                int default_level = 1, 
    8282                                                bool default_enabled = true); 
     83 
     84         StdString dumpClassAttributes(void); 
    8385 
    8486      public : 
  • XIOS/dev/dev_olga/src/node/grid.cpp

    r1594 r1612  
    8282 
    8383   StdSize CGrid::getDimension(void) 
     84   TRY 
    8485   { 
    8586      return getGlobalDimension().size(); 
    8687   } 
     88   CATCH_DUMP_ATTR 
    8789 
    8890   //--------------------------------------------------------------- 
    8991 
    9092   StdSize CGrid::getDataSize(void) const 
     93   TRY 
    9194   { 
    9295     StdSize retvalue = 1; 
     
    98101     return retvalue; 
    99102   } 
     103   CATCH 
    100104 
    101105   /*! 
     
    106110    */ 
    107111   std::map<int, StdSize> CGrid::getAttributesBufferSize(CContextClient* client, bool bufferForWriting) 
     112   TRY 
    108113   { 
    109114     std::map<int, StdSize> attributesSizes = getMinimumBufferSizeForAttributes(client); 
     
    147152     return attributesSizes; 
    148153  } 
     154   CATCH_DUMP_ATTR 
    149155 
    150156   /*! 
     
    156162    */ 
    157163   std::map<int, StdSize> CGrid::getDataBufferSize(CContextClient* client, const std::string& id /*= ""*/, bool bufferForWriting /*= "false"*/) 
     164   TRY 
    158165   {      
    159166     // The record index is sometimes sent along with the data but we always 
     
    180187     return dataSizes; 
    181188   } 
     189   CATCH_DUMP_ATTR 
    182190 
    183191   size_t CGrid::getGlobalWrittenSize(void) 
     192   TRY 
    184193   { 
    185194         std::vector<CDomain*> domainP = this->getDomains(); 
     
    191200     return globalGridSize ; 
    192201   } 
    193     
     202   CATCH_DUMP_ATTR 
    194203    
    195204   void CGrid::checkAttributesAfterTransformation() 
     205   TRY 
    196206   { 
    197207      setAxisList(); 
     
    228238      } 
    229239   } 
     240   CATCH_DUMP_ATTR 
    230241 
    231242   //--------------------------------------------------------------- 
     
    237248    */ 
    238249   bool CGrid::isCompressible(void) const 
     250   TRY 
    239251   { 
    240252      return isCompressible_; 
    241253   } 
     254   CATCH 
    242255 
    243256   //--------------------------------------------------------------- 
    244257 
    245258   void CGrid::addRelFileCompressed(const StdString& filename) 
     259   TRY 
    246260   { 
    247261      this->relFilesCompressed.insert(filename); 
    248262   } 
     263   CATCH_DUMP_ATTR 
    249264 
    250265   bool CGrid::isWrittenCompressed(const StdString& filename) const 
     266   TRY 
    251267   { 
    252268      return (this->relFilesCompressed.find(filename) != this->relFilesCompressed.end()); 
    253269   } 
     270   CATCH 
    254271 
    255272   //--------------------------------------------------------------- 
     
    258275   */ 
    259276   void CGrid::solveDomainAxisRef(bool areAttributesChecked) 
     277   TRY 
    260278   { 
    261279     if (this->isDomainAxisChecked) return; 
     
    266284     this->isDomainAxisChecked = areAttributesChecked; 
    267285   } 
     286   CATCH_DUMP_ATTR 
    268287 
    269288   /* 
     
    272291   */ 
    273292   void CGrid::solveDomainAxisBaseRef() 
     293   TRY 
    274294   { 
    275295     if (this->hasDomainAxisBaseRef_) return; 
     
    297317     this->hasDomainAxisBaseRef_ = true; 
    298318   } 
     319   CATCH_DUMP_ATTR 
    299320 
    300321   void CGrid::checkEligibilityForCompressedOutput() 
     322   TRY 
    301323   { 
    302324     // We don't check if the mask is valid here, just if a mask has been defined at this point. 
    303325     isCompressible_ = !mask_1d.isEmpty() || !mask_2d.isEmpty() || !mask_3d.isEmpty(); 
    304326   } 
     327   CATCH_DUMP_ATTR 
    305328 
    306329   void CGrid::checkMaskIndex(bool doSendingIndex) 
     330   TRY 
    307331   { 
    308332     CContext* context = CContext::getCurrent(); 
     
    339363      this->isChecked = true; 
    340364   } 
    341  
     365   CATCH_DUMP_ATTR 
    342366   bool CGrid::hasMask() const 
     367   TRY 
    343368   { 
    344369     return (!mask_1d.isEmpty() || !mask_2d.isEmpty() || !mask_3d.isEmpty() || 
    345370             !mask_4d.isEmpty() || !mask_5d.isEmpty() || !mask_6d.isEmpty() || !mask_7d.isEmpty()); 
    346371   } 
     372   CATCH 
    347373 
    348374   /* 
     
    350376   */ 
    351377   void CGrid::createMask(void) 
     378   TRY 
    352379   { 
    353380      using namespace std; 
     
    387414      } 
    388415   } 
     416   CATCH_DUMP_ATTR 
    389417 
    390418   /* 
     
    392420   */ 
    393421   void CGrid::checkMask(void) 
     422   TRY 
    394423   { 
    395424      using namespace std; 
     
    429458      } 
    430459   } 
    431        
     460   CATCH_DUMP_ATTR 
     461 
    432462   /* 
    433463     Modify value of mask in a certain index 
     
    437467   */ 
    438468   void CGrid::modifyMask(const CArray<int,1>& indexToModify, bool modifyValue) 
     469   TRY 
    439470   { 
    440471      using namespace std; 
     
    472503      } 
    473504   } 
     505   CATCH_DUMP_ATTR 
    474506 
    475507   /* 
     
    479511   */ 
    480512   void CGrid::modifyMaskSize(const std::vector<int>& newDimensionSize, bool newValue) 
     513   TRY 
    481514   {       
    482515      std::vector<CDomain*> domainP = this->getDomains(); 
     
    513546      } 
    514547   } 
     548   CATCH_DUMP_ATTR 
    515549 
    516550   //--------------------------------------------------------------- 
    517551 
    518552   void CGrid::solveDomainRef(bool sendAtt) 
     553   TRY 
    519554   { 
    520555      setDomainList(); 
     
    529564      } 
    530565   } 
     566   CATCH_DUMP_ATTR 
    531567 
    532568   //--------------------------------------------------------------- 
    533569 
    534570   void CGrid::solveAxisRef(bool sendAtt) 
     571   TRY 
    535572   { 
    536573      setAxisList(); 
     
    560597      } 
    561598   } 
     599   CATCH_DUMP_ATTR 
    562600 
    563601   //--------------------------------------------------------------- 
    564602 
    565603   void CGrid::solveScalarRef(bool sendAtt) 
     604   TRY 
    566605   { 
    567606      setScalarList(); 
     
    577616      } 
    578617   } 
     618   CATCH_DUMP_ATTR 
    579619 
    580620   /*! 
     
    582622   */ 
    583623   void CGrid::computeWrittenIndex() 
     624   TRY 
    584625   {       
    585626      if (computedWrittenIndex_) return; 
     
    641682      } 
    642683   } 
     684   CATCH_DUMP_ATTR 
    643685 
    644686   //--------------------------------------------------------------- 
     
    651693   */ 
    652694   void CGrid::computeClientIndex() 
     695   TRY 
    653696   { 
    654697     CContext* context = CContext::getCurrent(); 
     
    711754      } 
    712755   } 
     756   CATCH_DUMP_ATTR 
    713757 
    714758   /*! 
     
    716760   */ 
    717761   void CGrid::computeConnectedClients() 
     762   TRY 
    718763   { 
    719764     CContext* context = CContext::getCurrent(); 
     
    833878     } 
    834879   } 
     880   CATCH_DUMP_ATTR 
    835881 
    836882   /*! 
     
    842888   */ 
    843889   void CGrid::computeIndex(void) 
     890   TRY 
    844891   { 
    845892     CContext* context = CContext::getCurrent(); 
     
    868915     } 
    869916   } 
     917   CATCH_DUMP_ATTR 
    870918 
    871919   /*! 
     
    881929                                     const CContextClient* client, 
    882930                                     CClientServerMapping::GlobalIndexMap& globalIndexOnServer) 
     931   TRY 
    883932   { 
    884933     int serverSize = client->serverSize; 
     
    10471096    } 
    10481097   } 
    1049    //---------------------------------------------------------------- 
     1098   CATCH_DUMP_ATTR 
     1099//---------------------------------------------------------------- 
    10501100 
    10511101   CGrid* CGrid::createGrid(CDomain* domain) 
     1102   TRY 
    10521103   { 
    10531104      std::vector<CDomain*> vecDom(1, domain); 
     
    10561107      return createGrid(vecDom, vecAxis); 
    10571108   } 
     1109   CATCH 
    10581110 
    10591111   CGrid* CGrid::createGrid(CDomain* domain, CAxis* axis) 
    1060    { 
     1112   TRY 
     1113  { 
    10611114      std::vector<CDomain*> vecDom(1, domain); 
    10621115      std::vector<CAxis*> vecAxis(1, axis); 
     
    10641117      return createGrid(vecDom, vecAxis); 
    10651118   } 
     1119   CATCH 
    10661120 
    10671121   CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    10681122                            const CArray<int,1>& axisDomainOrder) 
     1123   TRY 
    10691124   { 
    10701125     std::vector<CScalar*> vecScalar; 
    10711126     return createGrid(generateId(domains, axis, vecScalar, axisDomainOrder), domains, axis, vecScalar, axisDomainOrder); 
    10721127   } 
     1128   CATCH 
    10731129 
    10741130   CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    10751131                            const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 
     1132   TRY 
    10761133   { 
    10771134     return createGrid(generateId(domains, axis, scalars, axisDomainOrder), domains, axis, scalars, axisDomainOrder); 
    10781135   } 
     1136   CATCH 
    10791137 
    10801138   CGrid* CGrid::createGrid(StdString id, const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    10811139                            const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 
     1140   TRY 
    10821141   { 
    10831142      if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size())) 
     
    11211180      return grid; 
    11221181   } 
     1182   CATCH 
    11231183 
    11241184   CGrid* CGrid::cloneGrid(const StdString& idNewGrid, CGrid* gridSrc) 
     1185   TRY 
    11251186   { 
    11261187     std::vector<CDomain*> domainSrcTmp = gridSrc->getDomains(), domainSrc; 
     
    11621223      return grid; 
    11631224   } 
     1225   CATCH 
    11641226 
    11651227   StdString CGrid::generateId(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    11661228                               const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 
     1229   TRY 
    11671230   { 
    11681231      if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size())) 
     
    12051268      return id.str(); 
    12061269   } 
     1270   CATCH 
    12071271 
    12081272   StdString CGrid::generateId(const CGrid* gridSrc, const CGrid* gridDest) 
     1273   TRY 
    12091274   { 
    12101275     StdString idSrc  = gridSrc->getId(); 
     
    12161281     return id.str(); 
    12171282   } 
     1283   CATCH 
    12181284 
    12191285   //---------------------------------------------------------------- 
    12201286 
    12211287   CDomainGroup* CGrid::getVirtualDomainGroup() const 
     1288   TRY 
    12221289   { 
    12231290     return this->vDomainGroup_; 
    12241291   } 
     1292   CATCH 
    12251293 
    12261294   CAxisGroup* CGrid::getVirtualAxisGroup() const 
     1295   TRY 
    12271296   { 
    12281297     return this->vAxisGroup_; 
    12291298   } 
     1299   CATCH 
    12301300 
    12311301   CScalarGroup* CGrid::getVirtualScalarGroup() const 
     1302   TRY 
    12321303   { 
    12331304     return this->vScalarGroup_; 
    12341305   } 
     1306   CATCH 
    12351307 
    12361308/* 
     
    12681340 
    12691341   void CGrid::storeField_arr(const double* const data, CArray<double, 1>& stored) const 
     1342   TRY 
    12701343   { 
    12711344      const StdSize size = storeIndex_client.numElements(); 
     
    12741347      for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client(i)]; 
    12751348   } 
     1349   CATCH 
    12761350 
    12771351   void CGrid::restoreField_arr(const CArray<double, 1>& stored, double* const data) const 
     1352   TRY 
    12781353   { 
    12791354      const StdSize size = storeIndex_client.numElements(); 
     
    12811356      for(StdSize i = 0; i < size; i++) data[storeIndex_client(i)] = stored(i); 
    12821357   } 
     1358   CATCH 
    12831359 
    12841360   void CGrid::maskField_arr(const double* const data, CArray<double, 1>& stored) const 
     
    12951371 
    12961372   void CGrid::uncompressField_arr(const double* const data, CArray<double, 1>& out) const 
     1373   TRY 
    12971374   { 
    12981375      const std::vector<int>& localMaskedDataIndex = clientDistribution_->getLocalMaskedDataIndexOnClient(); 
     
    13001377      for(int i = 0; i < size; ++i) out(localMaskedDataIndex[i]) = data[i]; 
    13011378   } 
    1302  
     1379   CATCH 
    13031380 
    13041381  void CGrid::computeClientIndexScalarGrid() 
     1382  TRY 
    13051383  { 
    13061384    CContext* context = CContext::getCurrent();     
     
    13361414    } 
    13371415  } 
     1416  CATCH_DUMP_ATTR 
    13381417 
    13391418  void CGrid::computeConnectedClientsScalarGrid() 
     1419  TRY 
    13401420  { 
    13411421    CContext* context = CContext::getCurrent();     
     
    13821462    } 
    13831463  } 
     1464  CATCH_DUMP_ATTR 
    13841465 
    13851466  void CGrid::sendIndexScalarGrid() 
     1467  TRY 
    13861468  { 
    13871469    CContext* context = CContext::getCurrent(); 
     
    14471529    } 
    14481530  } 
     1531  CATCH_DUMP_ATTR 
    14491532 
    14501533  void CGrid::sendIndex(void) 
     1534  TRY 
    14511535  { 
    14521536    CContext* context = CContext::getCurrent(); 
     
    15681652    } 
    15691653  } 
     1654  CATCH_DUMP_ATTR 
    15701655 
    15711656  void CGrid::recvIndex(CEventServer& event) 
     1657  TRY 
    15721658  { 
    15731659    string gridId; 
     
    15851671    get(gridId)->recvIndex(ranks, buffers); 
    15861672  } 
     1673  CATCH 
    15871674 
    15881675  void CGrid::recvIndex(vector<int> ranks, vector<CBufferIn*> buffers) 
     1676  TRY 
    15891677  { 
    15901678    CContext* context = CContext::getCurrent(); 
     
    17561844    } 
    17571845  } 
     1846  CATCH_DUMP_ATTR 
    17581847 
    17591848  /* 
     
    17711860                                        const std::vector<CScalar*> scalars, 
    17721861                                        const CArray<int,1>& axisDomainOrder) 
    1773   { 
     1862  TRY 
     1863 { 
    17741864 //   globalDim.resize(domains.size()*2+axis.size()+scalars.size()); 
    17751865    globalDim.resize(domains.size()*2+axis.size()); 
     
    18111901    return positionDimensionDistributed; 
    18121902  } 
     1903  CATCH_DUMP_ATTR 
    18131904 
    18141905  // Retrieve the global dimension of grid 
    18151906  std::vector<int> CGrid::getGlobalDimension() 
     1907  TRY 
    18161908  { 
    18171909    std::vector<int> globalDim; 
     
    18201912    return globalDim; 
    18211913  } 
     1914  CATCH_DUMP_ATTR 
    18221915 
    18231916  // Retrieve dimension on which we do distribution (Very often, it should be 2nd dimension) 
    18241917  int CGrid::getDistributedDimension() 
     1918  TRY 
    18251919  { 
    18261920    std::vector<int> globalDim; 
    18271921    return computeGridGlobalDimension(globalDim, getDomains(), getAxis(), getScalars(), axis_domain_order);     
    18281922  } 
     1923  CATCH_DUMP_ATTR 
    18291924 
    18301925  bool CGrid::isScalarGrid() const 
     1926  TRY 
    18311927  { 
    18321928    return (axisList_.empty() && domList_.empty()); 
    18331929  } 
     1930  CATCH 
    18341931 
    18351932  /*! 
     
    18391936  */ 
    18401937  bool CGrid::doGridHaveDataToWrite() 
     1938  TRY 
    18411939  { 
    18421940     return (0 != writtenDataSize_); 
    18431941  } 
     1942  CATCH_DUMP_ATTR 
    18441943 
    18451944  /*! 
     
    18501949  */ 
    18511950  size_t CGrid::getWrittenDataSize() const 
     1951  TRY 
    18521952  { 
    18531953    return writtenDataSize_; 
    18541954  } 
     1955  CATCH 
    18551956 
    18561957  /*! 
     
    18591960  */ 
    18601961  int CGrid::getNumberWrittenIndexes() const 
     1962  TRY 
    18611963  { 
    18621964    return numberWrittenIndexes_; 
    18631965  } 
     1966  CATCH 
    18641967 
    18651968  /*! 
     
    18681971  */ 
    18691972  int CGrid::getTotalNumberWrittenIndexes() const 
     1973  TRY 
    18701974  { 
    18711975    return totalNumberWrittenIndexes_; 
    18721976  } 
     1977  CATCH 
    18731978 
    18741979  /*! 
     
    18771982  */ 
    18781983  int CGrid::getOffsetWrittenIndexes() const 
     1984  TRY 
    18791985  { 
    18801986    return offsetWrittenIndexes_; 
    18811987  } 
     1988  CATCH 
    18821989 
    18831990  CDistributionServer* CGrid::getDistributionServer() 
     1991  TRY 
    18841992  { 
    18851993    return serverDistribution_; 
    18861994  } 
     1995  CATCH_DUMP_ATTR 
    18871996 
    18881997  CDistributionClient* CGrid::getDistributionClient() 
     1998  TRY 
    18891999  { 
    18902000    return clientDistribution_; 
    18912001  } 
     2002  CATCH_DUMP_ATTR 
    18922003 
    18932004  bool CGrid::doGridHaveDataDistributed(CContextClient* client) 
     2005  TRY 
    18942006  { 
    18952007    if (isScalarGrid()) return false; 
     
    19012013      return isDataDistributed_;     
    19022014  } 
     2015  CATCH_DUMP_ATTR 
    19032016 
    19042017   /*! 
     
    19102023   */ 
    19112024  bool CGrid::dispatchEvent(CEventServer& event) 
     2025  TRY 
    19122026  { 
    19132027 
     
    19432057    } 
    19442058  } 
     2059  CATCH 
    19452060 
    19462061   ///--------------------------------------------------------------- 
    19472062 
    19482063   CDomain* CGrid::addDomain(const std::string& id) 
     2064   TRY 
    19492065   { 
    19502066     order_.push_back(2); 
     
    19532069     return vDomainGroup_->createChild(id); 
    19542070   } 
     2071   CATCH_DUMP_ATTR 
    19552072 
    19562073   CAxis* CGrid::addAxis(const std::string& id) 
     2074   TRY 
    19572075   { 
    19582076     order_.push_back(1); 
     
    19612079     return vAxisGroup_->createChild(id); 
    19622080   } 
     2081   CATCH_DUMP_ATTR 
    19632082 
    19642083   CScalar* CGrid::addScalar(const std::string& id) 
     2084   TRY 
    19652085   { 
    19662086     order_.push_back(0); 
     
    19692089     return vScalarGroup_->createChild(id); 
    19702090   } 
     2091   CATCH_DUMP_ATTR 
    19712092 
    19722093   //! Change virtual field group to a new one 
    19732094   void CGrid::setVirtualDomainGroup(CDomainGroup* newVDomainGroup) 
     2095   TRY 
    19742096   { 
    19752097      this->vDomainGroup_ = newVDomainGroup; 
    19762098   } 
     2099   CATCH_DUMP_ATTR 
    19772100 
    19782101   //! Change virtual variable group to new one 
    19792102   void CGrid::setVirtualAxisGroup(CAxisGroup* newVAxisGroup) 
     2103   TRY 
    19802104   { 
    19812105      this->vAxisGroup_ = newVAxisGroup; 
    19822106   } 
     2107   CATCH_DUMP_ATTR 
    19832108 
    19842109   //! Change virtual variable group to new one 
    19852110   void CGrid::setVirtualScalarGroup(CScalarGroup* newVScalarGroup) 
     2111   TRY 
    19862112   { 
    19872113      this->vScalarGroup_ = newVScalarGroup; 
    19882114   } 
     2115   CATCH_DUMP_ATTR 
    19892116 
    19902117   /*! 
     
    19932120   */ 
    19942121   void CGrid::sendAddDomain(const string& id) 
    1995    { 
     2122   TRY 
     2123  { 
    19962124      sendAddItem(id, (int)EVENT_ID_ADD_DOMAIN); 
    19972125   } 
     2126   CATCH_DUMP_ATTR 
    19982127 
    19992128   /*! 
     
    20022131   */ 
    20032132   void CGrid::sendAddAxis(const string& id) 
     2133   TRY 
    20042134   { 
    20052135      sendAddItem(id, (int)EVENT_ID_ADD_AXIS); 
    20062136   } 
     2137   CATCH_DUMP_ATTR 
    20072138 
    20082139   /*! 
     
    20112142   */ 
    20122143   void CGrid::sendAddScalar(const string& id) 
     2144   TRY 
    20132145   { 
    20142146      sendAddItem(id, (int)EVENT_ID_ADD_SCALAR); 
    20152147   } 
     2148   CATCH_DUMP_ATTR 
    20162149 
    20172150   /*! 
     
    20202153   */ 
    20212154   void CGrid::recvAddDomain(CEventServer& event) 
     2155   TRY 
    20222156   { 
    20232157 
     
    20272161      get(id)->recvAddDomain(*buffer); 
    20282162   } 
     2163   CATCH 
    20292164 
    20302165   /*! 
     
    20332168   */ 
    20342169   void CGrid::recvAddDomain(CBufferIn& buffer) 
     2170   TRY 
    20352171   { 
    20362172      string id; 
     
    20382174      addDomain(id); 
    20392175   } 
     2176   CATCH_DUMP_ATTR 
    20402177 
    20412178   /*! 
     
    20442181   */ 
    20452182   void CGrid::recvAddAxis(CEventServer& event) 
     2183   TRY 
    20462184   { 
    20472185 
     
    20512189      get(id)->recvAddAxis(*buffer); 
    20522190   } 
     2191   CATCH 
    20532192 
    20542193   /*! 
     
    20572196   */ 
    20582197   void CGrid::recvAddAxis(CBufferIn& buffer) 
     2198   TRY 
    20592199   { 
    20602200      string id; 
     
    20622202      addAxis(id); 
    20632203   } 
     2204   CATCH_DUMP_ATTR 
    20642205 
    20652206   /*! 
     
    20682209   */ 
    20692210   void CGrid::recvAddScalar(CEventServer& event) 
     2211   TRY 
    20702212   { 
    20712213 
     
    20752217      get(id)->recvAddScalar(*buffer); 
    20762218   } 
     2219   CATCH 
    20772220 
    20782221   /*! 
     
    20812224   */ 
    20822225   void CGrid::recvAddScalar(CBufferIn& buffer) 
     2226   TRY 
    20832227   { 
    20842228      string id; 
     
    20862230      addScalar(id); 
    20872231   } 
     2232   CATCH_DUMP_ATTR 
    20882233 
    20892234  /*! 
     
    20942239  */ 
    20952240  void CGrid::solveDomainAxisRefInheritance(bool apply) 
     2241  TRY 
    20962242  { 
    20972243    CContext* context = CContext::getCurrent(); 
     
    21342280    } 
    21352281  } 
     2282  CATCH_DUMP_ATTR 
    21362283 
    21372284  bool CGrid::isTransformed() 
     2285  TRY 
    21382286  { 
    21392287    return isTransformed_; 
    21402288  } 
     2289  CATCH_DUMP_ATTR 
    21412290 
    21422291  void CGrid::setTransformed() 
     2292  TRY 
    21432293  { 
    21442294    isTransformed_ = true; 
    21452295  } 
     2296  CATCH_DUMP_ATTR 
    21462297 
    21472298  CGridTransformation* CGrid::getTransformations() 
     2299  TRY 
    21482300  { 
    21492301    return transformations_; 
    21502302  } 
     2303  CATCH_DUMP_ATTR 
    21512304 
    21522305  void CGrid::addTransGridSource(CGrid* gridSrc) 
     2306  TRY 
    21532307  { 
    21542308    if (gridSrc_.end() == gridSrc_.find(gridSrc)) 
    21552309      gridSrc_.insert(make_pair(gridSrc,make_pair(false,""))); 
    21562310  } 
     2311  CATCH_DUMP_ATTR 
    21572312 
    21582313  std::map<CGrid*,std::pair<bool,StdString> >& CGrid::getTransGridSource() 
     2314  TRY 
    21592315  { 
    21602316    return gridSrc_; 
    21612317  } 
     2318  CATCH_DUMP_ATTR 
    21622319 
    21632320  /*! 
     
    21662323  */ 
    21672324  void CGrid::completeGrid(CGrid* transformGridSrc) 
     2325  TRY 
    21682326  { 
    21692327    if (0 != transformGridSrc) 
     
    21842342    gridGenerate.completeGrid(); 
    21852343  } 
     2344  CATCH_DUMP_ATTR 
    21862345 
    21872346  bool CGrid::isGenerated() 
     2347  TRY 
    21882348  { 
    21892349    return isGenerated_; 
    21902350  } 
     2351  CATCH 
    21912352 
    21922353  void CGrid::setGenerated() 
     2354  TRY 
    21932355  { 
    21942356    isGenerated_ = true; 
    21952357  } 
     2358  CATCH_DUMP_ATTR 
    21962359 
    21972360  void CGrid::transformGrid(CGrid* transformGridSrc) 
     2361  TRY 
    21982362  { 
    21992363    if (!transformGridSrc) 
     
    22212385    transformGridSrc->checkMaskIndex(false); 
    22222386  } 
     2387  CATCH_DUMP_ATTR 
    22232388 
    22242389  bool CGrid::hasTransform() 
     2390  TRY 
    22252391  { 
    22262392    if (hasTransform_) return hasTransform_; 
     
    22362402    return hasTransform_; 
    22372403  } 
     2404  CATCH_DUMP_ATTR 
    22382405 
    22392406  /*! 
     
    22422409  */ 
    22432410  std::vector<CDomain*> CGrid::getDomains() 
     2411  TRY 
    22442412  { 
    22452413    std::vector<CDomain*> domList; 
     
    22502418    return domList; 
    22512419  } 
     2420  CATCH_DUMP_ATTR 
    22522421 
    22532422  /*! 
     
    22562425  */ 
    22572426  std::vector<CAxis*> CGrid::getAxis() 
     2427  TRY 
    22582428  { 
    22592429    std::vector<CAxis*> aList; 
     
    22632433    return aList; 
    22642434  } 
     2435  CATCH_DUMP_ATTR 
    22652436 
    22662437  /*! 
     
    22692440  */ 
    22702441  std::vector<CScalar*> CGrid::getScalars() 
     2442  TRY 
    22712443  { 
    22722444    std::vector<CScalar*> sList; 
     
    22762448    return sList; 
    22772449  } 
     2450  CATCH_DUMP_ATTR 
    22782451 
    22792452  /*! 
     
    22822455  */ 
    22832456  CDomain* CGrid::getDomain(int domainIndex) 
     2457  TRY 
    22842458  { 
    22852459    std::vector<CDomain*> domainListP = this->getDomains(); 
     
    22992473    return domainListP[domainIndex]; 
    23002474  } 
     2475  CATCH_DUMP_ATTR 
    23012476 
    23022477  /*! 
     
    23052480  */ 
    23062481  CAxis* CGrid::getAxis(int axisIndex) 
     2482  TRY 
    23072483  { 
    23082484    std::vector<CAxis*> axisListP = this->getAxis(); 
     
    23222498    return axisListP[axisIndex]; 
    23232499  } 
     2500  CATCH_DUMP_ATTR 
    23242501 
    23252502  /*! 
     
    23282505  */ 
    23292506  CScalar* CGrid::getScalar(int scalarIndex) 
     2507  TRY 
    23302508  { 
    23312509    std::vector<CScalar*> scalarListP = this->getScalars(); 
     
    23452523    return scalarListP[scalarIndex]; 
    23462524  } 
     2525  CATCH_DUMP_ATTR 
    23472526 
    23482527  /*! 
     
    23512530  */ 
    23522531  void CGrid::setDomainList(const std::vector<CDomain*> domains) 
     2532  TRY 
    23532533  { 
    23542534    if (isDomListSet) return; 
     
    23712551      isDomListSet = true; 
    23722552    } 
    2373  
    2374   } 
     2553  } 
     2554  CATCH_DUMP_ATTR 
    23752555 
    23762556  /*! 
     
    23792559  */ 
    23802560  void CGrid::setAxisList(const std::vector<CAxis*> axis) 
     2561  TRY 
    23812562  { 
    23822563    if (isAxisListSet) return; 
     
    24002581    } 
    24012582  } 
     2583  CATCH_DUMP_ATTR 
    24022584 
    24032585  /*! 
     
    24062588  */ 
    24072589  void CGrid::setScalarList(const std::vector<CScalar*> scalars) 
     2590  TRY 
    24082591  { 
    24092592    if (isScalarListSet) return; 
     
    24272610    } 
    24282611  } 
     2612  CATCH_DUMP_ATTR 
    24292613 
    24302614  /*! 
     
    24332617  */ 
    24342618  std::vector<StdString> CGrid::getDomainList() 
     2619  TRY 
    24352620  { 
    24362621    setDomainList(); 
    24372622    return domList_; 
    24382623  } 
     2624  CATCH 
    24392625 
    24402626  /*! 
     
    24432629  */ 
    24442630  std::vector<StdString> CGrid::getAxisList() 
     2631  TRY 
    24452632  { 
    24462633    setAxisList(); 
    24472634    return axisList_; 
    24482635  } 
     2636  CATCH 
    24492637 
    24502638  /*! 
     
    24532641  */ 
    24542642  std::vector<StdString> CGrid::getScalarList() 
     2643  TRY 
    24552644  { 
    24562645    setScalarList(); 
    24572646    return scalarList_; 
    24582647  } 
     2648  CATCH 
    24592649 
    24602650  /*! 
     
    24622652  */ 
    24632653  void CGrid::sendAllDomains() 
     2654  TRY 
    24642655  { 
    24652656    std::vector<CDomain*> domList = this->getVirtualDomainGroup()->getAllChildren(); 
     
    24712662    } 
    24722663  } 
     2664  CATCH_DUMP_ATTR 
    24732665 
    24742666  /*! 
     
    24762668  */ 
    24772669  void CGrid::sendAllAxis() 
     2670  TRY 
    24782671  { 
    24792672    std::vector<CAxis*> aList = this->getVirtualAxisGroup()->getAllChildren(); 
     
    24862679    } 
    24872680  } 
     2681  CATCH_DUMP_ATTR 
    24882682 
    24892683  /*! 
     
    24912685  */ 
    24922686  void CGrid::sendAllScalars() 
     2687  TRY 
    24932688  { 
    24942689    std::vector<CScalar*> sList = this->getVirtualScalarGroup()->getAllChildren(); 
     
    25012696    } 
    25022697  } 
     2698  CATCH_DUMP_ATTR 
    25032699 
    25042700  void CGrid::setContextClient(CContextClient* contextClient) 
     2701  TRY 
    25052702  { 
    25062703    if (clientsSet.find(contextClient)==clientsSet.end()) 
     
    25142711        this->getAxis()[i]->setContextClient(contextClient); 
    25152712  } 
     2713  CATCH_DUMP_ATTR 
    25162714 
    25172715  /*! 
     
    25192717  */ 
    25202718  void CGrid::parse(xml::CXMLNode& node) 
     2719  TRY 
    25212720  { 
    25222721    SuperClass::parse(node); 
     
    25592758    setScalarList(); 
    25602759   } 
     2760  CATCH_DUMP_ATTR 
     2761 
    25612762} // namespace xios 
  • XIOS/dev/dev_olga/src/object.cpp

    r777 r1612  
    3232  { 
    3333    return this->id; 
     34  } 
     35 
     36  StdString CObject::dumpClassAttributes(void) 
     37  { 
     38    return ""; 
    3439  } 
    3540 
  • XIOS/dev/dev_olga/src/object.hpp

    r769 r1612  
    1717      /// Accesseurs /// 
    1818      const StdString& getId(void) const; 
     19      virtual const StdString& getIdServer() const; 
    1920 
    20       virtual const StdString& getIdServer() const; 
     21      virtual StdString dumpClassAttributes(void); 
    2122 
    2223      /// Mutateurs /// 
  • XIOS/dev/dev_olga/src/object_template_impl.hpp

    r1542 r1612  
    109109   template <class T> 
    110110      void CObjectTemplate<T>::parse(xml::CXMLNode & node) 
     111   TRY 
    111112   { 
    112113      xml::THashAttributes attributes = node.getAttributes(); 
    113114      CAttributeMap::setAttributes(attributes); 
    114115   } 
     116   CATCH 
    115117 
    116118   //--------------------------------------------------------------- 
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_duplicate_scalar.cpp

    r1314 r1612  
    2121                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2222                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     23TRY 
    2324{ 
    2425  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    3132  return (new CAxisAlgorithmDuplicateScalar(axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], duplicateScalar)); 
    3233} 
     34CATCH 
    3335 
    3436bool CAxisAlgorithmDuplicateScalar::registerTrans() 
     37TRY 
    3538{ 
    3639  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_DUPLICATE_SCALAR_TO_AXIS, create); 
    3740} 
     41CATCH 
    3842 
    3943 
     
    5054 
    5155void CAxisAlgorithmDuplicateScalar::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     56TRY 
    5257{ 
    5358  this->transformationMapping_.resize(1); 
     
    6974  } 
    7075} 
    71  
     76CATCH 
    7277} 
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_extract.cpp

    r1558 r1612  
    1919                                                           std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2020                                                           std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     21TRY 
    2122{ 
    2223  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    2930  return (new CAxisAlgorithmExtract(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], extractAxis)); 
    3031} 
     32CATCH 
     33 
    3134bool CAxisAlgorithmExtract::registerTrans() 
     35TRY 
    3236{ 
    3337  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_EXTRACT_AXIS, create); 
    3438} 
     39CATCH 
    3540 
    3641CAxisAlgorithmExtract::CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis) 
    3742: CAxisAlgorithmTransformation(axisDestination, axisSource) 
     43TRY 
    3844{ 
    3945  extractAxis->checkValid(axisSource); 
     
    104110  } 
    105111} 
     112CATCH 
    106113 
    107114/*! 
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_extract_domain.cpp

    r1260 r1612  
    2525                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2626                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     27TRY 
    2728{ 
    2829  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    3536  return (new CAxisAlgorithmExtractDomain(axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], extractDomain)); 
    3637} 
     38CATCH 
    3739 
    3840//bool CAxisAlgorithmExtractDomain::_dummyRegistered = CAxisAlgorithmExtractDomain::registerTrans(); 
    3941bool CAxisAlgorithmExtractDomain::registerTrans() 
     42TRY 
    4043{ 
    4144  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_EXTRACT_DOMAIN_TO_AXIS, create); 
    4245} 
     46CATCH 
    4347 
    4448 
    4549CAxisAlgorithmExtractDomain::CAxisAlgorithmExtractDomain(CAxis* axisDestination, CDomain* domainSource, CExtractDomainToAxis* algo) 
    4650 : CAxisAlgorithmTransformation(axisDestination, domainSource), pos_(-1), reduction_(0) 
     51TRY 
    4752{ 
    4853  algo->checkValid(axisDestination, domainSource); 
     
    6469  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 
    6570} 
     71CATCH 
    6672 
    6773void CAxisAlgorithmExtractDomain::apply(const std::vector<std::pair<int,double> >& localIndex, 
     
    7076                                        std::vector<bool>& flagInitial,                      
    7177                                        bool ignoreMissingValue, bool firstPass) 
     78TRY 
    7279{ 
    7380  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    7481} 
     82CATCH 
    7583 
    7684CAxisAlgorithmExtractDomain::~CAxisAlgorithmExtractDomain() 
     85TRY 
    7786{ 
    7887  if (0 != reduction_) delete reduction_; 
    7988} 
     89CATCH 
    8090 
    8191void CAxisAlgorithmExtractDomain::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     92TRY 
    8293{ 
    8394  this->transformationMapping_.resize(1); 
     
    117128  {} 
    118129} 
    119  
     130CATCH 
    120131} 
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_interpolate.cpp

    r1412 r1612  
    2929                                                                   std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    3030                                                                   std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     31TRY 
    3132{ 
    3233  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    3940  return (new CAxisAlgorithmInterpolate(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], interpolateAxis)); 
    4041} 
     42CATCH 
    4143 
    4244bool CAxisAlgorithmInterpolate::registerTrans() 
     45TRY 
    4346{ 
    4447  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_INTERPOLATE_AXIS, create); 
    4548} 
    46  
     49CATCH 
    4750 
    4851CAxisAlgorithmInterpolate::CAxisAlgorithmInterpolate(CAxis* axisDestination, CAxis* axisSource, CInterpolateAxis* interpAxis) 
    4952: CAxisAlgorithmTransformation(axisDestination, axisSource), coordinate_(), transPosition_() 
     53TRY 
    5054{ 
    5155  interpAxis->checkValid(axisSource); 
     
    5862  } 
    5963} 
     64CATCH 
    6065 
    6166/*! 
     
    6368*/ 
    6469void CAxisAlgorithmInterpolate::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     70TRY 
    6571{ 
    6672  CTimer::get("CAxisAlgorithmInterpolate::computeIndexSourceMapping_").resume() ; 
     
    8894  CTimer::get("CAxisAlgorithmInterpolate::computeIndexSourceMapping_").suspend() ; 
    8995} 
     96CATCH 
    9097 
    9198/*! 
     
    98105                                                        const std::vector<int>& indexVec, 
    99106                                                        int transPos) 
     107TRY 
    100108{ 
    101109  std::vector<double>::const_iterator itb = axisValue.begin(), ite = axisValue.end(); 
     
    162170  computeWeightedValueAndMapping(interpolatingIndexValues, transPos); 
    163171} 
     172CATCH 
    164173 
    165174/*! 
     
    168177*/ 
    169178void CAxisAlgorithmInterpolate::computeWeightedValueAndMapping(const std::map<int, std::vector<std::pair<int,double> > >& interpolatingIndexValues, int transPos) 
     179TRY 
    170180{ 
    171181  TransformationIndexMap& transMap = this->transformationMapping_[transPos]; 
     
    205215 
    206216} 
     217CATCH 
    207218 
    208219/*! 
     
    213224void CAxisAlgorithmInterpolate::retrieveAllAxisValue(const CArray<double,1>& axisValue, const CArray<bool,1>& axisMask, 
    214225                                                     std::vector<double>& recvBuff, std::vector<int>& indexVec) 
     226TRY 
    215227{ 
    216228  CContext* context = CContext::getCurrent(); 
     
    282294  } 
    283295} 
     296CATCH 
    284297 
    285298/*! 
     
    289302void CAxisAlgorithmInterpolate::fillInAxisValue(std::vector<CArray<double,1> >& vecAxisValue, 
    290303                                                const std::vector<CArray<double,1>* >& dataAuxInputs) 
     304TRY 
    291305{ 
    292306  if (coordinate_.empty()) 
     
    377391  } 
    378392} 
    379  
    380 } 
     393CATCH 
     394 
     395} 
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_inverse.cpp

    r1542 r1612  
    2727                                                               std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2828                                                               std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     29TRY 
    2930{ 
    3031  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    3738  return (new CAxisAlgorithmInverse(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], inverseAxis)); 
    3839} 
     40CATCH 
    3941 
    4042bool CAxisAlgorithmInverse::registerTrans() 
     43TRY 
    4144{ 
    4245  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_INVERSE_AXIS, create); 
    4346} 
    44  
     47CATCH 
    4548 
    4649CAxisAlgorithmInverse::CAxisAlgorithmInverse(CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis) 
    4750 : CAxisAlgorithmTransformation(axisDestination, axisSource) 
     51TRY 
    4852{ 
    4953  if (axisDestination->n_glo.getValue() != axisSource->n_glo.getValue()) 
     
    5559  } 
    5660} 
     61CATCH 
    5762 
    5863void CAxisAlgorithmInverse::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     64TRY 
    5965{ 
    6066  this->transformationMapping_.resize(1); 
     
    8288  } 
    8389} 
     90CATCH 
    8491 
    8592/*! 
     
    8895*/ 
    8996void CAxisAlgorithmInverse::updateAxisValue() 
     97TRY 
    9098{ 
    9199  CContext* context = CContext::getCurrent(); 
     
    282290    delete [] itLong->second; 
    283291} 
    284  
    285 } 
     292CATCH 
     293 
     294} 
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_reduce_axis.cpp

    r1314 r1612  
    2424                                                                   std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2525                                                                   std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     26TRY 
    2627{ 
    2728  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    3435  return (new CAxisAlgorithmReduceAxis(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], reduceAxis)); 
    3536} 
     37CATCH 
    3638 
    3739bool CAxisAlgorithmReduceAxis::registerTrans() 
     40TRY 
    3841{ 
    3942  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_REDUCE_AXIS_TO_AXIS, create); 
    4043} 
     44CATCH 
    4145 
    4246 
    4347CAxisAlgorithmReduceAxis::CAxisAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToAxis* algo) 
    4448 : CAxisAlgorithmTransformation(axisDestination, axisSource), reduction_(0) 
     49TRY 
    4550{ 
    4651  eliminateRedondantSrc_= false ; 
     
    7176  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 
    7277} 
     78CATCH 
    7379 
    7480void CAxisAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex, 
     
    7783                                       std::vector<bool>& flagInitial,                      
    7884                                       bool ignoreMissingValue, bool firstPass) 
     85TRY 
    7986{ 
    8087  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    8188} 
     89CATCH 
    8290 
    8391void CAxisAlgorithmReduceAxis::updateData(CArray<double,1>& dataOut) 
     92TRY 
    8493{ 
    8594  reduction_->updateData(dataOut); 
    8695} 
     96CATCH 
    8797 
    8898CAxisAlgorithmReduceAxis::~CAxisAlgorithmReduceAxis() 
     99TRY 
    89100{ 
    90101  if (0 != reduction_) delete reduction_; 
    91102} 
     103CATCH 
    92104 
    93105void CAxisAlgorithmReduceAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     106TRY 
    94107{ 
    95108  this->transformationMapping_.resize(1); 
     
    109122  } 
    110123} 
     124CATCH 
    111125 
    112126} 
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_reduce_domain.cpp

    r1299 r1612  
    2525                                                                   std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2626                                                                   std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     27TRY 
    2728{ 
    2829  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    3536  return (new CAxisAlgorithmReduceDomain(axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], reduceDomain)); 
    3637} 
     38CATCH 
    3739 
    3840bool CAxisAlgorithmReduceDomain::registerTrans() 
     41TRY 
    3942{ 
    4043  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_REDUCE_DOMAIN_TO_AXIS, create); 
    4144} 
     45CATCH 
    4246 
    4347 
    4448CAxisAlgorithmReduceDomain::CAxisAlgorithmReduceDomain(CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo) 
    4549 : CAxisAlgorithmTransformation(axisDestination, domainSource), reduction_(0) 
     50TRY 
    4651{ 
    4752  algo->checkValid(axisDestination, domainSource); 
     
    7378  local = algo->local ; 
    7479} 
     80CATCH 
    7581 
    7682void CAxisAlgorithmReduceDomain::apply(const std::vector<std::pair<int,double> >& localIndex, 
     
    7985                                       std::vector<bool>& flagInitial,                      
    8086                                       bool ignoreMissingValue, bool firstPass) 
     87TRY 
    8188{ 
    8289  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    8390} 
     91CATCH 
    8492 
    8593void CAxisAlgorithmReduceDomain::updateData(CArray<double,1>& dataOut) 
     94TRY 
    8695{ 
    8796  reduction_->updateData(dataOut); 
    8897} 
     98CATCH 
    8999 
    90100CAxisAlgorithmReduceDomain::~CAxisAlgorithmReduceDomain() 
     101TRY 
    91102{ 
    92103  if (0 != reduction_) delete reduction_; 
    93104} 
     105CATCH 
    94106 
    95107void CAxisAlgorithmReduceDomain::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     108TRY 
    96109{ 
    97110  this->transformationMapping_.resize(1); 
     
    174187  {} 
    175188} 
     189CATCH 
    176190 
    177191} 
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_temporal_splitting.cpp

    r1275 r1612  
    2121                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2222                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     23TRY 
    2324{ 
    2425  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    3132  return (new CAxisAlgorithmTemporalSplitting(axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], temporalSplitting)); 
    3233} 
     34CATCH 
    3335 
    3436bool CAxisAlgorithmTemporalSplitting::registerTrans() 
     37TRY 
    3538{ 
    3639  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_TEMPORAL_SPLITTING, create); 
    3740} 
    38  
     41CATCH 
    3942 
    4043CAxisAlgorithmTemporalSplitting::CAxisAlgorithmTemporalSplitting(CAxis* axisDestination, CScalar* scalarSource, CTemporalSplitting* algo) 
     
    5053 
    5154void CAxisAlgorithmTemporalSplitting::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     55TRY 
    5256{ 
    5357  this->transformationMapping_.resize(1); 
     
    7276  } 
    7377} 
     78CATCH 
    7479 
    7580} 
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_transformation.cpp

    r1403 r1612  
    2020CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CAxis* axisSource) 
    2121 : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(axisSource), domainSrc_(0),scalarSrc_(0) 
     22TRY 
    2223{ 
    2324  axisDestGlobalSize_ = axisDestination->n_glo.getValue(); 
     
    2829    if ((axisDestination->mask)(idx)) axisDestGlobalIndex_.push_back(ibeginDest+idx); 
    2930} 
     31CATCH 
    3032 
    3133CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CDomain* domainSource) 
    3234 : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(0), domainSrc_(domainSource),scalarSrc_(0) 
     35TRY 
    3336{ 
    3437  axisDestGlobalSize_ = axisDestination->n_glo.getValue(); 
     
    3942    if ((axisDestination->mask)(idx)) axisDestGlobalIndex_.push_back(ibeginDest+idx); 
    4043} 
     44CATCH 
    4145 
    4246CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CScalar* scalarSource) 
    4347 : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(0), domainSrc_(0), scalarSrc_(scalarSource) 
     48TRY 
    4449{ 
    4550  axisDestGlobalSize_ = axisDestination->n_glo.getValue(); 
     
    5055    if ((axisDestination->mask)(idx)) axisDestGlobalIndex_.push_back(ibeginDest+idx); 
    5156} 
     57CATCH 
     58 
    5259CAxisAlgorithmTransformation::~CAxisAlgorithmTransformation() 
    5360{ 
     
    6673                                                              int elementType, 
    6774                                                              CClientClientDHTInt::Index2VectorInfoTypeMap& globalAxisIndexOnProc) 
     75TRY 
    6876{ 
    6977  CContext* context = CContext::getCurrent(); 
     
    124132  globalAxisIndexOnProc = dhtIndexProcRank.getInfoIndexMap(); 
    125133} 
     134CATCH 
    126135 
    127136} 
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_zoom.cpp

    r1559 r1612  
    1919                                                           std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2020                                                           std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     21TRY 
    2122{ 
    2223  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    2930  return (new CAxisAlgorithmZoom(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], zoomAxis)); 
    3031} 
     32CATCH 
     33 
    3134bool CAxisAlgorithmZoom::registerTrans() 
     35TRY 
    3236{ 
    3337  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_ZOOM_AXIS, create); 
    3438} 
     39CATCH 
    3540 
    3641CAxisAlgorithmZoom::CAxisAlgorithmZoom(CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis) 
    3742: CAxisAlgorithmTransformation(axisDestination, axisSource) 
     43TRY 
    3844{ 
    3945  zoomAxis->checkValid(axisSource); 
     
    104110  } 
    105111} 
     112CATCH 
    106113 
    107114/*! 
  • XIOS/dev/dev_olga/src/transformation/domain_algorithm_compute_connectivity.cpp

    r978 r1612  
    2424                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2525                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     26TRY 
    2627{ 
    2728  std::vector<CDomain*> domainListDestP = gridDst->getDomains(); 
     
    3435  return (new CDomainAlgorithmComputeConnectivity(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], compute_connectivityDomain)); 
    3536} 
     37CATCH 
    3638 
    3739bool CDomainAlgorithmComputeConnectivity::registerTrans() 
     40TRY 
    3841{ 
    3942  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_COMPUTE_CONNECTIVITY_DOMAIN, create); 
    4043} 
     44CATCH 
    4145 
    4246CDomainAlgorithmComputeConnectivity::CDomainAlgorithmComputeConnectivity(CDomain* domainDestination, CDomain* domainSource, 
    4347                                                                         CComputeConnectivityDomain* compute_connectivityDomain) 
    4448: CDomainAlgorithmTransformation(domainDestination, domainSource) 
     49TRY 
    4550{ 
    4651  this->type_ = (ELEMENT_NO_MODIFICATION_WITHOUT_DATA); 
     
    6469  computeLocalConnectivity(type, domainDestination, nbNeighborMax, nbNeighbor, localNeighbors); 
    6570} 
     71CATCH 
    6672 
    6773/*! 
     
    7884                                                                  CArray<int,1>& nbConnectivity, 
    7985                                                                  CArray<int,2>& localConnectivity) 
     86TRY 
    8087{ 
    8188 
     
    93100    if (nbConnectivityMax < nbConnectivity(idx)) nbConnectivityMax = nbConnectivity(idx); 
    94101} 
    95  
    96  
     102CATCH 
    97103 
    98104/*! 
  • XIOS/dev/dev_olga/src/transformation/domain_algorithm_expand.cpp

    r1553 r1612  
    2626                                                               std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2727                                                               std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     28TRY 
    2829{ 
    2930  std::vector<CDomain*> domainListDestP = gridDst->getDomains(); 
     
    3637  return (new CDomainAlgorithmExpand(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], expandDomain)); 
    3738} 
     39CATCH 
    3840 
    3941bool CDomainAlgorithmExpand::registerTrans() 
     42TRY 
    4043{ 
    4144  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_EXPAND_DOMAIN, create); 
    4245} 
     46CATCH 
    4347 
    4448CDomainAlgorithmExpand::CDomainAlgorithmExpand(CDomain* domainDestination, 
     
    4751: CDomainAlgorithmTransformation(domainDestination, domainSource), 
    4852  isXPeriodic_(false), isYPeriodic_(false) 
     53TRY 
    4954{ 
    5055  if (domainDestination == domainSource) 
     
    7782  } 
    7883} 
     84CATCH 
    7985 
    8086/*! 
     
    8591void CDomainAlgorithmExpand::expandDomainEdgeConnectivity(CDomain* domainDestination, 
    8692                                                          CDomain* domainSource) 
     93TRY 
    8794{ 
    8895  CContext* context = CContext::getCurrent(); 
     
    104111  }   
    105112} 
     113CATCH 
    106114 
    107115/*! 
     
    112120void CDomainAlgorithmExpand::expandDomainNodeConnectivity(CDomain* domainDestination, 
    113121                                                          CDomain* domainSource) 
     122TRY 
    114123{ 
    115124  CContext* context = CContext::getCurrent(); 
     
    131140  }   
    132141} 
     142CATCH 
    133143 
    134144/*! 
     
    142152                                                               CDomain* domainSource, 
    143153                                                               CArray<int,2>& neighborsDomainSrc) 
     154TRY 
    144155{ 
    145156  int index, globalIndex, idx; 
     
    455466   domainDestination->computeLocalMask() ; 
    456467} 
     468CATCH 
    457469 
    458470/*! 
     
    466478                                                                CDomain* domainSource, 
    467479                                                                CArray<int,2>& neighborsDomainSrc) 
     480TRY 
    468481{ 
    469482 
     
    669682  domainDestination->computeLocalMask() ; 
    670683} 
    671  
     684CATCH 
    672685 
    673686/*! 
  • XIOS/dev/dev_olga/src/transformation/domain_algorithm_extract.cpp

    r1553 r1612  
    1616                                                             std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    1717                                                             std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     18TRY 
    1819{ 
    1920  std::vector<CDomain*> domainListDestP = gridDst->getDomains(); 
     
    2627  return (new CDomainAlgorithmExtract(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], extractDomain)); 
    2728} 
     29CATCH 
    2830 
    2931bool CDomainAlgorithmExtract::registerTrans() 
     32TRY 
    3033{ 
    3134  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_EXTRACT_DOMAIN, create); 
    3235} 
     36CATCH 
    3337 
    3438CDomainAlgorithmExtract::CDomainAlgorithmExtract(CDomain* domainDestination, CDomain* domainSource, CExtractDomain* extractDomain) 
    3539: CDomainAlgorithmTransformation(domainDestination, domainSource) 
     40TRY 
    3641{ 
    3742  extractDomain->checkValid(domainSource); 
     
    220225 
    221226} 
     227CATCH 
    222228 
    223229/*! 
  • XIOS/dev/dev_olga/src/transformation/domain_algorithm_generate_rectilinear.cpp

    r1158 r1612  
    2020                                                                         CGenerateRectilinearDomain* genRectDomain) 
    2121: CDomainAlgorithmTransformation(domainDestination, domainSource), nbDomainDistributedPart_(0) 
     22TRY 
    2223{ 
    2324  type_ = ELEMENT_GENERATION; 
     
    3031  fillInAttributesDomainDestination(); 
    3132} 
     33CATCH 
    3234 
    3335/*! 
     
    4345*/ 
    4446void CDomainAlgorithmGenerateRectilinear::computeDistributionGridSource(CGrid* gridSrc) 
     47TRY 
    4548{ 
    4649  CContext* context = CContext::getCurrent(); 
     
    9497  } 
    9598} 
     99CATCH 
    96100 
    97101/*! 
     
    99103*/ 
    100104void CDomainAlgorithmGenerateRectilinear::computeDistributionGridDestination(CGrid* gridDest) 
     105TRY 
    101106{ 
    102107  // For now, just suppose that the grid contains only one domain 
     
    121126 
    122127} 
     128CATCH 
    123129 
    124130/*! 
     
    126132*/ 
    127133void CDomainAlgorithmGenerateRectilinear::fillInAttributesDomainDestination() 
     134TRY 
    128135{ 
    129136  if (!domainDest_->distributionAttributesHaveValue()) 
     
    131138  domainDest_->fillInLonLat(); 
    132139} 
    133  
     140CATCH 
    134141} 
  • XIOS/dev/dev_olga/src/transformation/domain_algorithm_interpolate.cpp

    r1542 r1612  
    3131                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    3232                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     33TRY 
    3334{ 
    3435  std::vector<CDomain*> domainListDestP = gridDst->getDomains(); 
     
    4142  return (new CDomainAlgorithmInterpolate(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], interpolateDomain)); 
    4243} 
     44CATCH 
    4345 
    4446bool CDomainAlgorithmInterpolate::registerTrans() 
     47TRY 
    4548{ 
    4649  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_INTERPOLATE_DOMAIN, create); 
    4750} 
     51CATCH 
    4852 
    4953CDomainAlgorithmInterpolate::CDomainAlgorithmInterpolate(CDomain* domainDestination, CDomain* domainSource, CInterpolateDomain* interpDomain) 
    5054: CDomainAlgorithmTransformation(domainDestination, domainSource), interpDomain_(interpDomain), writeToFile_(false), readFromFile_(false) 
     55TRY 
    5156{ 
    5257  CContext* context = CContext::getCurrent(); 
     
    9398     
    9499} 
     100CATCH 
    95101 
    96102/*! 
     
    98104*/ 
    99105void CDomainAlgorithmInterpolate::computeRemap() 
     106TRY 
    100107{ 
    101108  using namespace sphereRemap; 
     
    399406 
    400407} 
     408CATCH 
    401409 
    402410void CDomainAlgorithmInterpolate::processPole(std::map<int,std::vector<std::pair<int,double> > >& interMapValuePole, 
    403411                                              int nbGlobalPointOnPole) 
     412TRY 
    404413{ 
    405414  CContext* context = CContext::getCurrent(); 
     
    468477 
    469478} 
     479CATCH 
    470480 
    471481/*! 
     
    473483*/ 
    474484void CDomainAlgorithmInterpolate::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     485TRY 
    475486{ 
    476487  if (readFromFile_)   
     
    481492  } 
    482493} 
     494CATCH 
    483495 
    484496void CDomainAlgorithmInterpolate::writeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 
     497TRY 
    485498 
    486499  writeInterpolationInfo(fileToReadWrite_, interpMapValue); 
    487500} 
     501CATCH 
    488502 
    489503void CDomainAlgorithmInterpolate::readRemapInfo() 
     504TRY 
    490505 
    491506  std::map<int,std::vector<std::pair<int,double> > > interpMapValue; 
     
    494509  exchangeRemapInfo(interpMapValue); 
    495510} 
     511CATCH 
    496512 
    497513void CDomainAlgorithmInterpolate::convertRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 
     514TRY 
    498515{ 
    499516  CContext* context = CContext::getCurrent(); 
     
    520537  }       
    521538} 
     539CATCH 
    522540 
    523541/*! 
     
    525543*/ 
    526544void CDomainAlgorithmInterpolate::exchangeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 
     545TRY 
    527546{ 
    528547  CContext* context = CContext::getCurrent(); 
     
    704723  delete [] recvBuff; 
    705724} 
     725CATCH 
    706726  
    707727/*! Redefined some functions of CONetCDF4 to make use of them */ 
     
    710730int CDomainAlgorithmInterpolate::WriteNetCdf::addDimensionWrite(const StdString& name,  
    711731                                                                const StdSize size) 
     732TRY 
    712733{ 
    713734  return CONetCDF4::addDimension(name, size);   
    714735} 
     736CATCH 
    715737 
    716738int CDomainAlgorithmInterpolate::WriteNetCdf::addVariableWrite(const StdString& name, nc_type type, 
    717739                                                               const std::vector<StdString>& dim) 
     740TRY 
    718741{ 
    719742  return CONetCDF4::addVariable(name, type, dim); 
    720743} 
     744CATCH 
    721745 
    722746void CDomainAlgorithmInterpolate::WriteNetCdf::endDefinition() 
     747TRY 
    723748{ 
    724749  CONetCDF4::definition_end(); 
    725750} 
     751CATCH 
    726752 
    727753void CDomainAlgorithmInterpolate::WriteNetCdf::writeDataIndex(const CArray<int,1>& data, const StdString& name, 
     
    729755                                                              const std::vector<StdSize>* start, 
    730756                                                              const std::vector<StdSize>* count) 
     757TRY 
    731758{ 
    732759  CONetCDF4::writeData<int,1>(data, name, collective, record, start, count); 
    733760} 
     761CATCH 
    734762 
    735763void CDomainAlgorithmInterpolate::WriteNetCdf::writeDataIndex(const CArray<double,1>& data, const StdString& name, 
     
    737765                                                              const std::vector<StdSize>* start, 
    738766                                                              const std::vector<StdSize>* count) 
     767TRY 
    739768{ 
    740769  CONetCDF4::writeData<double,1>(data, name, collective, record, start, count); 
    741770} 
     771CATCH 
    742772 
    743773/* 
     
    748778void CDomainAlgorithmInterpolate::writeInterpolationInfo(std::string& filename, 
    749779                                                         std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 
     780TRY 
    750781{ 
    751782  CContext* context = CContext::getCurrent(); 
     
    827858  netCdfWriter.closeFile(); 
    828859} 
     860CATCH 
    829861 
    830862/*! 
     
    836868void CDomainAlgorithmInterpolate::readInterpolationInfo(std::string& filename, 
    837869                                                        std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 
     870TRY 
    838871{ 
    839872  int ncid ; 
     
    894927      interpMapValue[dstIndex[ind]-indexOffset].push_back(make_pair(srcIndex[ind]-indexOffset,weight[ind])); 
    895928 } 
     929CATCH 
    896930 
    897931void CDomainAlgorithmInterpolate::apply(const std::vector<std::pair<int,double> >& localIndex, 
     
    900934                                            std::vector<bool>& flagInitial, 
    901935                                            bool ignoreMissingValue, bool firstPass  ) 
     936TRY 
    902937{ 
    903938  int nbLocalIndex = localIndex.size();    
     
    941976  } 
    942977} 
     978CATCH 
    943979 
    944980void CDomainAlgorithmInterpolate::updateData(CArray<double,1>& dataOut) 
     981TRY 
    945982{ 
    946983  if (detectMissingValue) 
     
    961998  } 
    962999} 
    963  
    964 } 
     1000CATCH 
     1001 
     1002} 
  • XIOS/dev/dev_olga/src/transformation/domain_algorithm_reorder.cpp

    r1457 r1612  
    1919                                                             std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2020                                                             std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     21TRY 
    2122{ 
    2223  std::vector<CDomain*> domainListDestP = gridDst->getDomains(); 
     
    2930  return (new CDomainAlgorithmReorder(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], reorderDomain)); 
    3031} 
     32CATCH 
    3133 
    3234bool CDomainAlgorithmReorder::registerTrans() 
     35TRY 
    3336{ 
    3437  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_REORDER_DOMAIN, create); 
    3538} 
     39CATCH 
    3640 
    3741CDomainAlgorithmReorder::CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain) 
    3842: CDomainAlgorithmTransformation(domainDestination, domainSource) 
     43TRY 
    3944{ 
    4045  reorderDomain->checkValid(domainSource); 
     
    109114    } 
    110115  } 
    111      
    112    
    113116} 
     117CATCH 
    114118 
    115119/*! 
  • XIOS/dev/dev_olga/src/transformation/domain_algorithm_transformation.cpp

    r1403 r1612  
    3636                                                                int elementType, 
    3737                                                                CClientClientDHTInt::Index2VectorInfoTypeMap& globalDomainIndexOnProc) 
     38TRY 
    3839{ 
    3940  CContext* context = CContext::getCurrent(); 
     
    6566  globalDomainIndexOnProc = dhtIndexProcRank.getInfoIndexMap(); 
    6667} 
     68CATCH 
    6769 
    6870} 
  • XIOS/dev/dev_olga/src/transformation/domain_algorithm_zoom.cpp

    r1609 r1612  
    1616                                                             std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    1717                                                             std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     18TRY 
    1819{ 
    1920  std::vector<CDomain*> domainListDestP = gridDst->getDomains(); 
     
    2627  return (new CDomainAlgorithmZoom(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], zoomDomain)); 
    2728} 
     29CATCH 
    2830 
    2931bool CDomainAlgorithmZoom::registerTrans() 
     32TRY 
    3033{ 
    3134  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_ZOOM_DOMAIN, create); 
    3235} 
     36CATCH 
    3337 
    3438CDomainAlgorithmZoom::CDomainAlgorithmZoom(CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain) 
    3539: CDomainAlgorithmTransformation(domainDestination, domainSource) 
     40TRY 
    3641{ 
    3742  zoomDomain->checkValid(domainSource); 
     
    269274 
    270275} 
     276CATCH 
    271277 
    272278/*! 
  • XIOS/dev/dev_olga/src/transformation/generic_algorithm_transformation.cpp

    r1599 r1612  
    3434                                            std::vector<bool>& flagInitial, 
    3535                                            bool ignoreMissingValue, bool firstPass  ) 
     36TRY 
    3637{ 
    3738  int nbLocalIndex = localIndex.size();    
     
    6162  } 
    6263} 
     64CATCH 
    6365 
    6466void CGenericAlgorithmTransformation::computePositionElements(CGrid* dst, CGrid* src) 
     67TRY 
    6568{ 
    6669  int idxScalar = 0, idxAxis = 0, idxDomain = 0; 
     
    108111  } 
    109112} 
     113CATCH 
    110114 
    111115bool CGenericAlgorithmTransformation::isDistributedTransformation(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst) 
     116TRY 
    112117{ 
    113118 
     
    147152  } 
    148153  return isDistributed_ ; 
    149  
     154} 
     155CATCH 
     156 
    150157/*! 
    151158  This function computes the global indexes of grid source, which the grid destination is in demand. 
     
    160167                                                               CGrid* gridDst, 
    161168                                                               SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 
     169TRY 
    162170 { 
    163171  CContext* context = CContext::getCurrent(); 
     
    443451  }   
    444452 } 
     453CATCH 
    445454 
    446455/*! 
     
    461470                                                                   std::vector<std::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc, 
    462471                                                                   SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 
     472TRY 
    463473{ 
    464474  SourceDestinationIndexMap globaIndexWeightFromSrcToDst_tmp ; 
     
    640650       } 
    641651     } 
    642  
    643 } 
     652} 
     653CATCH 
    644654 
    645655/*! 
     
    654664                                                                 CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    655665                                                                 std::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc) 
     666TRY 
    656667{ 
    657668  CContext* context = CContext::getCurrent(); 
     
    666677  } 
    667678} 
     679CATCH 
    668680 
    669681/*! 
     
    678690                                                               CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    679691                                                               std::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc) 
     692TRY 
    680693{ 
    681694  CContext* context = CContext::getCurrent(); 
     
    735748  } 
    736749} 
     750CATCH 
    737751 
    738752/*! 
     
    747761                                                                 CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    748762                                                                 std::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc) 
     763TRY 
    749764{ 
    750765  CContext* context = CContext::getCurrent(); 
     
    838853  } 
    839854} 
    840  
    841  
    842  
    843  
     855CATCH 
    844856 
    845857void CGenericAlgorithmTransformation::computeTransformationMappingNonDistributed(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst, 
    846858                                                                                 vector<int>& localSrc, vector<int>& localDst, vector<double>& weight, 
    847859                                                                                 int& nlocalIndexDest) 
     860TRY 
    848861{ 
    849862 
     
    10101023                
    10111024} 
     1025CATCH 
    10121026 
    10131027 
     
    10171031                                                                   int& t, vector<vector<vector<pair<int,double> > > >& dstIndWeight, int currentInd, 
    10181032                                                                   vector<int>& localSrc, vector<int>& localDst, vector<double>& weight) 
     1033TRY 
    10191034{ 
    10201035  int masked_ ; 
     
    10991114 
    11001115} 
     1116CATCH 
    11011117 
    11021118/*! 
     
    11061122*/ 
    11071123void CGenericAlgorithmTransformation::computeIndexSourceMapping(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     1124TRY 
    11081125{ 
    11091126  computeIndexSourceMapping_(dataAuxInputs); 
    11101127} 
     1128CATCH 
    11111129 
    11121130std::vector<StdString> CGenericAlgorithmTransformation::getIdAuxInputs() 
     1131TRY 
    11131132{ 
    11141133  return idAuxInputs_; 
    11151134} 
     1135CATCH 
    11161136 
    11171137CGenericAlgorithmTransformation::AlgoTransType CGenericAlgorithmTransformation::type() 
     1138TRY 
    11181139{ 
    11191140  return type_; 
    11201141} 
    1121  
    1122 } 
     1142CATCH 
     1143 
     1144} 
  • XIOS/dev/dev_olga/src/transformation/grid_generate.cpp

    r978 r1612  
    3030*/ 
    3131void CGridGenerate::selectScalarAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 
     32TRY 
    3233{ 
    3334  CGenericAlgorithmTransformation* algo = 0; 
    3435  algoTransformation_.push_back(algo); 
    3536} 
     37CATCH 
    3638 
    3739/*! 
     
    4345*/ 
    4446void CGridGenerate::selectAxisAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 
     47TRY 
    4548{ 
    4649  CGenericAlgorithmTransformation* algo = 0; 
    4750  algoTransformation_.push_back(algo); 
    4851} 
     52CATCH 
    4953 
    5054/*! 
     
    5660*/ 
    5761void CGridGenerate::selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 
     62TRY 
    5863{ 
    5964  std::vector<CDomain*> domainListDestP = gridDestination_->getDomains(); 
     
    8994  algoTransformation_.push_back(algo); 
    9095} 
     96CATCH 
    9197 
    9298/*! 
     
    94100*/ 
    95101void CGridGenerate::completeGrid() 
     102TRY 
    96103{ 
    97104  ListAlgoType::const_iterator itb = listAlgos_.begin(), 
     
    110117  } 
    111118} 
     119CATCH 
    112120 
    113121} 
  • XIOS/dev/dev_olga/src/transformation/grid_transformation.cpp

    r1589 r1612  
    3838*/ 
    3939void CGridTransformation::selectScalarAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 
     40TRY 
    4041{ 
    4142  std::vector<CScalar*> scaListDestP = gridDestination_->getScalars(); 
     
    5960  algoTransformation_.push_back(algo); 
    6061} 
     62CATCH 
    6163 
    6264/*! 
     
    6769*/ 
    6870void CGridTransformation::selectAxisAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 
     71TRY 
    6972{ 
    7073  std::vector<CAxis*> axisListDestP = gridDestination_->getAxis(); 
     
    8891  algoTransformation_.push_back(algo); 
    8992} 
     93CATCH 
    9094 
    9195/*! 
     
    96100*/ 
    97101void CGridTransformation::selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 
     102TRY 
    98103{ 
    99104  std::vector<CDomain*> domainListDestP = gridDestination_->getDomains(); 
     
    117122  algoTransformation_.push_back(algo); 
    118123} 
     124CATCH 
    119125 
    120126/*! 
     
    123129*/ 
    124130std::map<int,std::pair<int,int> > CGridTransformation::getElementPosition(CGrid* grid) 
     131TRY 
    125132{ 
    126133  std::vector<CScalar*> scalarListP = grid->getScalars();  
     
    155162  return elementPosition;   
    156163} 
     164CATCH 
    157165 
    158166/*! 
     
    163171*/ 
    164172void CGridTransformation::setUpGridDestination(int elementPositionInGrid, ETranformationType transType) 
     173TRY 
    165174{ 
    166175  if (isSpecialTransformation(transType)) return; 
     
    240249  tempGridDests_.push_back(tmpGridDestination_); 
    241250} 
     251CATCH 
    242252 
    243253/*! 
     
    249259*/ 
    250260void CGridTransformation::setUpGridSource(int elementPositionInGrid) 
     261TRY 
    251262{ 
    252263  if (!tempGridSrcs_.empty() && (getNbAlgo()-1) == tempGridSrcs_.size()) 
     
    326337  tempGridSrcs_.push_back(gridSource_); 
    327338} 
     339CATCH 
    328340 
    329341/*! 
     
    336348*/ 
    337349void CGridTransformation::computeAll(const std::vector<CArray<double,1>* >& dataAuxInputs, Time timeStamp) 
     350TRY 
    338351{ 
    339352  if (nbNormalAlgos_ < 1) return; 
     
    454467  } 
    455468} 
     469CATCH 
    456470 
    457471/*! 
     
    460474*/ 
    461475void CGridTransformation::computeTransformationMapping(const SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 
     476TRY 
    462477{ 
    463478  CContext* context = CContext::getCurrent(); 
     
    682697 
    683698} 
     699CATCH 
    684700 
    685701/*! 
     
    688704*/ 
    689705const std::list<CGridTransformation::SendingIndexGridSourceMap>& CGridTransformation::getLocalIndexToSendFromGridSource() const 
     706TRY 
    690707{ 
    691708  return localIndexToSendFromGridSource_; 
    692709} 
     710CATCH 
    693711 
    694712/*! 
     
    697715*/ 
    698716const std::list<CGridTransformation::RecvIndexGridDestinationMap>& CGridTransformation::getLocalIndexToReceiveOnGridDest() const 
     717TRY 
    699718{ 
    700719  return localIndexToReceiveOnGridDest_; 
    701720} 
     721CATCH 
    702722 
    703723/*! 
     
    706726*/ 
    707727const std::list<size_t>& CGridTransformation::getNbLocalIndexToReceiveOnGridDest() const 
     728TRY 
    708729{ 
    709730  return nbLocalIndexOnGridDest_; 
    710731} 
    711  
    712 } 
     732CATCH 
     733 
     734} 
  • XIOS/dev/dev_olga/src/transformation/grid_transformation_factory_impl.hpp

    r933 r1612  
    110110} 
    111111 
    112  
    113112} 
    114113#endif // __XIOS_GRID_TRANSFORMATION_FACTORY_HPP__ 
  • XIOS/dev/dev_olga/src/transformation/grid_transformation_selector.cpp

    r1558 r1612  
    4747 : gridSource_(source), gridDestination_(destination), isSameGrid_(false), 
    4848  listAlgos_(), algoTypes_(), nbNormalAlgos_(0), nbSpecialAlgos_(0), auxInputs_() 
     49TRY 
    4950{ 
    5051  if (0 == source) 
     
    6263  initializeTransformations(type); 
    6364} 
     65CATCH 
    6466 
    6567/*! 
     
    7072*/ 
    7173void CGridTransformationSelector::initializeTransformations(TransformationType type) 
     74TRY 
    7275{ 
    7376  // Initialize algorithms 
     
    100103  } 
    101104} 
     105CATCH 
    102106 
    103107CGridTransformationSelector::~CGridTransformationSelector() 
     108TRY 
    104109{ 
    105110  std::vector<CGenericAlgorithmTransformation*>::const_iterator itb = algoTransformation_.begin(), it, 
     
    107112  for (it = itb; it != ite; ++it) delete (*it); 
    108113} 
     114CATCH 
    109115 
    110116/*! 
     
    112118*/ 
    113119void CGridTransformationSelector::updateElementPosition() 
     120TRY 
    114121{ 
    115122  int idxScalar = 0, idxAxis = 0, idxDomain = 0; 
     
    163170  } 
    164171} 
     172CATCH 
    165173 
    166174/*! 
     
    168176*/ 
    169177void CGridTransformationSelector::initializeAlgorithms() 
     178TRY 
    170179{ 
    171180  updateElementPosition(); 
     
    188197  } 
    189198} 
     199CATCH 
    190200 
    191201/*! 
     
    197207*/ 
    198208void CGridTransformationSelector::initializeScalarAlgorithms(int scalarPositionInGrid) 
     209TRY 
    199210{ 
    200211  std::vector<CScalar*> scalarListDestP = gridDestination_->getScalars(); 
     
    229240  } 
    230241} 
     242CATCH 
    231243 
    232244/*! 
     
    238250*/ 
    239251void CGridTransformationSelector::initializeAxisAlgorithms(int axisPositionInGrid) 
     252TRY 
    240253{ 
    241254  std::vector<CAxis*> axisListDestP = gridDestination_->getAxis(); 
     
    270283  } 
    271284} 
     285CATCH 
    272286 
    273287/*! 
     
    278292*/ 
    279293void CGridTransformationSelector::initializeDomainAlgorithms(int domPositionInGrid) 
     294TRY 
    280295{ 
    281296  std::vector<CDomain*> domListDestP = gridDestination_->getDomains(); 
     
    309324    } 
    310325  } 
    311  
    312 } 
     326} 
     327CATCH 
    313328 
    314329/*! 
     
    321336*/ 
    322337void CGridTransformationSelector::selectAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder, int algoType) 
     338TRY 
    323339{ 
    324340  updateElementPosition(); 
     
    338354  } 
    339355} 
     356CATCH 
    340357 
    341358bool CGridTransformationSelector::isSpecialTransformation(ETranformationType transType) 
     359TRY 
    342360{ 
    343361  bool res = false; 
     
    353371  return res; 
    354372} 
    355  
    356 } 
     373CATCH 
     374 
     375} 
  • XIOS/dev/dev_olga/src/transformation/scalar_algorithm_extract_axis.cpp

    r1260 r1612  
    2626                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2727                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     28TRY 
    2829{ 
    2930  std::vector<CScalar*> scalarListDestP = gridDst->getScalars(); 
     
    3637  return (new CScalarAlgorithmExtractAxis(scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], extractAxis)); 
    3738} 
     39CATCH 
    3840 
    3941bool CScalarAlgorithmExtractAxis::registerTrans() 
     42TRY 
    4043{ 
    4144  CGridTransformationFactory<CScalar>::registerTransformation(TRANS_EXTRACT_AXIS_TO_SCALAR, create); 
    4245} 
     46CATCH 
    4347 
    4448CScalarAlgorithmExtractAxis::CScalarAlgorithmExtractAxis(CScalar* scalarDestination, CAxis* axisSource, CExtractAxisToScalar* algo) 
    4549 : CScalarAlgorithmTransformation(scalarDestination, axisSource), 
    4650   reduction_(0) 
     51TRY 
    4752{ 
    4853  algo->checkValid(scalarDestination, axisSource); 
     
    5156  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 
    5257} 
     58CATCH 
    5359 
    5460void CScalarAlgorithmExtractAxis::apply(const std::vector<std::pair<int,double> >& localIndex, 
     
    5763                                         std::vector<bool>& flagInitial,                      
    5864                                         bool ignoreMissingValue, bool firstPass) 
     65TRY 
    5966{ 
    6067  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    6168} 
     69CATCH 
    6270 
    6371CScalarAlgorithmExtractAxis::~CScalarAlgorithmExtractAxis() 
     72TRY 
    6473{ 
    6574  if (0 != reduction_) delete reduction_; 
    6675} 
     76CATCH 
    6777 
    6878void CScalarAlgorithmExtractAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     79TRY 
    6980{ 
    7081  this->transformationMapping_.resize(1); 
     
    7788  transWeight[0].push_back(1.0); 
    7889} 
     90CATCH 
    7991 
    8092} 
  • XIOS/dev/dev_olga/src/transformation/scalar_algorithm_reduce_axis.cpp

    r1297 r1612  
    2727                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2828                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     29TRY 
    2930{ 
    3031  std::vector<CScalar*> scalarListDestP = gridDst->getScalars(); 
     
    3738  return (new CScalarAlgorithmReduceAxis(scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], reduceAxis)); 
    3839} 
     40CATCH 
    3941 
    4042bool CScalarAlgorithmReduceAxis::registerTrans() 
     43TRY 
    4144{ 
    4245  CGridTransformationFactory<CScalar>::registerTransformation(TRANS_REDUCE_AXIS_TO_SCALAR, create); 
    4346} 
     47CATCH 
    4448 
    4549CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo) 
    4650 : CScalarAlgorithmTransformation(scalarDestination, axisSource), 
    4751   reduction_(0) 
     52TRY 
    4853{ 
    4954  if (algo->operation.isEmpty()) 
     
    8388  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 
    8489} 
     90CATCH 
    8591 
    8692void CScalarAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex, const double* dataInput, CArray<double,1>& dataOut, 
    8793                                         std::vector<bool>& flagInitial, bool ignoreMissingValue, bool firstPass) 
     94TRY 
    8895{ 
    8996  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    9097} 
     98CATCH 
    9199 
    92100void CScalarAlgorithmReduceAxis::updateData(CArray<double,1>& dataOut) 
     101TRY 
    93102{ 
    94103  reduction_->updateData(dataOut); 
    95104} 
     105CATCH 
    96106 
    97107CScalarAlgorithmReduceAxis::~CScalarAlgorithmReduceAxis() 
     108TRY 
    98109{ 
    99110  if (0 != reduction_) delete reduction_; 
    100111} 
     112CATCH 
    101113 
    102114void CScalarAlgorithmReduceAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     115TRY 
    103116{ 
    104117  this->transformationMapping_.resize(1); 
     
    116129  } 
    117130} 
     131CATCH 
    118132 
    119133} 
  • XIOS/dev/dev_olga/src/transformation/scalar_algorithm_reduce_domain.cpp

    r1396 r1612  
    2626                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2727                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     28TRY 
    2829{ 
    2930  std::vector<CScalar*> scalarListDestP = gridDst->getScalars(); 
     
    3637  return (new CScalarAlgorithmReduceDomain(scalarListDestP[scalarDstIndex], domainListSrcP[domainSrcIndex], reduceDomain)); 
    3738} 
     39CATCH 
    3840 
    3941bool CScalarAlgorithmReduceDomain::registerTrans() 
     42TRY 
    4043{ 
    4144  CGridTransformationFactory<CScalar>::registerTransformation(TRANS_REDUCE_DOMAIN_TO_SCALAR, create); 
    4245} 
     46CATCH 
    4347 
    4448CScalarAlgorithmReduceDomain::CScalarAlgorithmReduceDomain(CScalar* scalarDestination, CDomain* domainSource, CReduceDomainToScalar* algo) 
    4549 : CScalarAlgorithmTransformation(scalarDestination, domainSource), 
    4650   reduction_(0) 
     51TRY 
    4752{ 
    4853  algo->checkValid(scalarDestination, domainSource); 
     
    8085  local = algo->local ; 
    8186} 
     87CATCH 
    8288 
    8389void CScalarAlgorithmReduceDomain::apply(const std::vector<std::pair<int,double> >& localIndex, 
     
    8692                                         std::vector<bool>& flagInitial,                      
    8793                                         bool ignoreMissingValue, bool firstPass) 
     94TRY 
    8895{ 
    8996  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    9097} 
     98CATCH 
    9199 
    92100void CScalarAlgorithmReduceDomain::updateData(CArray<double,1>& dataOut) 
     101TRY 
    93102{ 
    94103  reduction_->updateData(dataOut); 
    95104} 
     105CATCH 
    96106 
    97107CScalarAlgorithmReduceDomain::~CScalarAlgorithmReduceDomain() 
     108TRY 
    98109{ 
    99110  if (0 != reduction_) delete reduction_; 
    100111} 
     112CATCH 
    101113 
    102114void CScalarAlgorithmReduceDomain::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     115TRY 
    103116{ 
    104117  this->transformationMapping_.resize(1); 
     
    137150   
    138151} 
     152CATCH 
    139153 
    140154} 
  • XIOS/dev/dev_olga/src/transformation/scalar_algorithm_reduce_scalar.cpp

    r1314 r1612  
    2222                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2323                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     24TRY 
    2425{ 
    2526  std::vector<CScalar*> scalarListDestP = gridDst->getScalars(); 
     
    3233  return (new CScalarAlgorithmReduceScalar(scalarListDestP[scalarDstIndex], scalarListSrcP[scalarSrcIndex], reduceScalar)); 
    3334} 
     35CATCH 
    3436 
    3537bool CScalarAlgorithmReduceScalar::registerTrans() 
     38TRY 
    3639{ 
    3740  CGridTransformationFactory<CScalar>::registerTransformation(TRANS_REDUCE_SCALAR_TO_SCALAR, create); 
    3841} 
     42CATCH 
    3943 
    4044CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo) 
    4145 : CScalarAlgorithmTransformation(scalarDestination, scalarSource), 
    4246   reduction_(0) 
     47TRY 
    4348{ 
    4449  eliminateRedondantSrc_= false ; 
     
    7984  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 
    8085} 
     86CATCH 
    8187 
    8288void CScalarAlgorithmReduceScalar::apply(const std::vector<std::pair<int,double> >& localIndex, const double* dataInput, CArray<double,1>& dataOut, 
    8389                                         std::vector<bool>& flagInitial, bool ignoreMissingValue, bool firstPass) 
     90TRY 
    8491{ 
    8592  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    8693} 
     94CATCH 
    8795 
    8896void CScalarAlgorithmReduceScalar::updateData(CArray<double,1>& dataOut) 
     97TRY 
    8998{ 
    9099  reduction_->updateData(dataOut); 
    91100} 
     101CATCH 
    92102 
    93103CScalarAlgorithmReduceScalar::~CScalarAlgorithmReduceScalar() 
     104TRY 
    94105{ 
    95106  if (0 != reduction_) delete reduction_; 
    96107} 
     108CATCH 
    97109 
    98110void CScalarAlgorithmReduceScalar::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     111TRY 
    99112{ 
    100113  this->transformationMapping_.resize(1); 
     
    108121 
    109122} 
     123CATCH 
    110124 
    111125} 
  • XIOS/dev/dev_olga/src/transformation/scalar_algorithm_transformation.cpp

    r1403 r1612  
    5757                                                                int elementSourceType, 
    5858                                                                CClientClientDHTInt::Index2VectorInfoTypeMap& globalIndexElementSourceOnProc) 
     59TRY 
    5960{ 
    6061  CContext* context = CContext::getCurrent(); 
     
    121122  } 
    122123} 
    123  
     124CATCH 
    124125} 
  • XIOS/dev/dev_olga/src/type/type.hpp

    r1478 r1612  
    4040    virtual void fromString(const string& str)   { _fromString(str); } 
    4141    virtual string toString(void) const { return _toString(); } 
     42    virtual string dump(void) const { return _toString(); } 
    4243    virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer) ; } 
    4344    virtual bool toBuffer(CBufferOut& buffer) const { return _toBuffer(buffer); } 
  • XIOS/dev/dev_olga/src/xios_spl.hpp

    r1542 r1612  
    3131/// boost headers /// 
    3232#include <boost/cast.hpp> 
     33#include <boost/current_function.hpp> 
    3334/// Map /// 
    3435#define xios_map std::map 
  • XIOS/dev/dev_olga/src/xml_parser.cpp

    r1158 r1612  
    1414 
    1515      void CXMLParser::ParseFile(const StdString & filename, const std::set<StdString>& parseContextList) 
     16      TRY 
    1617      { 
    1718         StdIFStream ifs ( filename.c_str() , StdIFStream::in ); 
     
    2223         CXMLParser::ParseStream(ifs, filename, parseContextList); 
    2324      } 
     25      CATCH 
    2426 
    2527      void CXMLParser::ParseString(const StdString & xmlContent) 
     
    5456            std::set<StdString>::const_iterator itE = parseContextList.end(); 
    5557            bool isParseAll = (parseContextList.empty()); 
    56             if (node.goToChildElement()) 
     58            try 
    5759            { 
    58                do 
    59                { 
    60                   CContextGroup* group_context = CContext::getRoot() ; 
     60              if (node.goToChildElement()) 
     61              { 
     62                 do 
     63                 { 
     64                    CContextGroup* group_context = CContext::getRoot() ; 
    6165 
    62                   attributes = node.getAttributes(); 
     66                    attributes = node.getAttributes(); 
    6367 
    64                   if (attributes.end() == attributes.find("id")) 
    65                   { 
    66                      DEBUG("The context will not be processed because it is not identified (missing id)"); 
    67                      continue; 
    68                   } 
     68                    if (attributes.end() == attributes.find("id")) 
     69                    { 
     70                       DEBUG("The context will not be processed because it is not identified (missing id)"); 
     71                       continue; 
     72                    } 
    6973 
    70                   CContext::setCurrent(attributes["id"]) ; 
     74                    CContext::setCurrent(attributes["id"]) ; 
    7175 
    72  
    73                   if (isParseAll) 
    74                   { 
    75                     CContext* context = CContext::create(attributes["id"]); 
    76                     context->parse(node); 
    77  
    78                     attributes.clear(); 
    79                   } 
    80                   else 
    81                   { 
    82                     it = parseContextList.find(attributes["id"]); 
    83                     if (itE != it) 
     76                    if (isParseAll) 
    8477                    { 
    85                       CContext* context = CContext::create(*it); 
     78                      CContext* context = CContext::create(attributes["id"]); 
    8679                      context->parse(node); 
    8780 
    8881                      attributes.clear(); 
    8982                    } 
    90                   } 
    91                } while (node.goToNextElement()); 
     83                    else 
     84                    { 
     85                      it = parseContextList.find(attributes["id"]); 
     86                      if (itE != it) 
     87                      { 
     88                        CContext* context = CContext::create(*it); 
     89                        context->parse(node); 
     90 
     91                        attributes.clear(); 
     92                      } 
     93                    } 
     94                 } while (node.goToNextElement()); 
     95              } 
    9296            } 
     97            catch(CException& e) 
     98            { 
     99              CException::StackInfo stk; 
     100              stk.info.append("Exception occurred while parsing XML file \""); 
     101              stk.info.append(attributes["src"]); 
     102              stk.info.append("\".\n"); 
     103              stk.file = FILE_NAME; 
     104              stk.function = FUNCTION_NAME; 
     105              stk.line = __LINE__; 
     106              e.stack.push_back(stk); 
     107              if (CXios::xiosStack) 
     108                throw; 
     109             else 
     110               throw 0; 
     111            } 
     112            catch(...) 
     113            { 
     114              CException exc; 
     115              CException::StackInfo stk; 
     116              stk.info.append("Exception occurred while parsing XML file \""); 
     117              stk.info.append(attributes["src"]); 
     118              stk.info.append("\".\n"); 
     119              stk.file = FILE_NAME; 
     120              stk.function = FUNCTION_NAME; 
     121              stk.line = __LINE__; 
     122              exc.stack.push_back(stk); 
     123              if (CXios::xiosStack) 
     124                throw exc; 
     125             else 
     126               throw 0; 
     127            } 
     128 
    93129         } 
    94130         catch (rapidxml::parse_error & exc) 
     
    110146                  << "Error is occuring when parsing XML flux from <"<<fluxId<<"> at character "<< pos<<" line "<<lineNumber<<" column "<< columnNumber<< endl 
    111147                  << strLine<<endl 
    112                   << string(columnNumber-1,'x')<<'^'<<endl 
    113                   <<" Error : " << exc.what() ) 
     148                  << string(columnNumber-1,'x')<<'^'<<endl) 
     149//                  <<" Error : " << exc.what() ) 
    114150         } 
    115151      } 
  • XIOS/dev/dev_olga/src/xml_parser.hpp

    r591 r1612  
    55#include "xios_spl.hpp" 
    66#include "exception.hpp" 
     7#include "cxios.hpp" 
    78#include "xml_node.hpp" 
    89 
  • XIOS/dev/dev_olga/src/xml_parser_impl.hpp

    r591 r1612  
    3939                  << "Error is occuring when parsing XML flux from <"<<fluxId<<"> at character "<< pos<<" line "<<lineNumber<<" column "<< columnNumber<< endl 
    4040                  << strLine<<endl 
    41                   << string(columnNumber-1,'x')<<'^'<<endl 
    42                   <<" Error : " << exc.what() ) 
     41                  << string(columnNumber-1,'x')<<'^'<<endl) 
     42//                  <<" Error : " << exc.what() ) 
    4343         } 
    4444      } 
Note: See TracChangeset for help on using the changeset viewer.