Index: /XIOS/dev/dev_trunk_omp/arch/arch-X64_IRENE.path
===================================================================
--- /XIOS/dev/dev_trunk_omp/arch/arch-X64_IRENE.path	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/arch/arch-X64_IRENE.path	(revision 1628)
@@ -1,2 +1,3 @@
+
 NETCDF_INCDIR="-I $NETCDFC_INCDIR -I $NETCDFFORTRAN_INCDIR"
 NETCDF_LIBDIR="-L $NETCDFC_LIBDIR -L $NETCDFFORTRAN_LIBDIR"
Index: /XIOS/dev/dev_trunk_omp/bld.cfg
===================================================================
--- /XIOS/dev/dev_trunk_omp/bld.cfg	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/bld.cfg	(revision 1628)
@@ -46,5 +46,5 @@
 #bld::target generate_fortran_interface.exe 
 #bld::target test_remap.exe
-#bld::target xios_server.exe 
+bld::target xios_server.exe 
 #bld::target test_regular.exe
 #bld::target test_xios2_cmip6.exe
@@ -56,4 +56,7 @@
 #bld::target test_client.exe
 bld::target test_omp.exe
+bld::target test_omp2.exe
+bld::target test_send.exe
+bld::target test_send2.exe
 #bld::target test_unstruct_complete.exe
 #bld::target test_unstructured.exe
Index: /XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_message.cpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_message.cpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_message.cpp	(revision 1628)
@@ -147,5 +147,5 @@
     {
       Debug("Message probing for intracomm\n");
-     
+/*     
       #pragma omp critical (_mpi_call)
       {
@@ -158,5 +158,7 @@
       }
 
-      
+*/    
+      ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, to_mpi_comm(comm->mpi_comm), &flag, &message, &status);      
+
       if(flag)
       {
Index: /XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_probe.cpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_probe.cpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_probe.cpp	(revision 1628)
@@ -68,8 +68,4 @@
     *flag = false;
     
-    Message_Check(comm);
-
-    #pragma omp flush
-
     #pragma omp critical (_query)
     for(Message_list::iterator it = comm->ep_comm_ptr->message_queue->begin(); it!= comm->ep_comm_ptr->message_queue->end(); ++it)
@@ -98,4 +94,37 @@
       }
     }
+    if(*flag) return 0;
+    
+    Message_Check(comm);
+
+    #pragma omp flush
+
+    #pragma omp critical (_query)
+    for(Message_list::iterator it = comm->ep_comm_ptr->message_queue->begin(); it!= comm->ep_comm_ptr->message_queue->end(); ++it)
+    {
+      bool src_matched = src<0? true: (*it)->ep_src == src;
+      bool tag_matched = tag<0? true: (*it)->ep_tag == tag;
+      
+      if(src_matched && tag_matched)        
+      {
+        Debug("find message\n");
+         
+        status->mpi_status = new ::MPI_Status(*static_cast< ::MPI_Status*>((*it)->mpi_status));
+        status->ep_src = (*it)->ep_src;
+        status->ep_tag = (*it)->ep_tag;
+        
+        if(comm->is_intercomm)
+        {
+          for(INTER_RANK_MAP::iterator iter = comm->inter_rank_map->begin(); iter != comm->inter_rank_map->end(); iter++)
+          {
+            if(iter->second == (*it)->ep_src) status->ep_src=iter->first;
+          }
+        }
+
+        *flag = true;
+        break;
+      }
+    }
+    if(*flag) return 0;
   }
 
@@ -129,8 +158,4 @@
     *flag = false;
     
-    Message_Check(comm);
-    
-    #pragma omp flush
-
     #pragma omp critical (_query)
     if(! comm->ep_comm_ptr->message_queue->empty())
@@ -179,4 +204,60 @@
       }
     }
+
+    if(*flag) return 0;
+   
+    Message_Check(comm);
+    
+    #pragma omp flush
+
+    #pragma omp critical (_query)
+    if(! comm->ep_comm_ptr->message_queue->empty())
+    {
+      for(Message_list::iterator it = comm->ep_comm_ptr->message_queue->begin(); it!= comm->ep_comm_ptr->message_queue->end(); ++it)
+      {
+                                          
+        bool src_matched = src<0? true: (*it)->ep_src == src;
+        bool tag_matched = tag<0? true: (*it)->ep_tag == tag;
+        
+        if(src_matched && tag_matched)
+        {
+          *flag = true;
+
+          status->mpi_status = new ::MPI_Status(*static_cast< ::MPI_Status*>((*it)->mpi_status));
+          memcheck("new "<< status->mpi_status << " : in ep_lib::MPI_Improbe, status->mpi_status = new ::MPI_Status");
+          status->ep_src = (*it)->ep_src;
+          status->ep_tag = (*it)->ep_tag;
+
+          (*message)->mpi_message = new ::MPI_Message(*static_cast< ::MPI_Message*>((*it)->mpi_message));
+          memcheck("new "<< (*message)->mpi_message <<" : in ep_lib::MPI_Improbe, (*message)->mpi_message = new ::MPI_Message");
+          (*message)->ep_src = (*it)->ep_src;
+          (*message)->ep_tag = (*it)->ep_tag;
+                                      
+
+          #pragma omp critical (_query2)
+          {              
+            memcheck("delete "<< (*it)->mpi_message <<" : in ep_lib::Message_Check, delete (*it)->mpi_message");
+            memcheck("delete "<< (*it)->mpi_status <<" : in ep_lib::Message_Check, delete (*it)->mpi_status");
+            memcheck("delete "<< (*it) <<" : in ep_lib::Message_Check, delete (*it)");
+            
+            
+            delete (*it)->mpi_message;     
+            delete (*it)->mpi_status; 
+            delete *it;
+            
+                       
+            comm->ep_comm_ptr->message_queue->erase(it);
+            memcheck("message_queue["<<mpi_rank<<","<<ep_rank_loc<<"]->size = "<<comm->ep_comm_ptr->message_queue->size());
+            #pragma omp flush
+          }
+          
+          break;
+        }
+
+      }
+    }
+
+    if(*flag) return 0;
+
   }
 
Index: /XIOS/dev/dev_trunk_omp/inputs/iodef.xml
===================================================================
--- /XIOS/dev/dev_trunk_omp/inputs/iodef.xml	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/inputs/iodef.xml	(revision 1628)
@@ -15,5 +15,5 @@
 
 
-   <file_definition type="one_file" par_access="collective" output_freq="1h" output_level="10" enabled=".FALSE.">
+   <file_definition type="one_file" par_access="collective" output_freq="1h" output_level="10" >
       <file id="output" name="output" enabled=".TRUE.">
         <!-- <field field_ref="field_Domain" name="field_A" /> -->
@@ -21,9 +21,9 @@
         <field field_ref="field_A_zoom" name="field_B" />
      </file>
-     <file id="output1" name="output1" enabled=".TRUE.">
+     <file id="output1" name="output1" enabled=".FALSE.">
         <!-- <field field_ref="field_Domain" name="field_A" /> -->
         <field field_ref="field_A" name="field_A" />        
-     </file> 
-     <file id="output2" name="output2" enabled=".TRUE.">
+     </file>  
+     <file id="output2" name="output2" enabled=".FALSE.">
         <!-- <field field_ref="field_Domain" name="field_A" /> -->
         <field field_ref="field_Scalar" name="field_A" />        
Index: /XIOS/dev/dev_trunk_omp/src/calendar.cpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/calendar.cpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/calendar.cpp	(revision 1628)
@@ -127,6 +127,6 @@
       const CDate& CCalendar::update(int step)
       {
-        #pragma omp critical (_output)
-        info(80) << "update step : " << step << " timestep " << this->timestep << std::endl;
+        //#pragma omp critical (_output)
+        //info(120) << "update step : " << step << " timestep " << this->timestep << std::endl;
         this->step = step;
         return (this->currentDate = this->getInitDate() + step * this->timestep);
@@ -160,10 +160,10 @@
       //-----------------------------------------------------------------
 
-      int CCalendar::getMonthLength(const CDate& date) const
+      /*int CCalendar::getMonthLength(const CDate& date) const
       { // Retourne la durÃ©e du mois en jour.
         static const int NoLeapMonthLength[] =
           { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
         return NoLeapMonthLength[date.getMonth() - 1];
-      }
+      }*/
 
       StdString CCalendar::getType(void) const { return StdString(this->getId()); }
@@ -171,9 +171,9 @@
       int CCalendar::getYearTotalLength(const CDate& date) const { return (365 * 86400); }
 
-      int CCalendar::getYearLength  (void) const { return 12; }
-      int CCalendar::getDayLength   (void) const { return 24; }
-      int CCalendar::getHourLength  (void) const { return 60; }
-      int CCalendar::getMinuteLength(void) const { return 60; }
-      int CCalendar::getDayLengthInSeconds(void) const { return getDayLength() * getHourLength() * getMinuteLength(); }
+      //int CCalendar::getYearLength  (void) const { return 12; }
+      //int CCalendar::getDayLength   (void) const { return 24; }
+      //int CCalendar::getHourLength  (void) const { return 60; }
+      //int CCalendar::getMinuteLength(void) const { return 60; }
+      //int CCalendar::getDayLengthInSeconds(void) const { return getDayLength() * getHourLength() * getMinuteLength(); }
 
       bool CCalendar::hasLeapYear() const { return false; }
Index: /XIOS/dev/dev_trunk_omp/src/calendar.hpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/calendar.hpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/calendar.hpp	(revision 1628)
@@ -72,14 +72,19 @@
             int getStep(void) const;
 
-            virtual int getMonthLength(const CDate& date) const;
+            inline int getMonthLength(const CDate& date) const
+            {
+              static const int NoLeapMonthLength[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+              return NoLeapMonthLength[date.getMonth() - 1];
+            };
 
             virtual int getYearTotalLength(const CDate& date) const; // Retourne la durÃ©e d'une annÃ©e en seconde.
 
-            virtual int getYearLength  (void) const; // Retourne la durÃ©e d'une annÃ©e en mois.
-            virtual int getDayLength   (void) const; // Retourne la durÃ©e d'un jour en heures.
-            virtual int getHourLength  (void) const; // Retourne la durÃ©e d'une heure en minute.
-            virtual int getMinuteLength(void) const; // Retourne la durÃ©e d'une minute en secondes.
+            //virtual int getYearLength  (void) const; // Retourne la durÃ©e d'une annÃ©e en mois.
+            inline int getYearLength (void) const { return 12; } ;
+            inline int getDayLength   (void) const { return 24; } ; // Retourne la durÃ©e d'un jour en heures.
+            inline int getHourLength  (void) const { return 60; } ; // Retourne la durÃ©e d'une heure en minute.
+            inline int getMinuteLength(void) const {return 60; } ; // Retourne la durÃ©e d'une minute en secondes.
             /*! Returns the day length expressed in seconds. */
-            virtual int getDayLengthInSeconds(void) const;
+            inline int getDayLengthInSeconds(void) const { return 86400; } ;
 
             virtual StdString getMonthName(int monthId) const;
Index: /XIOS/dev/dev_trunk_omp/src/calendar_util.cpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/calendar_util.cpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/calendar_util.cpp	(revision 1628)
@@ -1,3 +1,4 @@
 #include "calendar_util.hpp"
+#include "calendar.hpp"
 
 namespace xios
Index: /XIOS/dev/dev_trunk_omp/src/client.cpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/client.cpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/client.cpp	(revision 1628)
@@ -315,5 +315,5 @@
         report(0)<< " Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ;
         report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ;
-        report(100)<<CTimer::getAllCumulatedTime()<<endl ;
+        report(0)<<CTimer::getAllCumulatedTime()<<endl ;
       }
    }
Index: /XIOS/dev/dev_trunk_omp/src/date.cpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/date.cpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/date.cpp	(revision 1628)
@@ -134,10 +134,10 @@
       //----------------------------------------------------------------
 
-      int CDate::getYear  (void) const { return (this->year  ); }
-      int CDate::getMonth (void) const { return (this->month ); }
-      int CDate::getDay   (void) const { return (this->day   ); }
-      int CDate::getHour  (void) const { return (this->hour  ); }
-      int CDate::getMinute(void) const { return (this->minute); }
-      int CDate::getSecond(void) const { return (this->second); }
+      //int CDate::getYear  (void) const { return (this->year  ); }
+      //int CDate::getMonth (void) const { return (this->month ); }
+      //int CDate::getDay   (void) const { return (this->day   ); }
+      //int CDate::getHour  (void) const { return (this->hour  ); }
+      //int CDate::getMinute(void) const { return (this->minute); }
+      //int CDate::getSecond(void) const { return (this->second); }
 
       //----------------------------------------------------------------
Index: /XIOS/dev/dev_trunk_omp/src/date.hpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/date.hpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/date.hpp	(revision 1628)
@@ -43,10 +43,10 @@
 
             /// Divers accesseurs ///
-            int getYear  (void) const;
-            int getMonth (void) const;
-            int getDay   (void) const;
-            int getHour  (void) const;
-            int getMinute(void) const;
-            int getSecond(void) const;
+            inline int getYear  (void) const {return year;};
+            inline int getMonth (void) const {return month;};
+            inline int getDay   (void) const {return day;};
+            inline int getHour  (void) const {return hour;};
+            inline int getMinute(void) const {return minute;};
+            inline int getSecond(void) const {return second;};
 
             //!< Get the calendar associated to the date
Index: /XIOS/dev/dev_trunk_omp/src/node/context.cpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/node/context.cpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/node/context.cpp	(revision 1628)
@@ -1847,9 +1847,9 @@
         }
 
-        #pragma omp critical (_output)
-        info(50) << "updateCalendar : before : " << calendar->getCurrentDate() << endl;
+        //#pragma omp critical (_output)
+        info(150) << "updateCalendar : before : " << calendar->getCurrentDate() << endl;
         calendar->update(step);
-        #pragma omp critical (_output)
-        info(50) << "updateCalendar : after : " << calendar->getCurrentDate() << endl;
+        //#pragma omp critical (_output)
+        info(150) << "updateCalendar : after : " << calendar->getCurrentDate() << endl;
   #ifdef XIOS_MEMTRACK_LIGHT
         #pragma omp critical (_output)
Index: /XIOS/dev/dev_trunk_omp/src/object_factory.hpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/object_factory.hpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/object_factory.hpp	(revision 1628)
@@ -37,4 +37,7 @@
 
          template <typename U>
+            static  int CheckObjectVector();
+               
+         template <typename U>
             static  const std::vector<std::shared_ptr<U> > &
                GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId());
Index: /XIOS/dev/dev_trunk_omp/src/object_factory_decl_macro.hpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/object_factory_decl_macro.hpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/object_factory_decl_macro.hpp	(revision 1628)
@@ -10,4 +10,5 @@
   template int CObjectFactory::GetObjectIdNum<U>(void); \
   template const std::vector<std::shared_ptr<U> >& CObjectFactory::GetObjectVector<U>(const StdString& context ); \
+  template int CObjectFactory::CheckObjectVector<U>( ); \
   template bool CObjectFactory::HasObject<U>(const StdString& id); \
   template bool CObjectFactory::HasObject<U>(const StdString& context,const StdString& id); \
Index: /XIOS/dev/dev_trunk_omp/src/object_factory_impl.hpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/object_factory_impl.hpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/object_factory_impl.hpp	(revision 1628)
@@ -125,8 +125,25 @@
 
    template <typename U>
-      const std::vector<std::shared_ptr<U> > &
+   int CObjectFactory::CheckObjectVector()
+   {
+      if(U::AllVectObj_ptr)
+      {
+        return 1;
+      }
+      return 0;
+   }
+   
+
+   template <typename U>
+   const std::vector<std::shared_ptr<U> > &
          CObjectFactory::GetObjectVector(const StdString & context)
    {
-      return (*U::AllVectObj_ptr)[context];
+      if(U::AllVectObj_ptr)
+      {
+        //const std::vector<std::shared_ptr<U> > temp;
+        return (*U::AllVectObj_ptr)[context];
+        //return std::vector<std::shared_ptr<U> > (0);
+      }
+      
    }
 
Index: /XIOS/dev/dev_trunk_omp/src/object_template_impl.hpp
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/object_template_impl.hpp	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/object_template_impl.hpp	(revision 1628)
@@ -426,4 +426,10 @@
    const vector<T*> CObjectTemplate<T>::getAll()
    {
+     int mycheck = CObjectFactory::CheckObjectVector<T>();
+     if(mycheck==0)
+     {
+       vector<T*> vect;
+       return vect;
+     }
      const vector< std::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(CObjectFactory::GetCurrentContextId());
      vector<T*> vect;
Index: /XIOS/dev/dev_trunk_omp/src/test/test_omp.f90
===================================================================
--- /XIOS/dev/dev_trunk_omp/src/test/test_omp.f90	(revision 1627)
+++ /XIOS/dev/dev_trunk_omp/src/test/test_omp.f90	(revision 1628)
@@ -45,5 +45,5 @@
     CALL MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierr)
     CALL MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierr)
-    if(rank < size-2) then
+    if(rank < size-4) then
 
     !$omp parallel default(firstprivate)
