Index: /XIOS/trunk/src/client_server_mapping_distributed.cpp
===================================================================
--- /XIOS/trunk/src/client_server_mapping_distributed.cpp	(revision 905)
+++ /XIOS/trunk/src/client_server_mapping_distributed.cpp	(revision 906)
@@ -13,4 +13,6 @@
 #include "utils.hpp"
 #include "mpi_tag.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
 
 namespace xios
@@ -36,8 +38,12 @@
 void CClientServerMappingDistributed::computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient)
 {
+  CContext* context=CContext::getCurrent() ;
+  CContextClient* client=context->client ;
+  int nbServer=client->serverSize;
+
   ccDHT_->computeIndexInfoMapping(globalIndexOnClient);
   const CClientClientDHTInt::Index2VectorInfoTypeMap& infoIndexMap = (ccDHT_->getInfoIndexMap());
   CClientClientDHTInt::Index2VectorInfoTypeMap::const_iterator itb = infoIndexMap.begin(), ite = infoIndexMap.end(), it;
-  std::vector<size_t> nbInfoIndex(ccDHT_->getNbClient(),0);
+  std::vector<size_t> nbInfoIndex(nbServer,0);
 
   for (it = itb; it != ite; ++it)
Index: /XIOS/trunk/src/node/axis.cpp
===================================================================
--- /XIOS/trunk/src/node/axis.cpp	(revision 905)
+++ /XIOS/trunk/src/node/axis.cpp	(revision 906)
@@ -400,4 +400,5 @@
     int nbServer = client->serverSize;
     int range, clientSize = client->clientSize;
+    int rank = client->clientRank;
 
     size_t ni = this->n.getValue();
@@ -453,12 +454,20 @@
       for (int i = 0; i < nGlobAxis.size(); ++i) globalSizeIndex *= nGlobAxis[i];
       indexBegin = 0;
-      for (int i = 0; i < clientSize; ++i)
-      {
-        range = globalSizeIndex / clientSize;
-        if (i < (globalSizeIndex%clientSize)) ++range;
-        if (i == client->clientRank) break;
-        indexBegin += range;
-      }
-      indexEnd = indexBegin + range - 1;
+      if (globalSizeIndex <= clientSize)
+      {
+        indexBegin = rank%globalSizeIndex;
+        indexEnd = indexBegin;
+      }
+      else
+      {
+        for (int i = 0; i < clientSize; ++i)
+        {
+          range = globalSizeIndex / clientSize;
+          if (i < (globalSizeIndex%clientSize)) ++range;
+          if (i == client->clientRank) break;
+          indexBegin += range;
+        }
+        indexEnd = indexBegin + range - 1;
+      }
 
       CServerDistributionDescription serverDescription(nGlobAxis, nbServer);
Index: /XIOS/trunk/src/node/domain.cpp
===================================================================
--- /XIOS/trunk/src/node/domain.cpp	(revision 905)
+++ /XIOS/trunk/src/node/domain.cpp	(revision 906)
@@ -532,5 +532,5 @@
        if (bounds_lon_end.isEmpty()) bounds_lon_end=180.-1e-8 ;
      }
-     
+
      for(j=0;j<nj;++j)
        for(i=0;i<ni;++i)
@@ -921,9 +921,9 @@
      size_t zoom_jend=global_zoom_jbegin+global_zoom_nj-1 ;
 
-     
+
      size_t dn=data_i_index.numElements() ;
      int i,j ;
      size_t k,ind ;
-     
+
      for(k=0;k<dn;k++)
      {
@@ -936,5 +936,5 @@
        {
           i=(data_i_index(k)+data_ibegin)%ni ;
-          j=(data_i_index(k)+data_ibegin)/ni ;          
+          j=(data_i_index(k)+data_ibegin)/ni ;
        }
 
@@ -947,11 +947,11 @@
      }
    }
-       
-         
-     
-
-     
-
-   
+
+
+
+
+
+
+
    void CDomain::checkEligibilityForCompressedOutput(void)
    {
@@ -1358,4 +1358,5 @@
     CContextClient* client=context->client ;
     int nbServer=client->serverSize;
+    int rank = client->clientRank;
     bool doComputeGlobalIndexServer = true;
 
@@ -1445,12 +1446,20 @@
     for (int i = 0; i < nGlobDomain_.size(); ++i) globalSizeIndex *= nGlobDomain_[i];
     indexBegin = 0;
-    for (int i = 0; i < clientSize; ++i)
-    {
-      range = globalSizeIndex / clientSize;
-      if (i < (globalSizeIndex%clientSize)) ++range;
-      if (i == client->clientRank) break;
-      indexBegin += range;
-    }
-    indexEnd = indexBegin + range - 1;
+    if (globalSizeIndex <= clientSize)
+    {
+      indexBegin = rank%globalSizeIndex;
+      indexEnd = indexBegin;
+    }
+    else
+    {
+      for (int i = 0; i < clientSize; ++i)
+      {
+        range = globalSizeIndex / clientSize;
+        if (i < (globalSizeIndex%clientSize)) ++range;
+        if (i == client->clientRank) break;
+        indexBegin += range;
+      }
+      indexEnd = indexBegin + range - 1;
+    }
 
     CServerDistributionDescription serverDescription(nGlobDomain_, nbServer);
