Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/client.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/client.cpp	(revision 2208)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/client.cpp	(revision 2209)
@@ -174,6 +174,4 @@
       else CXios::setNotUsingServer() ;
 
-
-      CXios::setGlobalRegistry(new CRegistry(clientsComm_)) ;
       /////////////////////////////////////////
       ///////////// PART 3 ////////////////////
@@ -476,14 +474,4 @@
       if (commRank==0) CXios::getRessourcesManager()->finalize() ;
       
-      auto globalRegistry=CXios::getGlobalRegistry() ;
-      globalRegistry->hierarchicalGatherRegistry() ;
-
-      if (commRank==0)
-      {
-        info(80)<<"Write data base Registry"<<endl<<globalRegistry->toString()<<endl ;
-        globalRegistry->toFile("xios_registry.bin") ;
-      }
-      delete globalRegistry ;
-
       CTimer::get("XIOS init/finalize",false).suspend() ;
       CTimer::get("XIOS").suspend() ;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.cpp	(revision 2208)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.cpp	(revision 2209)
@@ -56,4 +56,5 @@
   CContextsManager*   CXios::contextsManager_=nullptr ;
   CCouplerManager*    CXios::couplerManager_=nullptr ;
+  CRegistryManager*   CXios::registryManager_=nullptr ;
 
   //! Parse configuration file and create some objects from it
@@ -217,4 +218,9 @@
   }
 
+  void CXios::launchRegistryManager(bool isXiosServer)
+  {
+    registryManager_ = new CRegistryManager(isXiosServer) ;
+  }
+
   void CXios::launchRessourcesManager(bool isXiosServer)
   {
@@ -243,4 +249,9 @@
 
   
+  void CXios::finalizeRegistryManager()
+  {
+    delete registryManager_;
+  }
+
   void CXios::finalizeRessourcesManager()
   {
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.hpp	(revision 2208)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/cxios.hpp	(revision 2209)
@@ -10,4 +10,5 @@
 #include "daemons_manager.hpp"
 #include "coupler_manager.hpp"
+#include "registry_manager.hpp"
 
 namespace xios
@@ -68,4 +69,5 @@
 
 
+     static CRegistryManager* registryManager_ ;
      static CRessourcesManager* ressourcesManager_ ;
      static CCouplerManager* couplerManager_ ;
@@ -93,4 +95,5 @@
      static void launchRessourcesManager(bool isXiosServer) ;
      static void launchCouplerManager(bool isXiosServer) ;
+     static void launchRegistryManager(bool isXiosServer) ;
     
      static void finalizeServicesManager() ;
@@ -99,5 +102,7 @@
      static void finalizeRessourcesManager() ;
      static void finalizeCouplerManager() ;
+     static void finalizeRegistryManager() ;
 
+     static CRegistryManager*   getRegistryManager(void) { return registryManager_ ;}
      static CRessourcesManager* getRessourcesManager(void) { return ressourcesManager_ ;}
      static CCouplerManager*    getCouplerManager(void) { return couplerManager_ ;}
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/daemons_manager.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/daemons_manager.cpp	(revision 2208)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/daemons_manager.cpp	(revision 2209)
@@ -19,10 +19,12 @@
     MPI_Comm_split(xiosComm,isXiosServer,commRank,&splitComm) ;
     
+    CXios::launchRegistryManager(isXiosServer) ;
     CXios::launchRessourcesManager(isXiosServer) ;
     CXios::launchServicesManager(isXiosServer) ;
     CXios::launchContextsManager(isXiosServer) ;
     CXios::launchCouplerManager(isXiosServer) ;
-
+ 
     if (isXiosServer) CServer::launchServersRessource(splitComm) ;
+    MPI_Barrier(xiosComm) ;
     MPI_Comm_free(&splitComm) ;
   }
@@ -34,4 +36,5 @@
     CXios::finalizeServicesManager() ;
     CXios::finalizeRessourcesManager() ;
+    CXios::finalizeRegistryManager() ;
   }
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/registry_manager.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/registry_manager.cpp	(revision 2209)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/registry_manager.cpp	(revision 2209)
@@ -0,0 +1,28 @@
+#include "registry_manager.hpp"
+#include "cxios.hpp"
+
+namespace xios
+{
+  CRegistryManager::CRegistryManager(bool isXiosServer)
+  {
+    
+    int commRank ;  
+    xiosComm_ = CXios::getXiosComm() ;
+    MPI_Comm_rank(xiosComm_, &commRank) ;
+    managerGlobalLeader_ = 0 ;
+    if (commRank==managerGlobalLeader_) isManagerGlobalLeader_=true;
+    else isManagerGlobalLeader_=false;
+    registryIn_ = new CRegistry(xiosComm_) ;
+    if (commRank==managerGlobalLeader_) registryIn_->fromFile(registryInFileName) ;
+    registryIn_->bcastRegistry() ;
+    registryOut_= new CRegistry(xiosComm_) ;
+  }
+
+  void CRegistryManager::finalize(void)
+  {
+    delete registryIn_ ;
+    registryOut_->hierarchicalGatherRegistry() ;
+    if (isManagerGlobalLeader_) registryOut_->toFile(registryOutFileName) ;
+    delete registryOut_ ;
+  }
+}
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/registry_manager.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/registry_manager.hpp	(revision 2209)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/registry_manager.hpp	(revision 2209)
@@ -0,0 +1,35 @@
+#ifndef __REGISTRY_MANAGER_HPP__
+#define __REGISTRY_MANAGER_HPP__
+
+#include "xios_spl.hpp"
+#include "registry.hpp"
+#include "mpi.hpp"
+
+namespace xios
+{
+  class CRegistryManager
+  {
+    
+    public:
+      
+    CRegistryManager(bool isXiosServer) ;
+    ~CRegistryManager() { finalize() ;}
+    const CRegistry& getRegistryIn(void)  {return *registryIn_ ;}
+    const CRegistry& getRegistryOut(void) {return *registryOut_ ;}
+
+    void merge(const CRegistry& inRegistry) { registryOut_->mergeRegistry(inRegistry) ;}
+    
+    private:
+      void finalize(void) ;
+
+      const std::string registryInFileName {"registry.bin"} ;
+      const std::string registryOutFileName {"registry.bin"} ;
+      MPI_Comm xiosComm_ ;
+      int managerGlobalLeader_ ;
+      bool isManagerGlobalLeader_ ;
+      CRegistry* registryIn_ ;
+      CRegistry* registryOut_ ;
+  } ;
+}
+
+#endif
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp	(revision 2208)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp	(revision 2209)
@@ -428,11 +428,7 @@
 
       string contextRegistryId=getId() ;
-      registryIn=new CRegistry(intraComm);
+      registryIn=new CRegistry(CXios::getRegistryManager()->getRegistryIn());
       registryIn->setPath(contextRegistryId) ;
       
-      int commRank ;
-      MPI_Comm_rank(intraComm_,&commRank) ;
-      if (commRank==0) registryIn->fromFile("xios_registry.bin") ;
-      registryIn->bcastRegistry() ;
       registryOut=new CRegistry(intraComm_) ;
       registryOut->setPath(contextRegistryId) ;
@@ -465,14 +461,10 @@
      CXios::getContextsManager()->getContextId(getId(), contextId_, intraComm) ;
      
-     registryIn=new CRegistry(intraComm);
-     registryIn->setPath(contextId_) ;
-     
-     int commRank ;
-     MPI_Comm_rank(intraComm_,&commRank) ;
-     if (commRank==0) registryIn->fromFile("xios_registry.bin") ;
-    
-     registryIn->bcastRegistry() ;
-     registryOut=new CRegistry(intraComm) ;
-     registryOut->setPath(contextId_) ;
+     string contextRegistryId=getId() ;
+     registryIn=new CRegistry(CXios::getRegistryManager()->getRegistryIn());
+     registryIn->setPath(contextRegistryId) ;
+      
+     registryOut=new CRegistry(intraComm_) ;
+     registryOut->setPath(contextRegistryId) ;
 
    }
@@ -715,5 +707,5 @@
    {
       registryOut->hierarchicalGatherRegistry() ;
-      if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ;
+      if (server->intraCommRank==0) CXios::getRegistryManager()->merge(*registryOut) ;
 
       if (serviceType_==CServicesManager::CLIENT)
@@ -1574,8 +1566,4 @@
              return true;
              break;
-           case EVENT_ID_SEND_REGISTRY:
-             recvRegistry(event);
-             return true;
-             break;
            case EVENT_ID_COUPLER_IN_READY:
              recvCouplerInReady(event);
@@ -2106,56 +2094,4 @@
   CATCH
 
-     //! Server side: Receive a message to do some post processing
-  void CContext::recvRegistry(CEventServer& event)
-  TRY
-  {
-    CBufferIn* buffer=event.subEvents.begin()->buffer;
-    getCurrent()->recvRegistry(*buffer);
-  }
-  CATCH
-
-  void CContext::recvRegistry(CBufferIn& buffer)
-  TRY
-  {
-    if (server->intraCommRank==0)
-    {
-      CRegistry registry(server->intraComm) ;
-      registry.fromBuffer(buffer) ;
-      registryOut->mergeRegistry(registry) ;
-    }
-  }
-  CATCH_DUMP_ATTR
-
-  void CContext::sendRegistry(void)
-  TRY
-  {
-    registryOut->hierarchicalGatherRegistry() ;
-
-    int nbSrvPools ;
-    if (serviceType_==CServicesManager::CLIENT) nbSrvPools = 1 ;
-    else if (serviceType_==CServicesManager::GATHERER) nbSrvPools = this->clientPrimServer.size() ;
-    else nbSrvPools = 0 ;
-    CContextClient* contextClientTmp ;
-
-    for (int i = 0; i < nbSrvPools; ++i)
-    {
-      if (serviceType_==CServicesManager::CLIENT) contextClientTmp = client ;
-      else if (serviceType_==CServicesManager::GATHERER ) contextClientTmp = clientPrimServer[i] ;
-
-      CEventClient event(CContext::GetType(), CContext::EVENT_ID_SEND_REGISTRY);
-      if (contextClientTmp->isServerLeader())
-      {
-        CMessage msg ;
-        if (contextClientTmp->clientRank==0) msg<<*registryOut ;
-        const std::list<int>& ranks = contextClientTmp->getRanksServerLeader();
-        for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
-             event.push(*itRank,1,msg);
-        contextClientTmp->sendEvent(event);
-      }
-      else contextClientTmp->sendEvent(event);
-    }
-  }
-  CATCH_DUMP_ATTR
-
   
   void CContext::sendFinalizeClient(CContextClient* contextClient, const string& contextClientId)
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.hpp	(revision 2208)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.hpp	(revision 2209)
@@ -55,5 +55,4 @@
            EVENT_ID_CLOSE_DEFINITION,EVENT_ID_UPDATE_CALENDAR,
            EVENT_ID_CREATE_FILE_HEADER,EVENT_ID_CONTEXT_FINALIZE,
-           EVENT_ID_SEND_REGISTRY,
            EVENT_ID_CONTEXT_FINALIZE_CLIENT,
            EVENT_ID_COUPLER_IN_READY,
@@ -170,5 +169,4 @@
          void sendRefDomainsAxisScalars(const std::vector<CFile*>& activeFiles);
          //!< after be gathered to the root process of the context, merged registry is sent to the root process of the servers
-         void sendRegistry(void) ;
          void sendFinalizeClient(CContextClient* contextClient, const string& contextClientId);
          
@@ -189,6 +187,4 @@
          static void recvSolveInheritanceContext(CEventServer& event);
          void recvSolveInheritanceContext(CBufferIn& buffer);
-         static void recvRegistry(CEventServer& event) ;
-         void recvRegistry(CBufferIn& buffer) ; //!< registry is received by the servers
          static void recvFinalizeClient(CEventServer& event) ;
          void recvFinalizeClient(CBufferIn& buffer);
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/registry.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/registry.cpp	(revision 2208)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/registry.cpp	(revision 2209)
@@ -51,10 +51,10 @@
   }
 
-  void CRegistry::getKey_(const string& key_, CBaseType& value)
+  void CRegistry::getKey_(const string& key_, CBaseType& value) const
   {
     const string key=path+key_ ;
     size_t size=value.size();
       
-    map<string,pair<size_t,char*> >::iterator it=registry.find(key) ;
+    map<string,pair<size_t,char*> >::const_iterator it=registry.find(key) ;
 
     if (it!=registry.end())
@@ -258,5 +258,14 @@
   void CRegistry::hierarchicalGatherRegistry(void)
   {
-    hierarchicalGatherRegistry(communicator) ;
+    int color;
+    if (isEmpty()) color=0 ;
+    else color=1 ;
+    int rank ;
+    MPI_Comm_rank(communicator,&rank);
+    if (rank==0) color=1 ;
+    MPI_Comm newComm ;
+    MPI_Comm_split(communicator,color,rank,&newComm) ;
+    if (color==1) hierarchicalGatherRegistry(newComm) ;
+    MPI_Comm_free(&newComm) ;    
   }
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/registry.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/registry.hpp	(revision 2208)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/registry.hpp	(revision 2209)
@@ -38,9 +38,9 @@
 
 /** retrieve a value from a key */
-      void getKey(const std::string& key, CBaseType& value) { this->getKey_(key,value); }
+      void getKey(const std::string& key, CBaseType& value) const { this->getKey_(key,value); }
 
 /** retrieve a value from a key */
       template<typename T> typename boost::enable_if_c<!boost::is_convertible<T&, CBaseType&>::value>::type
-      getKey(const std::string& key, T& value) { CType_ref<T> valRef(value); this->getKey_(key,valRef); }
+      getKey(const std::string& key, T& value) const { CType_ref<T> valRef(value); this->getKey_(key,valRef); }
 
 
@@ -103,5 +103,5 @@
 
 /** retrieve a value from a key (internal use)*/
-      void getKey_(const std::string& key, CBaseType& value) ;
+      void getKey_(const std::string& key, CBaseType& value) const ;
 
 /** use internally for recursivity */
