Index: XIOS/dev/dev_olga/src/node/axis.cpp
===================================================================
--- XIOS/dev/dev_olga/src/node/axis.cpp	(revision 1144)
+++ XIOS/dev/dev_olga/src/node/axis.cpp	(revision 1158)
@@ -27,5 +27,5 @@
       , hasBounds_(false), isCompressible_(false)
       , numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0)
-      , transformationMap_(), hasValue(false), doZoomByIndex_(false)
+      , transformationMap_(), hasValue(false), doZoomByIndex_(false), hasLabel(false)
       , computedWrittenIndex_(false)
    {
@@ -38,5 +38,5 @@
       , hasBounds_(false), isCompressible_(false)
       , numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0)
-      , transformationMap_(), hasValue(false), doZoomByIndex_(false)
+      , transformationMap_(), hasValue(false), doZoomByIndex_(false), hasLabel(false)
       , computedWrittenIndex_(false)
    {
@@ -58,4 +58,10 @@
 
    ///---------------------------------------------------------------
+
+   const std::set<StdString> & CAxis::getRelFiles(void) const
+   {
+      return (this->relFiles);
+   }
+
    bool CAxis::IsWritten(const StdString & filename) const
    {
@@ -70,6 +76,10 @@
    bool CAxis::isDistributed(void) const
    {
-      return (!this->begin.isEmpty() && !this->n.isEmpty() && (this->begin + this->n < this->n_glo)) ||
-             (!this->n.isEmpty() && (this->n != this->n_glo));;
+      bool distributed = (!this->begin.isEmpty() && !this->n.isEmpty() && (this->begin + this->n < this->n_glo)) ||
+             (!this->n.isEmpty() && (this->n != this->n_glo));
+      // A same stupid condition to make sure that if there is only one client, axis
+      // should be considered to be distributed. This should be a temporary solution     
+      distributed |= (1 == CContext::getCurrent()->client->clientSize);
+      return distributed;
    }
 
@@ -132,5 +142,4 @@
    std::map<int, StdSize> CAxis::getAttributesBufferSize()
    {
-//     CContextClient* client = CContext::getCurrent()->client;
      // For now the assumption is that secondary server pools consist of the same number of procs.
      // CHANGE the line below if the assumption changes.
@@ -172,4 +181,7 @@
          if (hasBounds_)
            sizeValEvent += CArray<double,2>::size(2 * it->second.size());
+ 
+         if (hasLabel)
+           sizeValEvent += CArray<StdString,1>::size(it->second.size());
 
          size_t size = CEventClient::headerSize + getId().size() + sizeof(size_t) + std::max(sizeIndexEvent, sizeValEvent);
@@ -255,5 +267,6 @@
       this->checkZoom();
       this->checkMask();
-      this->checkBounds();      
+      this->checkBounds();
+      this->checkLabel();
    }
 
@@ -339,9 +352,22 @@
    }
 
-   void CAxis::checkEligibilityForCompressedOutput()
-   {
-     // We don't check if the mask is valid here, just if a mask has been defined at this point.
-     isCompressible_ = !mask.isEmpty();
-   }
+  void CAxis::checkLabel()
+  {
+    if (!label.isEmpty())
+    {
+      if (label.extent(0) != n)
+        ERROR("CAxis::checkLabel(void)",
+              << "The label array of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be of dimension of axis size." << std::endl
+              << "Axis size is " << n.getValue() << "." << std::endl
+              << "label size is "<< label.extent(0)<<  " .");
+      hasLabel = true;
+    }
+    else hasLabel = false;
+  }
+  void CAxis::checkEligibilityForCompressedOutput()
+  {
+    // We don't check if the mask is valid here, just if a mask has been defined at this point.
+    isCompressible_ = !mask.isEmpty();
+  }
 
    bool CAxis::dispatchEvent(CEventServer& event)
@@ -437,5 +463,4 @@
     CContext* context = CContext::getCurrent();
 
-    // int nbSrvPools = (context->hasServer) ? context->clientPrimServer.size() : 1;
     int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 1) : 1;
     for (int p = 0; p < nbSrvPools; ++p)
@@ -729,5 +754,4 @@
     CContext* context = CContext::getCurrent();
 
-    // int nbSrvPools = (context->hasServer) ? context->clientPrimServer.size() : 1;
     int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 1) : 1;
     for (int p = 0; p < nbSrvPools; ++p)
@@ -1071,4 +1095,9 @@
       }
     }
+
+    if (hasLabel)
+    {
+      //label_srv(ind_srv) = labelVal( ind);
+    }
   }
 
@@ -1114,4 +1143,35 @@
   }
 
+  /*!
+    Compare two axis objects. 
+    They are equal if only if they have identical attributes as well as their values.
+    Moreover, they must have the same transformations.
+  \param [in] axis Compared axis
+  \return result of the comparison
+  */
+  bool CAxis::isEqual(CAxis* obj)
+  {
+    vector<StdString> excludedAttr;
+    excludedAttr.push_back("axis_ref");
+
+    bool objEqual = SuperClass::isEqual(obj, excludedAttr);    
+    if (!objEqual) return objEqual;
+
+    TransMapTypes thisTrans = this->getAllTransformations();
+    TransMapTypes objTrans  = obj->getAllTransformations();
+
+    TransMapTypes::const_iterator it, itb, ite;
+    std::vector<ETranformationType> thisTransType, objTransType;
+    for (it = thisTrans.begin(); it != thisTrans.end(); ++it)
+      thisTransType.push_back(it->first);
+    for (it = objTrans.begin(); it != objTrans.end(); ++it)
+      objTransType.push_back(it->first);
+
+    if (thisTransType.size() != objTransType.size()) return false;
+    for (int idx = 0; idx < thisTransType.size(); ++idx)
+      objEqual &= (thisTransType[idx] == objTransType[idx]);
+
+    return objEqual;
+  }
 
   CTransformation<CAxis>* CAxis::addTransformation(ETranformationType transType, const StdString& id)
