Ignore:
Timestamp:
08/25/21 19:31:05 (3 years ago)
Author:
ymipsl
Message:

Revisiting registry management and make it working.
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/registry.cpp

    r1639 r2209  
    5151  } 
    5252 
    53   void CRegistry::getKey_(const string& key_, CBaseType& value) 
     53  void CRegistry::getKey_(const string& key_, CBaseType& value) const 
    5454  { 
    5555    const string key=path+key_ ; 
    5656    size_t size=value.size(); 
    5757       
    58     map<string,pair<size_t,char*> >::iterator it=registry.find(key) ; 
     58    map<string,pair<size_t,char*> >::const_iterator it=registry.find(key) ; 
    5959 
    6060    if (it!=registry.end()) 
     
    258258  void CRegistry::hierarchicalGatherRegistry(void) 
    259259  { 
    260     hierarchicalGatherRegistry(communicator) ; 
     260    int color; 
     261    if (isEmpty()) color=0 ; 
     262    else color=1 ; 
     263    int rank ; 
     264    MPI_Comm_rank(communicator,&rank); 
     265    if (rank==0) color=1 ; 
     266    MPI_Comm newComm ; 
     267    MPI_Comm_split(communicator,color,rank,&newComm) ; 
     268    if (color==1) hierarchicalGatherRegistry(newComm) ; 
     269    MPI_Comm_free(&newComm) ;     
    261270  } 
    262271 
Note: See TracChangeset for help on using the changeset viewer.