Index: XMLIO_V2/dev/dev_rv/src/xmlio/buffer_list.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/buffer_list.cpp	(revision 198)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/buffer_list.cpp	(revision 199)
@@ -36,5 +36,5 @@
                   if (SuperClass::operator[](i-1).isAvailable(size))
                   {
-                     std::cout << "DonnÃ©es reÃ§ues de " << i << std::endl;
+                     //std::cout << "DonnÃ©es reÃ§ues de " << i << std::endl;
                      CMPIManager::ReceiveCircularBuffer
                         (com_client_server, i, SuperClass::operator[](i-1));
@@ -51,6 +51,6 @@
          }
          
-         static int u = 0;
-         std::cout << "Nouvelle requÃªte disponible " << u++ << std::endl;
+         //static int u = 0;
+         //std::cout << "Nouvelle requÃªte disponible " << u++ << std::endl;
          /*if (u == 3046)
             for (int i = 1; i < CMPIManager::GetCommSize(com_client_server); i++)
@@ -67,5 +67,5 @@
          for (StdSize i = 0; i < this->nbbuffer; i++)
          {
-            std::cout << "RÃ©cupÃ©ration de la requÃªte " << (i+1) << std::endl;
+            //std::cout << "RÃ©cupÃ©ration de la requÃªte " << (i+1) << std::endl;
             lbuffer.push_back(SuperClass::operator[](i).getNextRequest());
          }
Index: XMLIO_V2/dev/dev_rv/src/xmlio/buffer_pair.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/buffer_pair.hpp	(revision 198)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/buffer_pair.hpp	(revision 199)
@@ -65,22 +65,7 @@
                                           const long int & methodId,
                                           A1 * arg1, A2 * arg2, A3 * arg3, A4 * arg4)
-      {
-         static int recurse = 0;
-         if (recurse > 1)
-         {
-            std::cout << "putain :" <<  recurse << "," << this->mustBeSent() 
-                      << "," << currentBuffer << "," << first.getUsedSize() << "," << second.getUsedSize();
-            if ((currentBuffer  ==  0) && (first.getUsedSize()  != 0) && (second_request != -1))
-               std::cout << "," << CMPIManager::Test (second_request);
-            if ((currentBuffer  ==  1) && (second.getUsedSize()  != 0) && (first_request != -1))
-               std::cout << "," << CMPIManager::Test (first_request);
-            std::cout << "," << second_request << "," << first_request << std::endl;
-         }
-         
-         if (recurse == 10) exit (-1);
-         
+      {       
          if (this->mustBeSent()) 
             this->sendCurrentBuffer();
-
            
          CLinearBuffer & cbuffer = this->getCurrentBuffer();
@@ -102,21 +87,8 @@
          {
             cbuffer.appendRequestInfos(managerId, methodId, nbargs);
-            recurse = 0;       
          }
          else
          {
-            int o = this->wait();
-            recurse ++;
-            if (recurse > 1)
-            {
-               
-               std::cout << "putain bis:" <<  recurse << "," << this->mustBeSent()  << "," << CMPIManager::Test (o)
-                         << "," << currentBuffer << "," << first.getUsedSize() << "," << second.getUsedSize();
-               if ((currentBuffer  ==  0) && (first.getUsedSize()  != 0) && (second_request != -1))
-                  std::cout << "," << CMPIManager::Test (second_request);
-               if ((currentBuffer  ==  1) && (second.getUsedSize()  != 0) && (first_request != -1))
-                  std::cout << "," << CMPIManager::Test (first_request);
-               std::cout << "," << second_request << "," << first_request << "," << o << std::endl;
-            }
+            this->wait();
             this->prepareRequest(managerId, methodId, arg1, arg2, arg3, arg4);
          }
Index: XMLIO_V2/dev/dev_rv/src/xmlio/circular_buffer.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/circular_buffer.cpp	(revision 198)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/circular_buffer.cpp	(revision 199)
@@ -69,5 +69,5 @@
          this->movePRead(currsize);
          this->nbrequest--;
-         std::cout <<  this->nbrequest << std::endl;
+         //std::cout <<  this->nbrequest << std::endl;
         
          return (CLinearBuffer(SuperClass::getData(startpos), currsize));
@@ -118,4 +118,5 @@
          {
             this->clear();
+            return;
          }
          
@@ -206,14 +207,28 @@
 
       StdSize CCircularBuffer::getNumberOfRequest(void) const
-      { return (this->nbrequest); }
+      { 
+         return (this->nbrequest); 
+      }
+
+      //---------------------------------------------------------------
 
       StdSize CCircularBuffer::getReadPosition(void) const
-      { return (this->p_read); }
+      { 
+         return (this->p_read); 
+      }
+
+      //---------------------------------------------------------------
 
       StdSize CCircularBuffer::getWritePosition(void) const
-      { return (this->p_write); }
+      { 
+         return (this->p_write); 
+      }
+
+      //---------------------------------------------------------------
 
       StdSize CCircularBuffer::getUnusedPosition(void) const
-      { return (this->p_unused); }
+      { 
+         return (this->p_unused); 
+      }
 
       //---------------------------------------------------------------
Index: XMLIO_V2/dev/dev_rv/src/xmlio/client.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/client.cpp	(revision 198)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/client.cpp	(revision 199)
@@ -10,8 +10,12 @@
    CClient::CClient(MPIComm comm_client_server)
       : bpair(comm_client_server)
-   { /* Ne rien faire de plus */ }  
+   { 
+      this->initialize();
+   }  
         
    CClient::~CClient(void)
-   { /* Ne rien faire de plus */ } 
+   { 
+      this->finalize();
+   } 
    
    ///--------------------------------------------------------------
@@ -42,5 +46,6 @@
                                        CLinearBuffer::NULL_ARG);
       // Pas d'argument Ã  ajouter.
-      this->bpair.sendCurrentBuffer(); 
+      this->bpair.sendCurrentBuffer();
+      comm::CMPIManager::Barrier();
    }
    
Index: XMLIO_V2/dev/dev_rv/src/xmlio/client.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/client.hpp	(revision 198)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/client.hpp	(revision 199)
@@ -27,15 +27,15 @@
          /// Accesseur ///
          const CBufferPair & getBufferPair(void) const;
-         
-      public :
-      
+              
          /// Appels distants///   
          void initialize(void); // manager 0, method 0
          void finalize(void);   // manager 0, method 1
-             
+         
+      public : 
+       
          void setContext(const StdString & idContext); // manager 1, method 0
          void updateCalendar(long int timestep);       // manager 1, method 1
          
-         void sendData(const StdString & fieldId, const ARRAY(float, 1) dataArray);  // manager 2, method 0
+         void sendData(const StdString & fieldId, const ARRAY(float, 1)  dataArray); // manager 2, method 0
          void sendData(const StdString & fieldId, const ARRAY(double, 1) dataArray); // manager 2, method 1
          
Index: XMLIO_V2/dev/dev_rv/src/xmlio/config/properties.conf
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/config/properties.conf	(revision 198)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/config/properties.conf	(revision 199)
@@ -15,5 +15,5 @@
 
 /// Buffer Size ///
-DECLARE_PROPERTY (StdSize, BUFFER_CLIENT_SIZE, 1E6) // 1 Mo
+DECLARE_PROPERTY (StdSize, BUFFER_CLIENT_SIZE,  1E6) // 1 Mo
 DECLARE_PROPERTY (StdSize, BUFFER_SERVER_SIZE, 10E6) // 10 Mo
 
Index: XMLIO_V2/dev/dev_rv/src/xmlio/main_server.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/main_server.cpp	(revision 198)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/main_server.cpp	(revision 199)
@@ -15,48 +15,14 @@
    try
    {
-      ARRAY_CREATE(value0, double, 1, [200]);
-      ARRAY_CREATE(value1, double, 1, [1000]);
-      ARRAY_CREATE(value2, double, 1, [2000]);
-      comm::CMPIManager::Initialise(&argc, &argv); // < seulement en mode connectÃ©
-      
-      if (comm::CMPIManager::IsMaster(comm::CMPIManager::GetCommWorld()))
-      {
-         comm::CServer server(comm::CMPIManager::GetCommWorld());
-         server.run();
-         std::cout << "fin serveur" << std::endl;
-         comm::CMPIManager::Barrier();
-         
-      }
-      else
-      {
-         
-         comm::CClient client(comm::CMPIManager::GetCommWorld());
-         client.initialize();
-         client.setContext("lol");
-         
-         for (int j = 0; j < 10000; j++)
-         {
-            client.updateCalendar(j);
-            client.sendData("mon_champ0", value0);
-            client.sendData("mon_champ1", value1);
-            client.sendData("mon_champ2", value2);
-         }
-         client.finalize();
-         comm::CMPIManager::Barrier();
-      }
-      
-      comm::CMPIManager::Finalize(); // < seulement en mode connectÃ©
+      //comm::CMPIManager::Initialise(&argc, &argv); // < seulement en mode connectÃ©
+      //comm::CMPIManager::Finalize();               // < seulement en mode connectÃ©
       
      
-      /*CXIOSManager::Initialise(CXIOSManager::CLIENT_SERVER, &argc, &argv);
-      
+      CXIOSManager::Initialise(CXIOSManager::CLIENT_SERVER, &argc, &argv);      
       CXIOSManager::AddClient("nemo"    , 4, 2, &nemo_fake_entry);
       //CXIOSManager::AddClient("orchidee", 1, 1, &orchidee_fake_entry);
       //CXIOSManager::AddClient("lmdz"    , 4, 2, &lmdz_fake_entry);
       CXIOSManager::RunClientServer(comm::CMPIManager::GetCommWorld());
-      CXIOSManager::Finalize();*/
-      
-      
-
+      CXIOSManager::Finalize();     
    }
    catch (CException & exc)
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp	(revision 198)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp	(revision 199)
@@ -346,4 +346,6 @@
       const int ibegin_srv = this->domain->ibegin.getValue();
       const int jbegin_srv = this->domain->jbegin.getValue();
+      const int zoom_ni_srv   = this->domain->zoom_ni.getValue();
+      const int zoom_nj_srv   = this->domain->zoom_nj.getValue();
       
       const int ibegin_zoom_srv = this->domain->zoom_ibegin_loc.getValue();
@@ -379,6 +381,34 @@
          }
                   
-         dn += storeIndex_cl->size();
-                 
+         dn += storeIndex_cl->size();                 
+      }
+           
+      if (storeIndex_srv->size() != 0)
+      {
+         const int ibegin_t = 
+            *std::min_element(out_i_index_srv->begin(), out_i_index_srv->end());
+         const int iend_t   =
+            *std::max_element(out_i_index_srv->begin(), out_i_index_srv->end());
+         const int jbegin_t =   
+            *std::min_element(out_j_index_srv->begin(), out_j_index_srv->end());
+         const int jend_t   =
+            *std::max_element(out_j_index_srv->begin(), out_j_index_srv->end());
+            
+         if (ibegin_t < 0) 
+         {
+            std::cout << "Erreur 1 " << std::endl;
+         }
+         if (jbegin_t < 0) 
+         {
+            std::cout << "Erreur 2 " <<  std::endl;
+         }
+         if (iend_t >= zoom_ni_srv)
+         {
+            std::cout << "Erreur 3 " << std::endl;
+         }
+         if (jend_t >= zoom_nj_srv) 
+         {
+            std::cout << "Erreur 4 " << std::endl;
+         }
       }
       
@@ -392,4 +422,8 @@
       //~ }
       //~ ofs.close();
+      this->storeIndex.resize(1);
+      this->out_i_index.resize(1);
+      this->out_j_index.resize(1);
+      this->out_l_index.resize(1);
       
    }
Index: XMLIO_V2/dev/dev_rv/src/xmlio/server.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/server.cpp	(revision 198)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/server.cpp	(revision 199)
@@ -112,5 +112,5 @@
    void CServer::initialize(void) // manager 0, method 0
    {
-      std::cout << "initialize called " << std::endl;
+      // Ne rien faire de plus
    }
    
@@ -119,5 +119,5 @@
    void CServer::finalize(void) // manager 0, method 1
    {
-      std::cout << "finalize called " << std::endl;
+       comm::CMPIManager::Barrier();
    }   
    
@@ -159,5 +159,4 @@
          }
          else timestep = timestep_;
-         
       }
       std::cout << "updateCalendar called " << timestep <<std::endl;
