Index: XIOS/dev/branch_openmp/bld.cfg
===================================================================
--- XIOS/dev/branch_openmp/bld.cfg	(revision 1543)
+++ XIOS/dev/branch_openmp/bld.cfg	(revision 1544)
@@ -46,5 +46,5 @@
 #bld::target test_unstruct_omp.exe
 #bld::target test_netcdf_omp.exe
-#bld::target test_client.exe 
+bld::target test_client.exe 
 #bld::target test_complete.exe
 #bld::target test_remap.exe
Index: XIOS/dev/branch_openmp/inputs/iodef.xml
===================================================================
--- XIOS/dev/branch_openmp/inputs/iodef.xml	(revision 1543)
+++ XIOS/dev/branch_openmp/inputs/iodef.xml	(revision 1544)
@@ -8,11 +8,21 @@
    <field_definition level="1" enabled=".FALSE.">
      <field id="field_A"  operation="average" freq_op="3600s" grid_ref="grid_A"/>
+     <field id="field_Axis"  operation="average" freq_op="3600s" axis_ref="axis_A"/>
+     <field id="field_Domain"  operation="average" freq_op="3600s" domain_ref="domain_A"/>
      <field id="field_A_zoom"  operation="average" freq_op="3600s" field_ref="field_A" grid_ref="grid_A_zoom"/>
+     <field id="field_Scalar"  operation="average" freq_op="3600s" grid_ref="grid_Scalar"/>
    </field_definition>
 
 
-   <file_definition type="one_file" par_access="collective" output_freq="6h" output_level="10" enabled=".TRUE.">
-     <file id="output" name="output">
-        <field field_ref="field_A_zoom" name="field_A" />
+   <file_definition type="one_file" par_access="collective" output_freq="1h" output_level="10" enabled=".TRUE.">
+     <file id="output" name="output" enabled=".TRUE.">
+        <field field_ref="field_A" name="field_A" />
+        <field field_ref="field_A_zoom" name="field_B" />
+     </file>
+     <file id="output1" name="output1" enabled=".TRUE.">
+        <field field_ref="field_A" name="field_A" />
+     </file>
+     <file id="output2" name="output2" enabled=".TRUE.">
+        <field field_ref="field_Scalar" name="field_A" />
      </file>
    </file_definition>
@@ -22,5 +32,6 @@
      <axis id="axis_A"/>
      <axis id="axis_A_zoom" axis_ref="axis_A">
-       <zoom_axis begin="1" n="2" />
+       <!--<zoom_axis begin="1" n="2" /> -->
+       <zoom_axis index="(0,1)[0 2]" />
      </axis>
    </axis_definition>
@@ -39,26 +50,25 @@
        <axis axis_ref="axis_A_zoom" />
      </grid>
+     <grid id="grid_Scalar">
+       <scalar id="scalar_A" />
+     </grid>
    </grid_definition>
   </context>
 
-  <context id="toto" >
-  </context>
-
-  <context id="titi">
-  </context>
-
-  <context id="tata">
-  </context>
 
   <context id="xios">
       <variable_definition>
+        <variable_group id="server" >
+          <variable id="using_server2" type="bool">true</variable>
+          <variable id="ratio_server2" type="int">50</variable>
+        </variable_group>
+        
         <variable_group id="buffer">
             <variable id="optimal_buffer_size" type="string">performance</variable>
-            <variable id="buffer_size_factor" type="double">1.0</variable>
+            <variable id="buffer_size_factor" type="double">10.0</variable>
          </variable_group>
 
         <variable_group id="parameters" >
-          <variable id="using_server2" type="bool">true</variable>
-          <variable id="ratio_server2" type="int">50</variable>
+          <variable id="using_server" type="bool">false</variable>
           <variable id="info_level" type="int">50</variable>
           <variable id="print_file" type="bool">true</variable>
Index: XIOS/dev/branch_openmp/src/io/nc4_data_input.cpp
===================================================================
--- XIOS/dev/branch_openmp/src/io/nc4_data_input.cpp	(revision 1543)
+++ XIOS/dev/branch_openmp/src/io/nc4_data_input.cpp	(revision 1544)
@@ -193,30 +193,6 @@
 */
 
-    //if (!SuperClassWriter::isRectilinear(fieldId))
-    if (true)
-    {
-      for (std::list<StdString>::const_iterator it = dimList.begin(); it != dimList.end(); ++it)
+    for (std::list<StdString>::const_iterator it = dimList.begin(); it != dimList.end(); ++it)
         listDimSize.push_front(*dimSizeMap.find(*it));
-    }
-    else
-    {
-       std::list<StdString> coords = SuperClassWriter::getCoordinatesIdList(fieldId);
-       std::list<StdString>::const_iterator itCoord = coords.begin();
-       for (; itCoord != coords.end(); itCoord++)
-       {
-         const StdString& coord = *itCoord;
-         if (SuperClassWriter::hasVariable(coord) && !SuperClassWriter::isTemporal(coord))
-         {
-           std::map<StdString, StdSize> dimsTmp = SuperClassWriter::getDimensions(&coord);
-           StdString dimNameTmp = dimsTmp.begin()->first;
-           StdSize dimSizeTmp = dimsTmp.begin()->second;
-           listDimSize.push_front(make_pair(coord, dimSizeTmp));
-           dimSizeMap.erase(dimNameTmp);
-           dimList.remove(dimNameTmp);
-         }
-       }
-       for (std::list<StdString>::const_iterator it = dimList.begin(); it != dimList.end(); ++it)
-        listDimSize.push_front(*dimSizeMap.find(*it));
-    }
 
     // Now process domain and axis
Index: XIOS/dev/branch_openmp/src/io/netCdfInterface_impl.hpp
===================================================================
--- XIOS/dev/branch_openmp/src/io/netCdfInterface_impl.hpp	(revision 1543)
+++ XIOS/dev/branch_openmp/src/io/netCdfInterface_impl.hpp	(revision 1544)
@@ -86,5 +86,4 @@
   {
     int status;
-    #pragma omp critical (_netcdf)
     status = ncGetVaraType(ncid, varId, start, count, data);
     if (NC_NOERR != status)
Index: XIOS/dev/branch_openmp/src/object_factory.hpp
===================================================================
--- XIOS/dev/branch_openmp/src/object_factory.hpp	(revision 1543)
+++ XIOS/dev/branch_openmp/src/object_factory.hpp	(revision 1544)
@@ -39,5 +39,6 @@
          template <typename U>
             static  const std::vector<boost::shared_ptr<U> > &
-               GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId());
+               GetObjectVector(const StdString & context);
+               //GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId());
 
          /// Tests ///
Index: XIOS/dev/branch_openmp/src/object_template_impl.hpp
===================================================================
--- XIOS/dev/branch_openmp/src/object_template_impl.hpp	(revision 1543)
+++ XIOS/dev/branch_openmp/src/object_template_impl.hpp	(revision 1544)
@@ -430,5 +430,8 @@
    const vector<T*> CObjectTemplate<T>::getAll()
    {
-     const vector< boost::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>();
+     int tmp_rank;
+     MPI_Comm_rank(MPI_COMM_WORLD, &tmp_rank);
+     if(tmp_rank==7) printf("getCurrentContextid() = %s\n", CObjectFactory::GetCurrentContextId());
+     const vector< boost::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(CObjectFactory::GetCurrentContextId());
      vector<T*> vect;
 
Index: XIOS/dev/branch_openmp/src/test/test_client.f90
===================================================================
--- XIOS/dev/branch_openmp/src/test/test_client.f90	(revision 1543)
+++ XIOS/dev/branch_openmp/src/test/test_client.f90	(revision 1544)
@@ -37,4 +37,8 @@
 
   CALL init_wait
+  
+  CALL MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr)
+  CALL MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierr)
+  if(rank < size-2) then
 
 !!! XIOS Initialization (get the local communicator)
@@ -139,14 +143,21 @@
     CALL xios_send_field("field_Domain",field_domain)
     CALL xios_send_field("field_Scalar",scalar)
-    CALL wait_us(5000) ;
+    CALL wait_us(5000)
   ENDDO
 
   CALL xios_context_finalize()
+  CALL xios_finalize()
 
-  DEALLOCATE(lon, lat, field_A, lonvalue)
+  DEALLOCATE(lon, lat, field_A, lonvalue, axisValue, field_domain)
 
   CALL MPI_COMM_FREE(comm, ierr)
 
-  CALL xios_finalize()
+  else  !!server
+
+    CALL xios_init_server
+    print *, "Server : xios_finalize "
+  
+  endif
+    
 
   CALL MPI_FINALIZE(ierr)
Index: XIOS/dev/branch_openmp/src/test/test_complete_omp.f90
===================================================================
--- XIOS/dev/branch_openmp/src/test/test_complete_omp.f90	(revision 1543)
+++ XIOS/dev/branch_openmp/src/test/test_complete_omp.f90	(revision 1544)
@@ -47,5 +47,6 @@
   if(rank < size-2) then
 
-  !$omp parallel default(private)
+  !$omp parallel default(firstprivate) 
+!!firstprivate(dtime)
 
 !!! XIOS Initialization (get the local communicator)
@@ -248,6 +249,6 @@
 !####################################################################################
 
-    !DO ts=1,24*2
-    DO ts=1,24
+    DO ts=1,24*10
+    !DO ts=1,24
 
       CALL xios_get_handle("atmosphere",ctx_hdl)
Index: XIOS/dev/branch_openmp/src/test/test_omp.f90
===================================================================
--- XIOS/dev/branch_openmp/src/test/test_omp.f90	(revision 1543)
+++ XIOS/dev/branch_openmp/src/test/test_omp.f90	(revision 1544)
@@ -21,5 +21,5 @@
   INTEGER,PARAMETER :: nj_glo=100
   INTEGER,PARAMETER :: llm=5
-  DOUBLE PRECISION  :: lval(llm)=1
+  DOUBLE PRECISION  :: lval(llm)=1, scalar = 5
   TYPE(xios_field) :: field_hdl
   TYPE(xios_fieldgroup) :: fieldgroup_hdl
@@ -29,5 +29,5 @@
   DOUBLE PRECISION,DIMENSION(ni_glo,nj_glo) :: lon_glo,lat_glo
   DOUBLE PRECISION :: field_A_glo(ni_glo,nj_glo,llm)
-  DOUBLE PRECISION,ALLOCATABLE :: lon(:,:),lat(:,:),field_A(:,:,:), lonvalue(:,:) ;
+  DOUBLE PRECISION,ALLOCATABLE :: lon(:,:),lat(:,:),field_A(:,:,:), lonvalue(:,:), axisValue(:), field_domain(:,:)
   INTEGER :: ni,ibegin,iend,nj,jbegin,jend
   INTEGER :: i,j,l,ts,n, provided
@@ -62,5 +62,5 @@
         lat_glo(i,j)=1000+(i-1)+(j-1)*ni_glo
         DO l=1,llm
-          field_A_glo(i,j,l)=(i-1)+(j-1)*ni_glo+10000*l
+          field_A_glo(i,j,l)=(i-1)+(j-1)*ni_glo*100+10000*l
         ENDDO
       ENDDO
@@ -78,21 +78,24 @@
     iend=ibegin+ni-1 ; jend=jbegin+nj-1
 
-    ALLOCATE(lon(ni,nj),lat(ni,nj),field_A(0:ni+1,-1:nj+2,llm),lonvalue(ni,nj))
+    !ALLOCATE(lon(ni,nj),lat(ni,nj),field_A(0:ni+1,-1:nj+2,llm),lonvalue(ni,nj))
+    !lon(:,:)=lon_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+    !lat(:,:)=lat_glo(ibegin+1:iend+1,jbegin+1:jend+1)
+    !field_A(1:ni,1:nj,:)=field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,:)
+    
+    ALLOCATE(lon(ni,nj),lat(ni,nj),field_A(0:ni+1,-1:nj+2,llm),lonvalue(ni,nj), axisValue(nj_glo), field_domain(0:ni+1,-1:nj+2))
     lon(:,:)=lon_glo(ibegin+1:iend+1,jbegin+1:jend+1)
     lat(:,:)=lat_glo(ibegin+1:iend+1,jbegin+1:jend+1)
     field_A(1:ni,1:nj,:)=field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,:)
+    field_domain(1:ni,1:nj) = field_A_glo(ibegin+1:iend+1,jbegin+1:jend+1,1)
+    axisValue(1:nj_glo)=field_A_glo(1,1:nj_glo,1);
+  
 
-    !print*, "xios init OK", rank, size
 
     CALL xios_context_initialize("test",comm)
-
-    !print*, "xios_context_initialize OK", rank, size
-
     CALL xios_get_handle("test",ctx_hdl)
     CALL xios_set_current_context(ctx_hdl)
   
-  
     CALL xios_get_calendar_type(calendar_type)
-    !print*, "xios_get_calendar_type OK", rank, size
+    PRINT *, "calendar_type = ", calendar_type
 
     CALL xios_set_axis_attr("axis_A",n_glo=llm ,value=lval) ;
@@ -103,11 +106,11 @@
     !print*, "test block OK", rank, size
 
-    CALL xios_get_handle("field_definition",fieldgroup_hdl)
-    CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B")
-    CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_B")
+    !CALL xios_get_handle("field_definition",fieldgroup_hdl)
+    !CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B")
+    !CALL xios_set_attr(field_hdl,field_ref="field_A",name="field_B")
 
-    CALL xios_get_handle("output",file_hdl)
-    CALL xios_add_child(file_hdl,field_hdl)
-    CALL xios_set_attr(field_hdl,field_ref="field_A_zoom",name="field_C")
+    !CALL xios_get_handle("output",file_hdl)
+    !CALL xios_add_child(file_hdl,field_hdl)
+    !CALL xios_set_attr(field_hdl,field_ref="field_A_zoom",name="field_C")
 
     dtime%second = 3600
@@ -118,39 +121,41 @@
    ! calendar operations can be used before the context definition is closed
    CALL xios_get_time_origin(date)
-   !PRINT *, "--> year length = ", xios_get_year_length_in_seconds(date%year)
-   !PRINT *, "--> day length = ", xios_get_day_length_in_seconds()
+   PRINT *, "--> year length = ", xios_get_year_length_in_seconds(date%year)
+   PRINT *, "--> day length = ", xios_get_day_length_in_seconds()
    CALL xios_date_convert_to_string(date, date_str)
-   !PRINT *, "time_origin = ", date_str
-   !PRINT *, "xios_date_get_second_of_year(time_origin) = ", xios_date_get_second_of_year(date)
-   !PRINT *, "xios_date_get_day_of_year(time_origin) = ", xios_date_get_day_of_year(date)
-   !PRINT *, "xios_date_get_fraction_of_year(time_origin) = ", xios_date_get_fraction_of_year(date)
-   !PRINT *, "xios_date_get_second_of_day(time_origin) = ", xios_date_get_second_of_day(date)
-   !PRINT *, "xios_date_get_fraction_of_day(time_origin) = ", xios_date_get_fraction_of_day(date)
+   PRINT *, "time_origin = ", date_str
+   PRINT *, "xios_date_get_second_of_year(time_origin) = ", xios_date_get_second_of_year(date)
+   PRINT *, "xios_date_get_day_of_year(time_origin) = ", xios_date_get_day_of_year(date)
+   PRINT *, "xios_date_get_fraction_of_year(time_origin) = ", xios_date_get_fraction_of_year(date)
+   PRINT *, "xios_date_get_second_of_day(time_origin) = ", xios_date_get_second_of_day(date)
+   PRINT *, "xios_date_get_fraction_of_day(time_origin) = ", xios_date_get_fraction_of_day(date)
    dtime%timestep = 1
    dtime = 0.5 * dtime
    CALL xios_duration_convert_to_string(dtime, dtime_str)
-   !PRINT *, "duration = ", dtime_str
+   PRINT *, "duration = ", dtime_str
    date = date + 3 * (dtime + dtime)
    CALL xios_date_convert_to_string(date, date_str)
-   !PRINT *, "date = time_origin + 3 * (duration + duration) = ", date_str
-   !PRINT *, "xios_date_convert_to_seconds(date) = ", xios_date_convert_to_seconds(date)
-   !PRINT *, "xios_date_convert_to_seconds(date - 2.5h) = ", xios_date_convert_to_seconds(date - 2.5 * xios_hour)
+   PRINT *, "date = time_origin + 3 * (duration + duration) = ", date_str
+   PRINT *, "xios_date_convert_to_seconds(date) = ", xios_date_convert_to_seconds(date)
+   PRINT *, "xios_date_convert_to_seconds(date - 2.5h) = ", xios_date_convert_to_seconds(date - 2.5 * xios_hour)
 
    ni=0 ; lonvalue(:,:)=0;
    CALL xios_get_domain_attr("domain_A",ni=ni,lonvalue_2D=lonvalue)
-   !print *,"ni",ni
-   !print *,"lonvalue",lonvalue;
+   print *,"ni",ni
+   print *,"lonvalue",lonvalue;
 
    CALL xios_is_defined_field_attr("field_A",enabled=ok)
-   !PRINT *,"field_A : attribute enabled is defined ? ",ok 
-
+   PRINT *,"field_A : attribute enabled is defined ? ",ok 
    CALL xios_close_context_definition()
-   !print*, "xios_close_context_definition OK"  
 
    PRINT*,"field field_A is active ? ",xios_field_is_active("field_A")
 
-   DO ts=1,6
+   DO ts=1,4
     CALL xios_update_calendar(ts)
     CALL xios_send_field("field_A",field_A)
+    CALL xios_send_field("field_Axis",axisValue)
+    ! CALL xios_send_field("field_Axis",lval)
+    CALL xios_send_field("field_Domain",field_domain)
+    CALL xios_send_field("field_Scalar",scalar)
     CALL wait_us(5000)
    ENDDO
@@ -162,5 +167,5 @@
     print*, "xios finalize OK", rank, size
 
-    DEALLOCATE(lon, lat, field_A, lonvalue)
+    DEALLOCATE(lon, lat, field_A, lonvalue, axisValue, field_domain)
     !$omp master 
     !call MPI_Barrier(comm)
@@ -168,7 +173,5 @@
     !$omp end master
 
-     !$omp barrier
-
-     !print*, "MPI_COMM_FREE OK", rank, size
+    !$omp barrier
 
 
Index: XIOS/dev/branch_openmp/src/test/test_remap_omp.f90
===================================================================
--- XIOS/dev/branch_openmp/src/test/test_remap_omp.f90	(revision 1543)
+++ XIOS/dev/branch_openmp/src/test/test_remap_omp.f90	(revision 1544)
@@ -272,4 +272,5 @@
 
   !$omp end parallel
+  
   else
 
