Changeset 1087 for XIOS


Ignore:
Timestamp:
04/12/17 11:55:38 (7 years ago)
Author:
yushan
Message:

save modif from local. context_init/finalize OK

Location:
XIOS/dev/branch_yushan
Files:
3 added
12 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan/extern/src_ep_dev/ep_fortran.cpp

    r1085 r1087  
    2525    std::map<std::pair<int, int>, MPI_Comm > ::iterator it; 
    2626     
    27     it = fc_comm_map.find(std::make_pair(fint, omp_get_thread_num())); 
    28     if(it == fc_comm_map.end()) 
     27    #pragma omp critical (fc_comm_map) 
    2928    { 
    30       fc_comm_map.insert(std::make_pair( std::make_pair( fint, omp_get_thread_num()) , comm)); 
    31       printf("EP_Comm_c2f : MAP insert: %d, %d, %p\n", fint, omp_get_thread_num(), comm.ep_comm_ptr); 
     29      it = fc_comm_map.find(std::make_pair(fint, omp_get_thread_num())); 
     30      if(it == fc_comm_map.end()) 
     31      { 
     32        fc_comm_map.insert(std::make_pair( std::make_pair( fint, omp_get_thread_num()) , comm)); 
     33        printf("EP_Comm_c2f : MAP insert: %d, %d, %p\n", fint, omp_get_thread_num(), comm.ep_comm_ptr); 
     34      } 
    3235    } 
    3336     
     
    4447    std::map<std::pair<int, int>, MPI_Comm > ::iterator it; 
    4548     
     49    #pragma omp critical (fc_comm_map) 
    4650    it = fc_comm_map.find(std::make_pair(comm, omp_get_thread_num())); 
     51     
    4752    if(it != fc_comm_map.end()) 
    4853    { 
     
    5257      return  comm_ptr; 
    5358    } 
    54     else 
    55     {       
     59        
    5660       
    57       #ifdef _openmpi 
    58       ::MPI_Comm base_comm = ::MPI_Comm_f2c(comm); 
    59       #elif _intelmpi 
    60       ::MPI_Comm base_comm = (::MPI_Comm)(comm); 
    61       #endif 
     61    #ifdef _openmpi 
     62    ::MPI_Comm base_comm = ::MPI_Comm_f2c(comm); 
     63    #elif _intelmpi 
     64    ::MPI_Comm base_comm = (::MPI_Comm)(comm); 
     65    #endif 
    6266 
    63       if(base_comm != MPI_COMM_NULL_STD) 
     67    if(base_comm != MPI_COMM_NULL_STD) 
     68    { 
     69      if(omp_get_thread_num() == 0) 
    6470      { 
    65         if(omp_get_thread_num() == 0) 
    66         { 
    67           int num_ep = omp_get_num_threads(); 
    68           MPI_Comm *new_comm; 
    69           MPI_Info info; 
    70           MPI_Comm_create_endpoints(base_comm, num_ep, info, new_comm); 
    71           passage = new_comm; 
    72         } 
    73         #pragma omp barrier 
     71        int num_ep = omp_get_num_threads(); 
     72        MPI_Comm *new_comm; 
     73        MPI_Info info; 
     74        MPI_Comm_create_endpoints(base_comm, num_ep, info, new_comm); 
     75        passage = new_comm; 
     76      } 
     77      #pragma omp barrier 
    7478 
    75         MPI_Comm return_comm = passage[omp_get_thread_num()]; 
    76         return return_comm; 
     79      MPI_Comm return_comm = passage[omp_get_thread_num()]; 
     80      return return_comm; 
    7781         
    78       } 
    79       return MPI_COMM_NULL; 
    80        
    8182    } 
     83    return MPI_COMM_NULL; 
     84 
    8285  } 
    83  
    84   // #ifdef _intelmpi 
    85  
    86   // MPI_Fint MPI_Comm_c2f(MPI_Comm comm) 
    87   // { 
    88   //   Debug("MPI_Comm_c2f"); 
    89   //   int fint; 
    90   //   fint = (::MPI_Fint)(comm.mpi_comm); 
    91      
    92   //   std::map<std::pair<int, int>, MPI_Comm  > ::iterator it; 
    93      
    94   //   it = fc_comm_map.find(std::make_pair(fint, omp_get_thread_num())); 
    95   //   if(it == fc_comm_map.end()) 
    96   //   { 
    97   //     fc_comm_map.insert(std::make_pair( std::make_pair( fint, omp_get_thread_num()) , comm)); 
    98   //     printf("MAP insert: %d, %d, %p\n", fint, omp_get_thread_num(), &comm); 
    99   //   } 
    100      
    101   //   MPI_Fint Fint; 
    102   //   Fint.mpi_fint = fint; 
    103   //   return Fint; 
    104      
    105   // } 
    106  
    107    
    108  
    109  
    110   // MPI_Comm MPI_Comm_f2c(MPI_Fint comm) 
    111   // { 
    112   //   Debug("MPI_Comm_f2c"); 
    113      
    114      
    115   //   std::map<std::pair<int, int>, MPI_Comm  > ::iterator it; 
    116      
    117   //   it = fc_comm_map.find(std::make_pair(comm.mpi_fint, omp_get_thread_num())); 
    118   //   if(it != fc_comm_map.end()) 
    119   //   { 
    120   //     MPI_Comm comm_ptr; 
    121   //     comm_ptr =  it->second; 
    122   //     printf("MAP find: %d, %d, %p\n", it->first.first, it->first.second, &comm_ptr); 
    123   //     return  comm_ptr; 
    124   //   } 
    125   //   else 
    126   //   {       
    127   //     MPI_Comm return_comm; 
    128   //     return_comm.mpi_comm = (::MPI_Comm)(comm.mpi_fint); 
    129   //     return return_comm; 
    130   //   } 
    131   // } 
    132  
    133    
    134  
    135   // #elif _openmpi 
    136    
    137   // int MPI_Comm_c2f(MPI_Comm comm) 
    138   // { 
    139   //   Debug("MPI_Comm_c2f"); 
    140   //   int fint; 
    141   //   fint = ::MPI_Comm_c2f(static_cast< ::MPI_Comm>(comm.mpi_comm)); 
    142      
    143   //   std::map<std::pair<int, int>, MPI_Comm > ::iterator it; 
    144      
    145   //   it = fc_comm_map.find(std::make_pair(fint, omp_get_thread_num())); 
    146   //   if(it == fc_comm_map.end()) 
    147   //   { 
    148   //     fc_comm_map.insert(std::make_pair( std::make_pair( fint, omp_get_thread_num()) , comm)); 
    149   //     printf("MAP insert: %d, %d, %p\n", fint, omp_get_thread_num(), &comm); 
    150   //   } 
    151      
    152   //   return fint; 
    153      
    154   // } 
    155  
    156   // ep_lib::MPI_Comm MPI_Comm_f2c(MPI_Fint comm) 
    157   // { 
    158   //   Debug("MPI_Comm_f2c"); 
    159      
    160      
    161   //   std::map<std::pair<int, int>, MPI_Comm > ::iterator it; 
    162      
    163   //   it = fc_comm_map.find(std::make_pair(comm, omp_get_thread_num())); 
    164   //   if(it != fc_comm_map.end()) 
    165   //   { 
    166   //     MPI_Comm comm_ptr; 
    167   //     comm_ptr =  it->second; 
    168   //     printf("MAP find: %d, %d, %p\n", it->first.first, it->first.second, &comm_ptr); 
    169   //     return  comm_ptr; 
    170   //   } 
    171   //   else 
    172   //   {       
    173   //     MPI_Comm return_comm; 
    174   //     return_comm.mpi_comm = (::MPI_Comm)(comm); 
    175   //     return return_comm; 
    176   //   } 
    177   // } 
    178   // #endif 
    17986 
    18087} 
  • XIOS/dev/branch_yushan/extern/src_ep_dev/ep_type.hpp

    r1081 r1087  
    485485 
    486486  static std::map<std::pair<int, int>, MPI_Comm >  fc_comm_map; 
     487 
     488  static std::map<std::pair<int, int>, MPI_Comm >  *fc_comm_map_ptr; 
     489  #pragma omp threadprivate(fc_comm_map_ptr) 
    487490            //    <MPI_Fint,thread_num>   EP_Comm 
    488491 
  • XIOS/dev/branch_yushan/src/client.cpp

    r1085 r1087  
    1717    MPI_Comm CClient::intraComm ; 
    1818    MPI_Comm CClient::interComm ; 
    19     std::list<MPI_Comm> *CClient::contextInterComms_ptr; 
     19    std::list<MPI_Comm> *CClient::contextInterComms_ptr = 0; 
    2020    int CClient::serverLeader ; 
    2121    bool CClient::is_MPI_Initialized ; 
     
    177177       
    178178      #pragma omp critical (_output) 
    179       printf("Client %d : Client::registerContext context add = %p\n", tmp_rank, &(*context)); 
     179      printf("Client %d : client.cpp Client::registerContext context add = %p\n", tmp_rank, &(*context)); 
    180180       
    181181       
     
    222222        MPI_Barrier(inter) ; 
    223223 
    224         #pragma omp critical (_output) 
    225         printf("Client %d context=CContext::create(%s) OK, context.identifier = %d\n", getRank(), id, context->get_identifier()); 
    226224         
    227225        context->initClient(contextComm,contextInterComm) ; 
     
    230228        printf("Client %d : context->initClient(contextComm,contextInterComm) OK \n", getRank()) ; 
    231229         
    232  
     230        //contextInterComms->push_back(contextInterComm); 
     231        if(contextInterComms_ptr == NULL) contextInterComms_ptr = new std::list<MPI_Comm>; 
    233232        contextInterComms_ptr->push_back(contextInterComm); 
     233         
    234234        MPI_Comm_free(&inter); 
    235235      } 
     
    248248        // Finally, we should return current context to context client 
    249249        CContext::setCurrent(id); 
    250  
     250         
     251        if(contextInterComms_ptr == NULL) contextInterComms_ptr = new std::list<MPI_Comm>; 
    251252        contextInterComms_ptr->push_back(contextInterComm); 
     253        //contextInterComms->push_back(contextInterComm); 
    252254      } 
    253255    } 
  • XIOS/dev/branch_yushan/src/client.hpp

    r1085 r1087  
    2222 
    2323        //static std::list<MPI_Comm> contextInterComms; 
    24         std::list<MPI_Comm> contextInterComms; 
     24         
    2525        static std::list<MPI_Comm> * contextInterComms_ptr; 
    2626        #pragma omp threadprivate(contextInterComms_ptr) 
  • XIOS/dev/branch_yushan/src/group_factory.hpp

    r1080 r1087  
    7070         /// Propriétés statiques /// 
    7171         static StdString CurrContext; 
    72          //#pragma omp threadprivate(CurrContext) 
     72         #pragma omp threadprivate(CurrContext) 
    7373 
    7474   }; // class CGroupFactory 
  • XIOS/dev/branch_yushan/src/node/context.cpp

    r1081 r1087  
    1818namespace xios { 
    1919 
    20   shared_ptr<CContextGroup> CContext::root; 
     20  //shared_ptr<CContextGroup> CContext::root; 
     21  shared_ptr<CContextGroup> * CContext::root_ptr = 0; 
    2122 
    2223   /// ////////////////////// Dfinitions ////////////////////// /// 
     
    5455   CContextGroup* CContext::getRoot(void) 
    5556   { 
    56       if (root.get()==NULL) root=shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 
    57       return root.get(); 
     57      //if (root.get()==NULL) root=shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 
     58      //return root.get(); 
     59 
     60      //static shared_ptr<CContextGroup> *root_ptr; 
     61      if(root_ptr == 0) //root_ptr = new shared_ptr<CContextGroup>; 
     62      // if (root_ptr->get()==NULL)  
     63      root_ptr = new shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 
     64      return root_ptr->get(); 
    5865   } 
    5966 
     
    243250     client = new CContextClient(this, intraComm, interComm, cxtServer); 
    244251 
    245  
    246252     int tmp_rank; 
    247253     MPI_Comm_rank(intraComm, &tmp_rank); 
    248254     MPI_Barrier(intraComm); 
     255 
     256     #pragma omp critical (_output) 
     257     printf("Client %d : context.cpp client = new CContextClient, client add = %p, clientRank = %d\n", tmp_rank, &(*client), client->clientRank) ; 
    249258      
    250259     #pragma omp critical 
     
    255264      
    256265     #pragma omp critical (_output) 
    257      printf("Client %d : registryIn->setPath(getId()=%s), clientRank = %d (%p) \n", tmp_rank, getId(), client->clientRank, &(client->clientRank)) ; 
    258      printf("Client %d : context.identifier = %d\n", tmp_rank, this->get_identifier()); 
     266     printf("Client %d : context.cpp registryIn->setPath, client add = %p, clientRank = %d\n", tmp_rank, &(*client), client->clientRank) ; 
    259267 
    260268     if (client->clientRank==0) registryIn->fromFile("xios_registry.bin") ; 
     
    264272     registryOut->setPath(getId()) ; 
    265273      
    266      #pragma omp critical (_output) 
    267      printf("Client %d : registryOut->setPath(getId()=%s) \n", tmp_rank, getId()) ; 
    268274 
    269275     ep_lib::MPI_Comm intraCommServer, interCommServer; 
     
    12031209    CContext* context = CObjectFactory::CreateObject<CContext>(id).get(); 
    12041210    getRoot(); 
    1205     if (!hasctxt) CGroupFactory::AddChild(root, context->getShared()); 
     1211    //if (!hasctxt) CGroupFactory::AddChild(root, context->getShared()); 
     1212    if (!hasctxt) CGroupFactory::AddChild(*root_ptr, context->getShared()); 
    12061213 
    12071214#define DECLARE_NODE(Name_, name_) \ 
     
    12131220  } 
    12141221 
    1215   int CContext::get_identifier() 
    1216   { 
    1217     return this->identifier; 
    1218   } 
    12191222 
    12201223 
  • XIOS/dev/branch_yushan/src/node/context.hpp

    r1081 r1087  
    208208 
    209209         // Context root 
    210          static shared_ptr<CContextGroup> root; 
    211          // #pragma omp threadprivate(root) 
     210         //static shared_ptr<CContextGroup> root; 
     211 
     212         static shared_ptr<CContextGroup> *root_ptr; 
     213         #pragma omp threadprivate(root_ptr) 
    212214 
    213215         // Determine context on client or not 
     
    235237         std::list<ep_lib::MPI_Comm> comms; //!< Communicators allocated internally 
    236238 
    237          int identifier; 
    238  
    239239      public: // Some function maybe removed in the near future 
    240          int get_identifier(); 
    241240        // virtual void toBinary  (StdOStream & os) const; 
    242241        // virtual void fromBinary(StdIStream & is); 
  • XIOS/dev/branch_yushan/src/object_factory.hpp

    r1080 r1087  
    6060         /// Propriétés statiques /// 
    6161         static StdString CurrContext; 
    62          //#pragma omp threadprivate(CurrContext) 
     62         #pragma omp threadprivate(CurrContext) 
    6363 
    6464   }; // class CObjectFactory 
  • XIOS/dev/branch_yushan/src/object_factory_impl.hpp

    r769 r1087  
    1313         ERROR("CObjectFactory::GetObjectNum(void)", 
    1414               << "please define current context id !"); 
    15       return (U::AllVectObj[CObjectFactory::CurrContext].size()); 
     15 
     16      if(U::AllVectObj == NULL) return 0; 
     17       
     18       
     19      return (*U::AllVectObj)[CObjectFactory::CurrContext].size(); 
    1620   } 
    1721 
     
    2226         ERROR("CObjectFactory::GetObjectIdNum(void)", 
    2327               << "please define current context id !"); 
    24       return (U::AllMapObj[CObjectFactory::CurrContext].size()); 
     28      if(U::AllMapObj  == NULL) return 0; 
     29 
     30       
     31 
     32      return (* U::AllMapObj) [CObjectFactory::CurrContext].size(); 
    2533   } 
    2634 
     
    3139         ERROR("CObjectFactory::HasObject(const StdString & id)", 
    3240               << "[ id = " << id << " ] please define current context id !"); 
    33       return (U::AllMapObj[CObjectFactory::CurrContext].find(id) != 
    34               U::AllMapObj[CObjectFactory::CurrContext].end()); 
     41       
     42      if(U::AllMapObj  == NULL)  return false; 
     43 
     44       
     45 
     46      return ((*U::AllMapObj)[CObjectFactory::CurrContext].find(id) != 
     47              (*U::AllMapObj)[CObjectFactory::CurrContext].end()); 
    3548   } 
    3649 
     
    3851      bool CObjectFactory::HasObject(const StdString & context, const StdString & id) 
    3952   { 
    40       if (U::AllMapObj.find(context) == U::AllMapObj.end()) return false ; 
    41       else return (U::AllMapObj[context].find(id) !=  U::AllMapObj[context].end()); 
     53      if(U::AllMapObj  == NULL) return false; 
     54 
     55      if (U::AllMapObj->find(context) == U::AllMapObj->end()) return false ; 
     56 
     57      else 
     58      { 
     59         return ((*U::AllMapObj)[context].find(id) !=  (*U::AllMapObj)[context].end()); 
     60      }  
     61          
    4262   } 
    4363 
     
    4565      boost::shared_ptr<U> CObjectFactory::GetObject(const U * const object) 
    4666   { 
     67      if(U::AllVectObj == NULL) return (boost::shared_ptr<U>()); 
     68    
    4769      if (CurrContext.size() == 0) 
    4870         ERROR("CObjectFactory::GetObject(const U * const object)", 
    4971               << "please define current context id !"); 
    5072      std::vector<boost::shared_ptr<U> > & vect = 
    51                      U::AllVectObj[CObjectFactory::CurrContext]; 
     73                     (*U::AllVectObj)[CObjectFactory::CurrContext]; 
    5274 
    5375      typename std::vector<boost::shared_ptr<U> >::const_iterator 
     
    7092      boost::shared_ptr<U> CObjectFactory::GetObject(const StdString & id) 
    7193   { 
     94      if(U::AllMapObj  == NULL) return (boost::shared_ptr<U>()); 
     95 
    7296      if (CurrContext.size() == 0) 
    7397         ERROR("CObjectFactory::GetObject(const StdString & id)", 
     
    77101               << "[ id = " << id << ", U = " << U::GetName() << " ] " 
    78102               << "object was not found."); 
    79       return (U::AllMapObj[CObjectFactory::CurrContext][id]); 
     103      return (*U::AllMapObj)[CObjectFactory::CurrContext][id]; 
    80104   } 
    81105 
     
    83107      boost::shared_ptr<U> CObjectFactory::GetObject(const StdString & context, const StdString & id) 
    84108   { 
     109      if(U::AllMapObj  == NULL) return (boost::shared_ptr<U>()); 
     110 
    85111      if (!CObjectFactory::HasObject<U>(context,id)) 
    86112         ERROR("CObjectFactory::GetObject(const StdString & id)", 
    87113               << "[ id = " << id << ", U = " << U::GetName() <<", context = "<<context<< " ] " 
    88114               << "object was not found."); 
    89       return (U::AllMapObj[context][id]); 
     115 
     116      return (*U::AllMapObj)[context][id]; 
    90117   } 
    91118 
     
    93120   boost::shared_ptr<U> CObjectFactory::CreateObject(const StdString& id) 
    94121   { 
     122      if(U::AllVectObj == NULL) U::AllVectObj = new xios_map<StdString, std::vector<boost::shared_ptr<U> > >; 
     123      if(U::AllMapObj  == NULL) U::AllMapObj  = new xios_map<StdString, xios_map<StdString, boost::shared_ptr<U> > >; 
     124       
    95125      if (CurrContext.empty()) 
    96126         ERROR("CObjectFactory::CreateObject(const StdString& id)", 
     
    105135         boost::shared_ptr<U> value(new U(id.empty() ? CObjectFactory::GenUId<U>() : id)); 
    106136 
    107          U::AllVectObj[CObjectFactory::CurrContext].insert(U::AllVectObj[CObjectFactory::CurrContext].end(), value); 
    108          U::AllMapObj[CObjectFactory::CurrContext].insert(std::make_pair(value->getId(), value)); 
     137         (* U::AllVectObj)[CObjectFactory::CurrContext].insert((*U::AllVectObj)[CObjectFactory::CurrContext].end(), value); 
     138         (* U::AllMapObj) [CObjectFactory::CurrContext].insert(std::make_pair(value->getId(), value)); 
    109139 
    110140         return value; 
     
    116146         CObjectFactory::GetObjectVector(const StdString & context) 
    117147   { 
    118       return (U::AllVectObj[context]); 
     148      if(U::AllVectObj != NULL)  
     149       
     150 
     151      return (*U::AllVectObj)[context]; 
    119152   } 
    120153 
     
    130163   { 
    131164      StdOStringStream oss; 
    132       oss << GetUIdBase<U>() << U::GenId[CObjectFactory::CurrContext]++; 
     165      if(U::GenId == NULL) U::GenId = new xios_map< StdString, long int >; 
     166      oss << GetUIdBase<U>() << (*U::GenId)[CObjectFactory::CurrContext]++; 
    133167      return oss.str(); 
    134168   } 
  • XIOS/dev/branch_yushan/src/object_template.hpp

    r1085 r1087  
    9898         /// Propriétés statiques /// 
    9999         // bkp 
    100          static xios_map<StdString, 
    101                 xios_map<StdString, 
    102                 boost::shared_ptr<DerivedType> > > AllMapObj; 
    103          static xios_map<StdString, 
    104                 std::vector<boost::shared_ptr<DerivedType> > > AllVectObj; 
     100         // static xios_map<StdString, 
     101         //        xios_map<StdString, 
     102         //        boost::shared_ptr<DerivedType> > > AllMapObj; 
     103         // static xios_map<StdString, 
     104         //        std::vector<boost::shared_ptr<DerivedType> > > AllVectObj; 
    105105 
    106          static xios_map< StdString, long int > GenId ; 
     106         // static xios_map< StdString, long int > GenId ; 
    107107 
    108108         // xios_map<StdString, xios_map<StdString, boost::shared_ptr<DerivedType> > > AllMapObj; 
     
    110110         // xios_map< StdString, long int > GenId ; 
    111111 
    112          // static xios_map<StdString, xios_map<StdString, boost::shared_ptr<DerivedType> > > *AllMapObj_ptr; 
    113          // static xios_map<StdString, std::vector<boost::shared_ptr<DerivedType> > > *AllVectObj_ptr; 
    114          // static xios_map< StdString, long int > *GenId_ptr ; 
     112         static xios_map<StdString, xios_map<StdString, boost::shared_ptr<DerivedType> > > *AllMapObj; 
     113         static xios_map<StdString, std::vector<boost::shared_ptr<DerivedType> > > *AllVectObj; 
     114         static xios_map< StdString, long int > *GenId; 
    115115 
    116          // #pragma omp threadprivate(AllMapObj_ptr, AllVectObj_ptr, GenId_ptr) 
    117  
     116         #pragma omp threadprivate(AllMapObj, AllVectObj, GenId) 
    118117 
    119118   }; // class CObjectTemplate 
  • XIOS/dev/branch_yushan/src/object_template_impl.hpp

    r769 r1087  
    2424      xios_map<StdString, 
    2525      xios_map<StdString, 
    26       boost::shared_ptr<T> > > CObjectTemplate<T>::AllMapObj; 
     26      boost::shared_ptr<T> > > *CObjectTemplate<T>::AllMapObj = 0; 
    2727 
    2828   template <class T> 
    2929      xios_map<StdString, 
    30       std::vector<boost::shared_ptr<T> > > CObjectTemplate<T>::AllVectObj; 
    31  
    32    template <class T> 
    33       xios_map<StdString,long int> CObjectTemplate<T>::GenId; 
     30      std::vector<boost::shared_ptr<T> > > *CObjectTemplate<T>::AllVectObj = 0; 
     31 
     32   template <class T> 
     33      xios_map<StdString,long int> *CObjectTemplate<T>::GenId = 0; 
    3434 
    3535   template <class T> 
     
    6666         CObjectTemplate<T>::GetAllVectobject(const StdString & contextId) 
    6767   { 
    68       return (CObjectTemplate<T>::AllVectObj[contextId]); 
     68      return (CObjectTemplate<T>::AllVectObj->at(contextId)); 
    6969   } 
    7070 
  • XIOS/dev/branch_yushan/src/test/test_omp.f90

    r1085 r1087  
    8888    print*, "xios_context_initialize OK", rank, size 
    8989 
     90!     CALL xios_get_handle("test",ctx_hdl) 
     91!     CALL xios_set_current_context(ctx_hdl) 
     92   
     93   
     94!     CALL xios_get_calendar_type(calendar_type) 
     95!     print*, "xios_get_calendar_type OK", rank, size 
     96 
     97!     CALL xios_set_axis_attr("axis_A",n_glo=llm ,value=lval) ; 
     98!     CALL xios_set_domain_attr("domain_A",ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, ni=ni,jbegin=jbegin,nj=nj,type='curvilinear') 
     99!     CALL xios_set_domain_attr("domain_A",data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-2, data_nj=nj+4) 
     100!     CALL xios_set_domain_attr("domain_A",lonvalue_2D=lon,latvalue_2D=lat) 
     101!     CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 
     102!     print*, "test block OK", rank, size 
     103 
    90104    CALL xios_context_finalize() 
    91105    print*, "xios_context_finalize OK", rank, size 
    92106 
    93      !$omp master 
    94      call MPI_Barrier(comm) 
    95      CALL MPI_COMM_FREE(comm, ierr) 
    96      !$omp end master 
     107    !$omp master 
     108    call MPI_Barrier(comm) 
     109    CALL MPI_COMM_FREE(comm, ierr) 
     110    !$omp end master 
    97111 
    98112     !$omp barrier 
Note: See TracChangeset for help on using the changeset viewer.