Index: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_irene.sh
===================================================================
--- XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_irene.sh	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_irene.sh	(revision 1745)
@@ -79,4 +79,5 @@
 make report
 
+echo "Generic testcase report" | mailx -s "report" -a report.html yushan.wang@lsce.ipsl.fr
 
 rm -f test_*/setup.py
Index: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_jz.sh
===================================================================
--- XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_jz.sh	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_jz.sh	(revision 1745)
@@ -64,4 +64,5 @@
 make report
 
+echo "Generic testcase report" | mailx -s "report" -a report.html yushan.wang@lsce.ipsl.fr
 
 rm -f test_*/setup.py
Index: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/run_sub_test.sh
===================================================================
--- XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/run_sub_test.sh	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/run_sub_test.sh	(revision 1745)
@@ -25,4 +25,5 @@
 then
     echo "Testing on Irene"
+    echo "build_dir="$build_dir
     ccc_mprun -n $nb_proc $xios_dir/$build_dir/bin/generic_testcase.exe
 elif [[($machine_name == ada)]]
Index: XIOS/dev/dev_trunk_omp/bld.cfg
===================================================================
--- XIOS/dev/dev_trunk_omp/bld.cfg	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/bld.cfg	(revision 1745)
@@ -72,5 +72,5 @@
 bld::tool::ld        %LINKER
 bld::tool::ldflags   %LD_FLAGS 
-bld::tool::cflags    %CFLAGS %CBASE_INC -I${PWD}/extern/src_netcdf -I${PWD}/extern/boost/include -I${PWD}/extern/rapidxml/include -I${PWD}/extern/blitz/include -I${PWD}/extern/src_ep_dev 
+bld::tool::cflags    %CFLAGS %CBASE_INC -I${PWD}/extern/src_netcdf -I${PWD}/extern/boost/include -I${PWD}/extern/rapidxml/include -I${PWD}/extern/blitz/include -I${PWD}/extern/src_ep_dev
 bld::tool::fflags    %FFLAGS %FBASE_INC 
 bld::tool::cppkeys   %CPP_KEY
Index: XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_lib.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_lib.cpp	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_lib.cpp	(revision 1745)
@@ -138,9 +138,10 @@
        || datatype == MPI_LONG 
        || datatype == MPI_UNSIGNED_LONG
-       || datatype == MPI_LONG_LONG)
+       || datatype == MPI_LONG_LONG_INT)
     {
       return true;
     }
 
+    //std::cout<<"datatype="<<datatype<<",int="<<MPI_INT<<",float="<<MPI_FLOAT<<",double="<<MPI_DOUBLE<<",char="<<MPI_CHAR<<",long="<<MPI_LONG<<",u_char="<<MPI_UNSIGNED_CHAR<<",l_long="<<MPI_LONG_LONG<<std::endl;
     return false;
   }
Index: XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_reduce.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_reduce.cpp	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_reduce.cpp	(revision 1745)
@@ -343,2 +343,4 @@
 
 #endif
+
+
Index: XIOS/dev/dev_trunk_omp/inputs/iodef.xml
===================================================================
--- XIOS/dev/dev_trunk_omp/inputs/iodef.xml	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/inputs/iodef.xml	(revision 1745)
@@ -17,5 +17,5 @@
 
 
-    <file_definition type="multiple_file" par_access="collective" output_freq="1h" output_level="10" > 
+    <file_definition type="one_file" par_access="collective" output_freq="2h" output_level="10" > 
       
      <file id="output2" name="output2" output_freq="4h" enabled=".FALSE.">
@@ -37,5 +37,5 @@
         <!-- <field field_ref="field_C" name="field_C_name"  enabled=".TRUE." />  -->
         <!-- <field id="field_D" field_ref="field_A" operation="instant" build_workflow_graph=".TRUE." name="field_D_name" build_workflow_graph_start="1h" build_workflow_graph_end="2h" > sqrt(field_A) </field> -->
-        <field id="field_E" field_ref="field_A" operation="instant" build_workflow_graph=".TRUE." name="field_E_name" build_workflow_graph_start="1h" build_workflow_graph_end="4h" > field_A + field_B + field_C</field>
+        <field id="field_D" field_ref="field_A" operation="average" build_workflow_graph=".TRUE." name="field_D"  > field_A + field_B + field_C</field>
         <!-- <field field_ref="field_A_zoom" name="field_B" build_workflow_graph=".TRUE."/> -->
      </file>
@@ -88,10 +88,10 @@
         <variable_group id="buffer">
             <variable id="optimal_buffer_size" type="string">performance</variable>
-            <variable id="buffer_size_factor" type="double">10.0</variable>
+            <variable id="buffer_size_factor" type="double">1.5</variable> 
          </variable_group>
 
         <variable_group id="parameters" >
           <variable id="using_server" type="bool">false</variable>
-          <variable id="info_level" type="int">80</variable>
+          <variable id="info_level" type="int">100</variable>
           <variable id="print_file" type="bool">true</variable>
         </variable_group>
Index: XIOS/dev/dev_trunk_omp/inputs/job.sh
===================================================================
--- XIOS/dev/dev_trunk_omp/inputs/job.sh	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/inputs/job.sh	(revision 1745)
@@ -18,5 +18,5 @@
 #cp $HOME/dev/dev_yushan/bin/xios_server.exe ./
 
-ccc_mprun ../bin/test_omp.exe
+ccc_mprun ../../build_prod/bin/test_omp.exe
 #ccc_mprun ./EP_test
 #ddt -start -n 4 ./EP_test
Index: XIOS/dev/dev_trunk_omp/inputs/job_irene_openmpi.sh
===================================================================
--- XIOS/dev/dev_trunk_omp/inputs/job_irene_openmpi.sh	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/inputs/job_irene_openmpi.sh	(revision 1745)
@@ -7,5 +7,5 @@
 #MSUB -e client_error.err    #error output
 #MSUB -eo
-#MSUB -c 2 
+#MSUB -c 1 
 #MSUB -n 8  # Number of MPI tasks (SPMD case) or cores (MPMD case)
 #MSUB -X 
Index: XIOS/dev/dev_trunk_omp/make_xios
===================================================================
--- XIOS/dev/dev_trunk_omp/make_xios	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/make_xios	(revision 1745)
@@ -19,4 +19,5 @@
 arch_path_defined="FALSE"
 use_ep="FALSE"
+use_ep2="FALSE"
 # Traitement de la ligne de commande
 while (($# > 0))
@@ -65,4 +66,5 @@
          "--memtrack")  use_memtrack="true" memtrack=$2  ; shift ; shift ;;
          "--omp")   use_ep="true" ; shift ;;
+         "--omp2")   use_ep2="true" ; shift ;;
          *)         code="$1"           ; shift ;;
       esac
@@ -162,35 +164,74 @@
 if [[ "$use_ep" == "true" ]]; then
 
-if [[ "$compil_mode" == "prod" ]]
-   then
-      COMPIL_CFLAGS="%PROD_CFLAGS -D_usingEP -D_intelmpi"
-      COMPIL_FFLAGS="%PROD_FFLAGS -D_usingEP -D_intelmpi"
-elif [[ "$compil_mode" == "dev" ]]
-   then 
-      COMPIL_CFLAGS="%DEV_CFLAGS -D_usingEP -D_intelmpi"
-      COMPIL_FFLAGS="%DEV_FFLAGS -D_usingEP -D_intelmpi"
-elif [[ "$compil_mode" == "debug" ]]
-   then
-      COMPIL_CFLAGS="%DEBUG_CFLAGS -D_usingEP -D_intelmpi"
-      COMPIL_FFLAGS="%DEBUG_FFLAGS -D_usingEP -D_intelmpi"
-fi
-
-else
-
-if [[ "$compil_mode" == "prod" ]]
-   then
-      COMPIL_CFLAGS="%PROD_CFLAGS"
-      COMPIL_FFLAGS="%PROD_FFLAGS"
-elif [[ "$compil_mode" == "dev" ]]
-   then 
-      COMPIL_CFLAGS="%DEV_CFLAGS"
-      COMPIL_FFLAGS="%DEV_FFLAGS"
-elif [[ "$compil_mode" == "debug" ]]
-   then
-      COMPIL_CFLAGS="%DEBUG_CFLAGS"
-      COMPIL_FFLAGS="%DEBUG_FFLAGS"
-fi
-
-fi
+    if [[ "$compil_mode" == "prod" ]]
+        then
+        COMPIL_CFLAGS="%PROD_CFLAGS -D_usingEP -D_intelmpi"
+        COMPIL_FFLAGS="%PROD_FFLAGS -D_usingEP -D_intelmpi"
+    elif [[ "$compil_mode" == "dev" ]]
+        then 
+        COMPIL_CFLAGS="%DEV_CFLAGS -D_usingEP -D_intelmpi"
+        COMPIL_FFLAGS="%DEV_FFLAGS -D_usingEP -D_intelmpi"
+    elif [[ "$compil_mode" == "debug" ]]
+        then
+        COMPIL_CFLAGS="%DEBUG_CFLAGS -D_usingEP -D_intelmpi"
+        COMPIL_FFLAGS="%DEBUG_FFLAGS -D_usingEP -D_intelmpi"
+    fi
+
+else
+
+    if [[ "$compil_mode" == "prod" ]]
+        then
+        COMPIL_CFLAGS="%PROD_CFLAGS"
+        COMPIL_FFLAGS="%PROD_FFLAGS"
+    elif [[ "$compil_mode" == "dev" ]]
+        then 
+        COMPIL_CFLAGS="%DEV_CFLAGS"
+        COMPIL_FFLAGS="%DEV_FFLAGS"
+    elif [[ "$compil_mode" == "debug" ]]
+        then
+        COMPIL_CFLAGS="%DEBUG_CFLAGS"
+        COMPIL_FFLAGS="%DEBUG_FFLAGS"
+    fi
+
+fi
+
+
+
+if [[ "$use_ep2" == "true" ]]; then
+
+    if [[ "$compil_mode" == "prod" ]]
+        then
+        COMPIL_CFLAGS="%PROD_CFLAGS -D_usingEP -D_openmpi"
+        COMPIL_FFLAGS="%PROD_FFLAGS -D_usingEP -D_openmpi"
+    elif [[ "$compil_mode" == "dev" ]]
+        then 
+        COMPIL_CFLAGS="%DEV_CFLAGS -D_usingEP -D_openmpi"
+        COMPIL_FFLAGS="%DEV_FFLAGS -D_usingEP -D_openmpi"
+    elif [[ "$compil_mode" == "debug" ]]
+        then
+        COMPIL_CFLAGS="%DEBUG_CFLAGS -D_usingEP -D_openmpi"
+        COMPIL_FFLAGS="%DEBUG_FFLAGS -D_usingEP -D_openmpi"
+    fi
+
+else
+
+    if [[ "$compil_mode" == "prod" ]]
+        then
+        COMPIL_CFLAGS="%PROD_CFLAGS"
+        COMPIL_FFLAGS="%PROD_FFLAGS"
+    elif [[ "$compil_mode" == "dev" ]]
+        then 
+        COMPIL_CFLAGS="%DEV_CFLAGS"
+        COMPIL_FFLAGS="%DEV_FFLAGS"
+    elif [[ "$compil_mode" == "debug" ]]
+        then
+        COMPIL_CFLAGS="%DEBUG_CFLAGS"
+        COMPIL_FFLAGS="%DEBUG_FFLAGS"
+    fi
+
+fi
+
+
+
 rm -r $PWD/extern/netcdf4
 
@@ -321,2 +362,4 @@
 
 exit $build_exit_status
+
+
Index: XIOS/dev/dev_trunk_omp/src/context_server.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/context_server.cpp	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/src/context_server.cpp	(revision 1745)
@@ -83,5 +83,9 @@
 
     traceOff();
+    #ifdef _usingEP
     MPI_Iprobe(-2, 20,interComm,&flag,&status);
+    #else    
+    MPI_Iprobe(MPI_ANY_SOURCE, 20,interComm,&flag,&status);
+    #endif
     traceOn();
 
Index: XIOS/dev/dev_trunk_omp/src/event_scheduler.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/event_scheduler.cpp	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/src/event_scheduler.cpp	(revision 1745)
@@ -139,9 +139,17 @@
     while(received)
     {
+      #ifdef _usingEP 
       MPI_Iprobe(-2,1,communicator,&received, &status) ;
+      #else      
+      MPI_Iprobe(MPI_ANY_SOURCE,1,communicator,&received, &status) ;
+      #endif
       if (received)
       {
         recvRequest=new SPendingRequest ;
+        #ifdef _usingEP
         MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, -2, 1, communicator, &(recvRequest->request)) ;
+        #else
+        MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, MPI_ANY_SOURCE, 1, communicator, &(recvRequest->request)) ;
+        #endif
         pendingRecvParentRequest.push(recvRequest) ;
       }
@@ -181,9 +189,17 @@
     while(received)
     {
+      #ifdef _usingEP
       MPI_Iprobe(-2,0,communicator,&received, &status) ;
+      #else
+      MPI_Iprobe(MPI_ANY_SOURCE,0,communicator,&received, &status) ;
+      #endif
       if (received)
       {
         recvRequest=new SPendingRequest ;
+        #ifdef _usingEP
         MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, -2, 0, communicator, &recvRequest->request) ;
+        #else
+        MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, MPI_ANY_SOURCE, 0, communicator, &recvRequest->request) ;
+        #endif
         pendingRecvChildRequest.push_back(recvRequest) ;
       }
Index: XIOS/dev/dev_trunk_omp/src/interface/c/oasis_cinterface.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/interface/c/oasis_cinterface.cpp	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/src/interface/c/oasis_cinterface.cpp	(revision 1745)
@@ -22,5 +22,5 @@
     fxios_oasis_enddef() ;
   }
-
+#ifdef _usingEP
   void oasis_get_localcomm(MPI_Comm& comm)
   {
@@ -46,3 +46,33 @@
     //comm_client_server=MPI_Comm_f2c(f_comm) ;
   }
+
+#else
+
+  void oasis_get_localcomm(MPI_Comm& comm)
+  {
+    MPI_Fint f_comm ;
+    
+    fxios_oasis_get_localcomm(&f_comm) ;
+    //comm=MPI_Comm_f2c(f_comm) ;
+  }
+ 
+  void oasis_get_intracomm(MPI_Comm& comm_client_server,const std::string& server_id)
+  {
+    MPI_Fint f_comm ;
+    
+    fxios_oasis_get_intracomm(&f_comm,server_id.data(),server_id.size()) ;
+    //comm_client_server=MPI_Comm_f2c(f_comm) ;
+  }
+ 
+  void oasis_get_intercomm(MPI_Comm& comm_client_server,const std::string& server_id)
+  {
+    MPI_Fint f_comm ;
+    
+    fxios_oasis_get_intercomm(&f_comm,server_id.data(),server_id.size()) ;
+    //comm_client_server=MPI_Comm_f2c(f_comm) ;
+  }
+
+
+
+#endif
 }
Index: XIOS/dev/dev_trunk_omp/src/interface/c/oasis_cinterface.hpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/interface/c/oasis_cinterface.hpp	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/src/interface/c/oasis_cinterface.hpp	(revision 1745)
@@ -10,7 +10,13 @@
   void fxios_oasis_enddef(void) ;
   void fxios_oasis_finalize(void) ;
+#ifdef _usingEP
   void fxios_oasis_get_localcomm(ep_lib::EP_Fint* f_comm) ;
   void fxios_oasis_get_intracomm(ep_lib::EP_Fint* f_comm_client_server,const char* client_id,int str_len) ;
   void fxios_oasis_get_intercomm(ep_lib::EP_Fint* f_comm_client_server,const char* client_id,int str_len) ;
+#else
+  void fxios_oasis_get_localcomm(MPI_Fint* f_comm) ;
+  void fxios_oasis_get_intracomm(MPI_Fint* f_comm_client_server,const char* client_id,int str_len) ;
+  void fxios_oasis_get_intercomm(MPI_Fint* f_comm_client_server,const char* client_id,int str_len) ;
+#endif
 }
  
@@ -23,4 +29,5 @@
   void oasis_get_intracomm(ep_lib::MPI_Comm& comm_client_server,const std::string& server_id) ;
   void oasis_get_intercomm(ep_lib::MPI_Comm& comm_client_server,const std::string& server_id) ;
+
 }
 #endif
Index: XIOS/dev/dev_trunk_omp/src/parse_expr/yacc_parser.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/parse_expr/yacc_parser.cpp	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/src/parse_expr/yacc_parser.cpp	(revision 1745)
@@ -96,5 +96,4 @@
     yacc_globalInputText_ptr = globalInputText_ptr;
 
-    std::cout<<"========= yacc_globalInputText_ptr = "<<*yacc_globalInputText_ptr<<std::endl;
     if(globalInputText_ptr == 0) globalInputText_ptr = new std::string;
     size_t numBytesToRead = maxBytesToRead;
Index: XIOS/dev/dev_trunk_omp/src/server.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/server.cpp	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/src/server.cpp	(revision 1745)
@@ -662,5 +662,9 @@
        {
          traceOff() ;
+         #ifdef _usingEP
          MPI_Iprobe(-2,1,CXios::globalComm, &flag, &status) ;
+         #else
+         MPI_Iprobe(MPI_ANY_SOURCE,1,CXios::globalComm, &flag, &status) ;
+         #endif
          traceOn() ;
          if (flag==true)
Index: XIOS/dev/dev_trunk_omp/src/test/test_omp.f90
===================================================================
--- XIOS/dev/dev_trunk_omp/src/test/test_omp.f90	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/src/test/test_omp.f90	(revision 1745)
@@ -54,8 +54,8 @@
 
     CALL MPI_INIT_THREAD(3, provided, ierr)
-    if(provided .NE. 3) then
+!    if(provided .NE. 3) then
       print*, "provided thread level = ", provided
-      call MPI_Abort()
-    endif
+!      call MPI_Abort()
+!    endif
 
     CALL init_wait
Index: XIOS/dev/dev_trunk_omp/src/transformation/domain_algorithm_interpolate.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/src/transformation/domain_algorithm_interpolate.cpp	(revision 1744)
+++ XIOS/dev/dev_trunk_omp/src/transformation/domain_algorithm_interpolate.cpp	(revision 1745)
@@ -695,4 +695,5 @@
   {
     ep_lib::MPI_Status recvStatus;
+    #ifdef _usingEP
     MPI_Recv((recvIndexDestBuff + receivedSize),
              recvBuffSize,
@@ -702,5 +703,15 @@
              client->intraComm,
              &recvStatus);
-
+    #else
+    MPI_Recv((recvIndexDestBuff + receivedSize),
+             recvBuffSize,
+             MPI_INT,
+             MPI_ANY_SOURCE,
+             MPI_DOMAIN_INTERPOLATION_DEST_INDEX,
+             client->intraComm,
+             &recvStatus);
+  
+
+    #endif
     int countBuff = 0;
     ep_lib::MPI_Get_count(&recvStatus, MPI_INT, &countBuff);
