Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_client.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_client.cpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_client.cpp	(revision 2258)
@@ -16,5 +16,5 @@
   CClientBuffer::CClientBuffer(MPI_Comm interComm, vector<MPI_Win>& windows, int clientRank, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize)
     : interComm(interComm)
-    , clientRank_(clientRank)
+    , clientRank_(0)
     , serverRank(serverRank)
     , bufferSize(bufferSize)
@@ -378,11 +378,18 @@
   bool CClientBuffer::isNotifiedFinalized(void)
   {
-   
-    bool ret ;
-    lockBuffer() ;
-    ret=*notify[current] == notifyFinalize_ ? true : false ;
-    unlockBuffer() ;
-
-    return ret;
+    if (!isFinalized_)
+    {
+      double time=MPI_Wtime() ;
+//      if (time - lastCheckedNotify_ > latency_)
+      {
+        int flag ;
+        MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, MPI_STATUS_IGNORE);
+        lockBuffer() ;
+        isFinalized_=*notify[current] == notifyFinalize_ ? true : false ;
+        unlockBuffer() ;
+        lastCheckedNotify_=time ;
+      }
+    }
+    return isFinalized_ ;
   }
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_client.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_client.hpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_client.hpp	(revision 2258)
@@ -57,5 +57,5 @@
       StdSize bufferSize;
       const StdSize estimatedMaxEventSize;
-
+      bool isFinalized_=false ;
 
       const int serverRank;
@@ -72,4 +72,5 @@
       double latency_=1e-2 ;
       double lastCheckedWithNothing_=0 ;
+      double lastCheckedNotify_=0 ;
   };
 }
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_server.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_server.hpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/buffer_server.hpp	(revision 2258)
@@ -20,5 +20,4 @@
       void freeBuffer(size_t count) ;
       void createWindows(MPI_Comm oneSidedComm) ;
-      bool freeWindows(void) ;
       bool getBufferFromClient(size_t timeLine, char* & buffer, size_t& count) ;
       bool isBufferEmpty(void) ;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/context_client.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/context_client.cpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/context_client.cpp	(revision 2258)
@@ -60,28 +60,22 @@
         // Why ? Just because on openMPI, it reduce the creation time of windows otherwhise which increase quadratically
         // We don't know the reason
-      
+        double time ;
         MPI_Comm commSelf ;
         MPI_Comm_split(intraComm_,clientRank,clientRank, &commSelf) ;
-        vector<MPI_Comm> dummyComm(serverSize) ;
-        for(int rank=0; rank<serverSize; rank++) MPI_Intercomm_create(commSelf, 0, interCommMerged, clientSize+rank, 0, &dummyComm[rank]) ;
-
-        // create windows for one-sided
-        windows.resize(serverSize) ;
-        MPI_Comm winComm ;
-        for(int rank=0; rank<serverSize; rank++)
-        {
-          windows[rank].resize(2) ;
-          MPI_Comm_split(interCommMerged, rank, clientRank, &winComm);
-          MPI_Win_create_dynamic(MPI_INFO_NULL, winComm, &windows[rank][0]);
-          MPI_Win_create_dynamic(MPI_INFO_NULL, winComm, &windows[rank][1]);
-//       ym : Warning : intelMPI doesn't support that communicator of windows be deallocated before the windows deallocation, crash at MPI_Win_lock
-//            Bug or not ?          
-//          MPI_Comm_free(&winComm) ;
-        }
-        
-        // free dummy intercommunicator => take times ?
-        for(int rank=0; rank<serverSize; rank++)  MPI_Comm_free(&dummyComm[rank]) ;
+        MPI_Comm interComm ;
+        winComm_.resize(serverSize) ;
+        windows_.resize(serverSize) ;
+        for(int rank=0; rank<serverSize; rank++) 
+        {
+          time=MPI_Wtime() ;
+          MPI_Intercomm_create(commSelf, 0, interCommMerged, clientSize+rank, 0, &interComm) ;
+          MPI_Intercomm_merge(interComm, false, &winComm_[rank]) ;
+          windows_[rank].resize(2) ;
+          MPI_Win_create_dynamic(MPI_INFO_NULL, winComm_[rank], &windows_[rank][0]);
+          MPI_Win_create_dynamic(MPI_INFO_NULL, winComm_[rank], &windows_[rank][1]);  
+          time=MPI_Wtime()-time ;
+          info(100)<< "MPI_Win_create_dynamic : client to server rank "<<rank<<" => "<<time/1e-6<<" us"<<endl ;
+        }
         MPI_Comm_free(&commSelf) ;
-
         CTimer::get("create Windows").resume() ;
      }
@@ -345,5 +339,5 @@
       
       vector<MPI_Win> Wins(2,MPI_WIN_NULL) ;
-      if (!isAttachedModeEnabled()) Wins=windows[rank] ;
+      if (!isAttachedModeEnabled()) Wins=windows_[rank] ;
   
       CClientBuffer* buffer = buffers[rank] = new CClientBuffer(interComm, Wins, clientRank, rank, mapBufferSize_[rank], maxEventSizes[rank]);
@@ -392,6 +386,7 @@
         for(int rank=0; rank<serverSize; rank++)
         {
-          MPI_Win_free(&windows[rank][0]);
-          MPI_Win_free(&windows[rank][1]);
+          MPI_Win_free(&windows_[rank][0]);
+          MPI_Win_free(&windows_[rank][1]);
+          MPI_Comm_free(&winComm_[rank]) ;
         }
       } 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/context_client.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/context_client.hpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/context_client.hpp	(revision 2258)
@@ -120,5 +120,6 @@
       std::list<int> ranksServerNotLeader;
 
-      std::vector<std::vector<MPI_Win> >windows ; //! one sided mpi windows to expose client buffers to servers == windows[nbServers][2]
+      std::vector<MPI_Comm> winComm_ ; //! Window communicators
+      std::vector<std::vector<MPI_Win> >windows_ ; //! one sided mpi windows to expose client buffers to servers == windows[nbServers][2]
       bool isAttached_ ;
       CContextServer* associatedServer_ ; //!< The server associated to the pair client/server
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.cpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.cpp	(revision 2258)
@@ -46,7 +46,6 @@
     else  attachedMode=true ;
     
-    int clientSize ;
-    if (flag) MPI_Comm_remote_size(interComm,&clientSize);
-    else  MPI_Comm_size(interComm,&clientSize);
+    if (flag) MPI_Comm_remote_size(interComm,&clientSize_);
+    else  MPI_Comm_size(interComm,&clientSize_);
 
    
@@ -80,31 +79,21 @@
       MPI_Intercomm_merge(interComm_,true,&interCommMerged) ;
 
-      // We create dummy pair of intercommunicator between clients and server
-      // Why ? Just because on openMPI, it reduce the creation time of windows otherwhise which increase quadratically
-      // We don't know the reason
+      double time ;
+      windows_.resize(clientSize_) ;
       MPI_Comm commSelf ;
       MPI_Comm_split(intraComm_, intraCommRank, intraCommRank, &commSelf) ;
-      vector<MPI_Comm> dummyComm(clientSize) ;
-      for(int rank=0; rank<clientSize ; rank++) MPI_Intercomm_create(commSelf, 0, interCommMerged, rank, 0 , &dummyComm[rank]) ;
-
-      // create windows for one sided comm
-      MPI_Comm winComm ;
-      windows.resize(2) ;
-      for(int rank=clientSize; rank<clientSize+intraCommSize; rank++)
-      {
-        if (rank==clientSize+intraCommRank) 
-        {
-          MPI_Comm_split(interCommMerged, intraCommRank, rank, &winComm);
-          MPI_Win_create_dynamic(MPI_INFO_NULL, winComm, &windows[0]);
-          MPI_Win_create_dynamic(MPI_INFO_NULL, winComm, &windows[1]);   
-        }
-        else MPI_Comm_split(interCommMerged, intraCommRank, rank, &winComm);
-        //       ym : Warning : intelMPI doesn't support that communicator of windows be deallocated before the windows deallocation, crash at MPI_Win_lock
-        //            Bug or not ?          
-        //         MPI_Comm_free(&winComm) ;
-      }
-      
-      // free dummy intercommunicator
-      for(int rank=0; rank<clientSize ; rank++)  MPI_Comm_free(&dummyComm[rank]) ;
+      MPI_Comm interComm ;
+      winComm_.resize(clientSize_) ;
+      for(int rank=0; rank<clientSize_ ; rank++) 
+      {
+        time=MPI_Wtime() ;
+        MPI_Intercomm_create(commSelf, 0, interCommMerged, rank, 0 , &interComm) ;
+        MPI_Intercomm_merge(interComm, true, &winComm_[rank]) ;
+        windows_[rank].resize(2) ;
+        MPI_Win_create_dynamic(MPI_INFO_NULL, winComm_[rank], &windows_[rank][0]);
+        MPI_Win_create_dynamic(MPI_INFO_NULL, winComm_[rank], &windows_[rank][1]);  
+        time=MPI_Wtime()-time ;
+        info(100)<< "MPI_Win_create_dynamic : server to client rank "<<rank<<" => "<<time/1e-6<<" us"<<endl ;
+      }
       MPI_Comm_free(&commSelf) ;
       CTimer::get("create Windows").suspend() ;
@@ -112,7 +101,13 @@
     else 
     {
-      windows.resize(2) ;
-      windows[0]=MPI_WIN_NULL ;
-      windows[1]=MPI_WIN_NULL ;
+      winComm_.resize(clientSize_) ;
+      windows_.resize(clientSize_) ;
+      for(int rank=0; rank<clientSize_ ; rank++) 
+      {
+        winComm_[rank] = MPI_COMM_NULL ;
+        windows_[rank].resize(2) ;
+        windows_[rank][0]=MPI_WIN_NULL ;
+        windows_[rank][1]=MPI_WIN_NULL ;
+      }
     }
     
@@ -160,83 +155,4 @@
     return finished;
   }
-/*
-  void CContextServer::listen(void)
-  {
-    int rank;
-    int flag;
-    int count;
-    char * addr;
-    MPI_Status status;
-    map<int,CServerBuffer*>::iterator it;
-    bool okLoop;
-
-    traceOff();
-    // WARNING : with intel MPI, probing crash on an intercommunicator with release library but not with release_mt
-    // ==>  source $I_MPI_ROOT/intel64/bin/mpivars.sh release_mt    needed
-    MPI_Iprobe(MPI_ANY_SOURCE, 20,interComm,&flag,&status);
-    traceOn();
-
-    if (flag==true)
-    {
-      rank=status.MPI_SOURCE ;
-      okLoop = true;
-      if (pendingRequest.find(rank)==pendingRequest.end())
-        okLoop = !listenPendingRequest(status) ;
-      if (okLoop)
-      {
-        for(rank=0;rank<commSize;rank++)
-        {
-          if (pendingRequest.find(rank)==pendingRequest.end())
-          {
-
-            traceOff();
-            MPI_Iprobe(rank, 20,interComm,&flag,&status);
-            traceOn();
-            if (flag==true) listenPendingRequest(status) ;
-          }
-        }
-      }
-    }
-  }
-
-  bool CContextServer::listenPendingRequest(MPI_Status& status)
-  {
-    int count;
-    char * addr;
-    map<int,CServerBuffer*>::iterator it;
-    int rank=status.MPI_SOURCE ;
-
-    it=buffers.find(rank);
-    if (it==buffers.end()) // Receive the buffer size and allocate the buffer
-    {
-       MPI_Aint recvBuff[4] ;
-       MPI_Recv(recvBuff, 4, MPI_AINT, rank, 20, interComm, &status);
-       remoteHashId_ = recvBuff[0] ;
-       StdSize buffSize = recvBuff[1];
-       vector<MPI_Aint> winAdress(2) ;
-       winAdress[0]=recvBuff[2] ; winAdress[1]=recvBuff[3] ;
-       mapBufferSize_.insert(std::make_pair(rank, buffSize));
-       it=(buffers.insert(pair<int,CServerBuffer*>(rank,new CServerBuffer(windows, winAdress, rank, buffSize)))).first;
-     
-       lastTimeLine[rank]=0 ;
-       itLastTimeLine=lastTimeLine.begin() ;
-
-       return true;
-    }
-    else
-    {
-      MPI_Get_count(&status,MPI_CHAR,&count);
-      if (it->second->isBufferFree(count))
-      {
-         addr=(char*)it->second->getBuffer(count);
-         MPI_Irecv(addr,count,MPI_CHAR,rank,20,interComm,&pendingRequest[rank]);
-         bufferRequest[rank]=addr;
-         return true;
-       }
-      else
-        return false;
-    }
-  }
-*/
 
  void CContextServer::listen(void)
@@ -274,5 +190,5 @@
        winAdress[0]=recvBuff[2] ; winAdress[1]=recvBuff[3] ;
        mapBufferSize_.insert(std::make_pair(rank, buffSize));
-       it=(buffers.insert(pair<int,CServerBuffer*>(rank,new CServerBuffer(windows, winAdress, rank, buffSize)))).first;
+       it=(buffers.insert(pair<int,CServerBuffer*>(rank,new CServerBuffer(windows_[rank], winAdress, 0, buffSize)))).first;
        lastTimeLine[rank]=0 ;
        itLastTimeLine=lastTimeLine.begin() ;
@@ -407,5 +323,5 @@
         newBuffer>>newSize>>winAdress[0]>>winAdress[1] ;
         buffers.erase(rank) ;
-        buffers.insert(pair<int,CServerBuffer*>(rank,new CServerBuffer(windows, winAdress, rank, newSize)));
+        buffers.insert(pair<int,CServerBuffer*>(rank,new CServerBuffer(windows_[rank], winAdress, 0, newSize)));
       }
       else
@@ -500,17 +416,20 @@
   void CContextServer::releaseBuffers()
   {
-    map<int,CServerBuffer*>::iterator it;
-    bool out ;
-    do
-    {
-      out=true ;
-      for(it=buffers.begin();it!=buffers.end();++it)
-      {
-//        out = out && it->second->freeWindows() ;
-
-      }
-    } while (! out) ; 
-      MPI_Win_free(&windows[0]) ;
-      MPI_Win_free(&windows[1]) ;
+    for(auto it=buffers.begin();it!=buffers.end();++it) delete it->second ;
+    buffers.clear() ; 
+    freeWindows() ;
+  }
+
+  void CContextServer::freeWindows()
+  {
+    if (!isAttachedModeEnabled())
+    {
+      for(int rank=0; rank<clientSize_; rank++)
+      {
+        MPI_Win_free(&windows_[rank][0]);
+        MPI_Win_free(&windows_[rank][1]);
+        MPI_Comm_free(&winComm_[rank]) ;
+      }
+    }
   }
 
@@ -538,12 +457,8 @@
       finished=true;
       info(20)<<" CContextServer: Receive context <"<<context->getId()<<"> finalize."<<endl;
-//      releaseBuffers() ;
       notifyClientsFinalize() ;
       CTimer::get("receiving requests").suspend();
       context->finalize();
-
-// don't know where release windows
-      MPI_Win_free(&windows[0]) ;
-      MPI_Win_free(&windows[1]) ;
+      freeWindows() ;
 
       std::map<int, StdSize>::const_iterator itbMap = mapBufferSize_.begin(),
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.hpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/context_server.hpp	(revision 2258)
@@ -34,4 +34,5 @@
     void releaseBuffers(void) ;
     void notifyClientsFinalize(void) ;
+    void freeWindows(void) ; // !<< free Windows for one sided communication
     
     MPI_Comm intraComm ;
@@ -41,4 +42,5 @@
     MPI_Comm interComm ;
     int commSize ;
+    int clientSize_ ;
 
     MPI_Comm interCommMerged; //!< Communicator of the client group + server group (intraCommunicator) needed for one sided communication.
@@ -71,5 +73,6 @@
 
       std::map<int, StdSize> mapBufferSize_;
-      vector<MPI_Win> windows ; //! one sided mpi windows to expose client buffers to servers ; No memory will be attached on server side.
+      std::vector<MPI_Comm>winComm_ ; //! Window communicators
+      std::vector<std::vector<MPI_Win> >windows_ ; //! one sided mpi windows to expose client buffers to servers ; No memory will be attached on server side.
       CEventScheduler* eventScheduler_ ;
       bool isProcessingEvent_ ;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/contexts_manager.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/contexts_manager.cpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/contexts_manager.cpp	(revision 2258)
@@ -109,7 +109,7 @@
   void CContextsManager::sendNotification(int rank)
   {
-    winNotify_->lockWindow(rank,0) ;
-    winNotify_->pushToWindow(rank, this, &CContextsManager::notificationsDumpOut) ;
-    winNotify_->unlockWindow(rank,0) ;
+    winNotify_->lockWindowExclusive(rank) ;
+    winNotify_->pushToLockedWindow(rank, this, &CContextsManager::notificationsDumpOut) ;
+    winNotify_->unlockWindow(rank) ;
   }
 
@@ -168,7 +168,7 @@
     int commRank ;
     MPI_Comm_rank(xiosComm_, &commRank) ;
-    winNotify_->lockWindow(commRank,0) ;
-    winNotify_->popFromWindow(commRank, this, &CContextsManager::notificationsDumpIn) ;
-    winNotify_->unlockWindow(commRank,0) ;
+    winNotify_->lockWindowExclusive(commRank) ;
+    winNotify_->popFromLockedWindow(commRank, this, &CContextsManager::notificationsDumpIn) ;
+    winNotify_->unlockWindow(commRank) ;
     if (notifyType_==NOTIFY_CREATE_CONTEXT) createServerContext() ;
     else if (notifyType_==NOTIFY_CREATE_INTERCOMM) createServerContextIntercomm() ;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/ressources_manager.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/ressources_manager.cpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/ressources_manager.cpp	(revision 2258)
@@ -72,7 +72,7 @@
   void CRessourcesManager::sendNotification(int rank)
   {
-    winNotify_->lockWindow(rank,0) ;
-    winNotify_->pushToWindow(rank, this, &CRessourcesManager::notificationsDumpOut) ;
-    winNotify_->unlockWindow(rank,0) ;
+    winNotify_->lockWindowExclusive(rank) ;
+    winNotify_->pushToLockedWindow(rank, this, &CRessourcesManager::notificationsDumpOut) ;
+    winNotify_->unlockWindow(rank) ;
   }
 
@@ -128,11 +128,11 @@
     MPI_Comm_rank(xiosComm_, &commRank) ;
     CTimer::get("CRessourcesManager::checkNotifications lock").resume();
-    winNotify_->lockWindow(commRank,0) ;
+    winNotify_->lockWindowExclusive(commRank) ;
     CTimer::get("CRessourcesManager::checkNotifications lock").suspend();
     CTimer::get("CRessourcesManager::checkNotifications pop").resume();
-    winNotify_->popFromWindow(commRank, this, &CRessourcesManager::notificationsDumpIn) ;
+    winNotify_->popFromLockedWindow(commRank, this, &CRessourcesManager::notificationsDumpIn) ;
     CTimer::get("CRessourcesManager::checkNotifications pop").suspend();
     CTimer::get("CRessourcesManager::checkNotifications unlock").resume();
-    winNotify_->unlockWindow(commRank,0) ;
+    winNotify_->unlockWindow(commRank) ;
     CTimer::get("CRessourcesManager::checkNotifications unlock").suspend();
     if (notifyType_==NOTIFY_CREATE_POOL) createPool() ;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.cpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/server_context.cpp	(revision 2258)
@@ -160,7 +160,7 @@
   void CServerContext::sendNotification(int rank)
   {
-    winNotify_->lockWindow(rank,0) ;
-    winNotify_->pushToWindow(rank, this, &CServerContext::notificationsDumpOut) ;
-    winNotify_->unlockWindow(rank,0) ;
+    winNotify_->lockWindowExclusive(rank) ;
+    winNotify_->pushToLockedWindow(rank, this, &CServerContext::notificationsDumpOut) ;
+    winNotify_->unlockWindow(rank) ;
   }
 
@@ -201,7 +201,7 @@
         int commRank ;
         MPI_Comm_rank(contextComm_, &commRank) ;
-        winNotify_->lockWindow(commRank,0) ;
-        winNotify_->popFromWindow(commRank, this, &CServerContext::notificationsDumpIn) ;
-        winNotify_->unlockWindow(commRank,0) ;
+        winNotify_->lockWindowExclusive(commRank) ;
+        winNotify_->popFromLockedWindow(commRank, this, &CServerContext::notificationsDumpIn) ;
+        winNotify_->unlockWindow(commRank) ;
       
         if (notifyInType_!= NOTIFY_NOTHING)
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.cpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/services.cpp	(revision 2258)
@@ -131,7 +131,7 @@
   void CService::sendNotification(int rank)
   {
-    winNotify_->lockWindow(rank,0) ;
-    winNotify_->pushToWindow(rank, this, &CService::notificationsDumpOut) ;
-    winNotify_->unlockWindow(rank,0) ;
+    winNotify_->lockWindowExclusive(rank) ;
+    winNotify_->pushToLockedWindow(rank, this, &CService::notificationsDumpOut) ;
+    winNotify_->unlockWindow(rank) ;
   }
 
@@ -175,7 +175,7 @@
         int commRank ;
         MPI_Comm_rank(serviceComm_, &commRank) ;
-        winNotify_->lockWindow(commRank,0) ;
-        winNotify_->popFromWindow(commRank, this, &CService::notificationsDumpIn) ;
-        winNotify_->unlockWindow(commRank,0) ;
+        winNotify_->lockWindowExclusive(commRank) ;
+        winNotify_->popFromLockedWindow(commRank, this, &CService::notificationsDumpIn) ;
+        winNotify_->unlockWindow(commRank) ;
       
         if (notifyInType_!= NOTIFY_NOTHING)
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/window_manager.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/window_manager.hpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/manager/window_manager.hpp	(revision 2258)
@@ -189,4 +189,18 @@
     }
 
+    template< class T >
+    void pushToLockedWindow(int rank, T* object, void (T::*dumpOut)(CBufferOut&) )
+    {
+      size_t size ;
+      MPI_Get(&size, SIZE_BUFFER_SIZE, MPI_CHAR, rank, OFFSET_BUFFER_SIZE, SIZE_BUFFER_SIZE, MPI_CHAR, window_) ;
+      MPI_Win_flush(rank,window_) ;
+      CBufferOut buffer ;
+      (object->*dumpOut)(buffer) ;
+      size_t bufferSize=buffer.count() ;
+      size_t newSize = size + bufferSize;
+      MPI_Put(&newSize, SIZE_BUFFER_SIZE, MPI_CHAR, rank, OFFSET_BUFFER_SIZE, SIZE_BUFFER_SIZE, MPI_CHAR, window_) ;
+      MPI_Put(buffer.start(), bufferSize, MPI_CHAR, rank, OFFSET_BUFFER+size, bufferSize, MPI_CHAR, window_) ;
+    }
+
     template< typename T >
     void popFromWindow(int rank, T* object, void (T::*dumpIn)(CBufferIn&) ) 
@@ -206,4 +220,20 @@
       MPI_Win_unlock(rank, window_) ;
       
+    }
+
+    template< typename T >
+    void popFromLockedWindow(int rank, T* object, void (T::*dumpIn)(CBufferIn&) ) 
+    {
+      size_t size ;
+      MPI_Get(&size, SIZE_BUFFER_SIZE, MPI_CHAR, rank, OFFSET_BUFFER_SIZE, SIZE_BUFFER_SIZE, MPI_CHAR, window_) ;
+      MPI_Win_flush(rank,window_) ;
+      CBufferIn buffer(size) ;
+      MPI_Get(buffer.start(), size, MPI_CHAR, rank,OFFSET_BUFFER, size, MPI_CHAR, window_) ;
+      MPI_Win_flush(rank,window_) ;
+      (object->*dumpIn)(buffer) ;
+      
+      size=buffer.remain() ;
+      MPI_Put(&size, SIZE_BUFFER_SIZE, MPI_CHAR, rank, OFFSET_BUFFER_SIZE, SIZE_BUFFER_SIZE, MPI_CHAR, window_) ;
+      MPI_Put(buffer.ptr(),buffer.remain(), MPI_CHAR, rank, OFFSET_BUFFER, buffer.remain(), MPI_CHAR, window_) ;
     }
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp	(revision 2257)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp	(revision 2258)
@@ -742,4 +742,5 @@
           notifiedFinalized=client->isNotifiedFinalized() ;
         } while (!notifiedFinalized) ;
+
         server->releaseBuffers();
         client->releaseBuffers();
