Index: XIOS/dev/branch_yushan/extern/remap/src/mpi_routing.cpp
===================================================================
--- XIOS/dev/branch_yushan/extern/remap/src/mpi_routing.cpp	(revision 1109)
+++ XIOS/dev/branch_yushan/extern/remap/src/mpi_routing.cpp	(revision 1110)
@@ -155,5 +155,9 @@
 	for (int i = 0; i < nbSource; i++)
 	{
+		#ifdef _usingEP
+		MPI_Irecv(&sourceRank[i], 1, MPI_INT, -1, 0, communicator, &request[indexRequest]);
+		#else
 		MPI_Irecv(&sourceRank[i], 1, MPI_INT, MPI_ANY_SOURCE, 0, communicator, &request[indexRequest]);
+		#endif
 		indexRequest++;
 	}
@@ -175,5 +179,9 @@
 	for (int i = 0; i < nbSource; i++)
 	{
+		#ifdef _usingEP
+		MPI_Irecv(&sourceRank[i], 1, MPI_INT, -1, 0, communicator, &request[indexRequest]);
+		#else
 		MPI_Irecv(&sourceRank[i], 1, MPI_INT, MPI_ANY_SOURCE, 0, communicator, &request[indexRequest]);
+		#endif
 		indexRequest++;
 	}
Index: XIOS/dev/branch_yushan/extern/src_ep_dev/ep_lib.hpp
===================================================================
--- XIOS/dev/branch_yushan/extern/src_ep_dev/ep_lib.hpp	(revision 1109)
+++ XIOS/dev/branch_yushan/extern/src_ep_dev/ep_lib.hpp	(revision 1110)
@@ -15,11 +15,11 @@
   typedef int MPI_Datatype;
   typedef int MPI_Op;
-  #define MPI_ANY_SOURCE -2 
-  #define MPI_ANY_TAG -1 
+  #define EP_ANY_SOURCE -2 
+  #define EP_ANY_TAG -1 
 #elif _openmpi
   typedef void* MPI_Datatype;
   typedef void* MPI_Op;
-  #define MPI_ANY_SOURCE -1 
-  #define MPI_ANY_TAG -1 
+  #define EP_ANY_SOURCE -1 
+  #define EP_ANY_TAG -1 
 #endif
 
Index: XIOS/dev/branch_yushan/extern/src_ep_dev/ep_message.cpp
===================================================================
--- XIOS/dev/branch_yushan/extern/src_ep_dev/ep_message.cpp	(revision 1109)
+++ XIOS/dev/branch_yushan/extern/src_ep_dev/ep_message.cpp	(revision 1110)
@@ -50,6 +50,5 @@
       }
       #elif _intelmpi
-      //::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status); 
-      ::MPI_Improbe(-2, -1, mpi_comm, &flag, &message, &status); 
+      ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status); 
       #endif
 
@@ -129,6 +128,5 @@
       }
       #elif _intelmpi
-      //::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status);       
-      ::MPI_Improbe(-2, -1, mpi_comm, &flag, &message, &status);       
+      ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status);       
       #endif
 
@@ -185,5 +183,5 @@
       }
       #elif _intelmpi
-      ::MPI_Improbe(-2, -1, mpi_comm, &flag, &message, &status);       
+      ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status);       
       #endif
 
Index: XIOS/dev/branch_yushan/extern/src_ep_dev/ep_probe.cpp
===================================================================
--- XIOS/dev/branch_yushan/extern/src_ep_dev/ep_probe.cpp	(revision 1109)
+++ XIOS/dev/branch_yushan/extern/src_ep_dev/ep_probe.cpp	(revision 1110)
@@ -16,5 +16,5 @@
       ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm >(comm.mpi_comm);
       ::MPI_Status *mpi_status = static_cast< ::MPI_Status* >(status->mpi_status);
-      ::MPI_Iprobe(src, tag, mpi_comm, flag, mpi_status);
+      ::MPI_Iprobe(src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, flag, mpi_status);
 
       status->mpi_status = mpi_status;
@@ -81,12 +81,12 @@
       #pragma omp critical (_mpi_call)
       {
-        ::MPI_Iprobe(src, tag, mpi_comm, flag, &mpi_status);
+        ::MPI_Iprobe(src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, flag, &mpi_status);
         if(*flag)
         {
-          ::MPI_Mprobe(src, tag, mpi_comm, &mpi_message, &mpi_status);
+          ::MPI_Mprobe(src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, &mpi_message, &mpi_status);
         }
       }
       #elif _intelmpi
-    	::MPI_Improbe(src, tag, mpi_comm, flag, &mpi_message, &mpi_status);
+    	::MPI_Improbe(src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, flag, &mpi_message, &mpi_status);
       #endif
     	
Index: XIOS/dev/branch_yushan/extern/src_ep_dev/ep_recv.cpp
===================================================================
--- XIOS/dev/branch_yushan/extern/src_ep_dev/ep_recv.cpp	(revision 1109)
+++ XIOS/dev/branch_yushan/extern/src_ep_dev/ep_recv.cpp	(revision 1110)
@@ -25,5 +25,5 @@
       ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm >(comm.mpi_comm);
       ::MPI_Status mpi_status;
-      ::MPI_Recv(buf, count, static_cast< ::MPI_Datatype >(datatype), src, tag, mpi_comm, &mpi_status);
+      ::MPI_Recv(buf, count, static_cast< ::MPI_Datatype >(datatype), src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, &mpi_status);
 
       status->ep_src = src;
@@ -57,5 +57,5 @@
 		  ::MPI_Request mpi_request;
 		  ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm > (comm.mpi_comm);
-		  ::MPI_Irecv(buf, count, static_cast< ::MPI_Datatype> (datatype), src, tag, mpi_comm, &mpi_request);
+		  ::MPI_Irecv(buf, count, static_cast< ::MPI_Datatype> (datatype), src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, &mpi_request);
 
 		  request->mpi_request = mpi_request;
Index: XIOS/dev/branch_yushan/extern/src_ep_dev/ep_type.hpp
===================================================================
--- XIOS/dev/branch_yushan/extern/src_ep_dev/ep_type.hpp	(revision 1109)
+++ XIOS/dev/branch_yushan/extern/src_ep_dev/ep_type.hpp	(revision 1110)
@@ -41,5 +41,5 @@
 namespace ep_lib
 {
-  #define MPI_UNDEFINED -32766
+  //#define EP_UNDEFINED -32766
 
   class ep_communicator;
Index: XIOS/dev/branch_yushan/src/event_scheduler.cpp
===================================================================
--- XIOS/dev/branch_yushan/src/event_scheduler.cpp	(revision 1109)
+++ XIOS/dev/branch_yushan/src/event_scheduler.cpp	(revision 1110)
@@ -133,9 +133,17 @@
     while(received)
     {
+      #ifdef _usingEP
+      MPI_Iprobe(-1,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, -1, 1, communicator, &(recvRequest->request)) ;
+        #else
         MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, MPI_ANY_SOURCE, 1, communicator, &(recvRequest->request)) ;
+        #endif
         pendingRecvParentRequest.push(recvRequest) ;
       }
@@ -175,9 +183,17 @@
     while(received)
     {
+      #ifdef _usingEP
+      MPI_Iprobe(-1,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, -1, 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/branch_yushan/src/server.cpp
===================================================================
--- XIOS/dev/branch_yushan/src/server.cpp	(revision 1109)
+++ XIOS/dev/branch_yushan/src/server.cpp	(revision 1110)
@@ -281,5 +281,9 @@
        {      
          traceOff() ;
+         #ifdef _usingEP
+         MPI_Iprobe(-1,1,CXios::globalComm, &flag, &status) ;
+         #else
          MPI_Iprobe(MPI_ANY_SOURCE,1,CXios::globalComm, &flag, &status) ;
+         #endif
          traceOn() ;
          
