Index: /XIOS/dev/branch_openmp/extern/remap/src/mpi_routing.cpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/remap/src/mpi_routing.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/remap/src/mpi_routing.cpp	(revision 1362)
@@ -152,15 +152,13 @@
 	{
 		#ifdef _usingEP
-		MPI_Irecv(&sourceRank[i], 1, MPI_INT, -2, 0, communicator, &request[indexRequest]);
+		MPI_Irecv(&sourceRank[i], 1, MPI_INT, -2, 0, communicator, &request[indexRequest++]);
 		#else
-		MPI_Irecv(&sourceRank[i], 1, MPI_INT, MPI_ANY_SOURCE, 0, communicator, &request[indexRequest]);
+		MPI_Irecv(&sourceRank[i], 1, MPI_INT, MPI_ANY_SOURCE, 0, communicator, &request[indexRequest++]);
 		#endif
-		indexRequest++;
-	}
-	MPI_Barrier(communicator);
-	for (int i = 0; i < nbTarget; i++)
-	{
-		MPI_Isend(&mpiRank, 1, MPI_INT, targetRank[i], 0, communicator, &request[indexRequest]);
-		indexRequest++;
+	}
+	MPI_Barrier(communicator);
+	for (int i = 0; i < nbTarget; i++)
+	{
+		MPI_Isend(&mpiRank, 1, MPI_INT, targetRank[i], 0, communicator, &request[indexRequest++]);
 	}
 	MPI_Waitall(indexRequest, request, status);
Index: /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_declaration.cpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_declaration.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_declaration.cpp	(revision 1362)
@@ -103,5 +103,5 @@
 
 ep_lib::MPI_Request MPI_REQUEST_NULL(MPI_REQUEST_NULL_STD);
-ep_lib::MPI_Info MPI_INFO_NULL(MPI_INFO_NULL_STD);
+ep_lib::MPI_Info MPI_INFO_NULL(&MPI_INFO_NULL_STD);
 
 
Index: /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib.cpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib.cpp	(revision 1362)
@@ -251,7 +251,16 @@
 }  
 
-
-
-
-
-
+MPI_Message to_mpi_message(void* message)
+{
+  return *(static_cast< MPI_Message* >(message));
+}
+
+MPI_Info to_mpi_info(void* info)
+{
+  return *(static_cast< MPI_Info* >(info));
+}
+
+
+
+
+
Index: /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_memory.cpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_memory.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_memory.cpp	(revision 1362)
@@ -10,5 +10,5 @@
   int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr)
   {
-    ::MPI_Alloc_mem(size.mpi_aint, static_cast< ::MPI_Info>(info.mpi_info), baseptr);
+    ::MPI_Alloc_mem(size.mpi_aint, *(static_cast< ::MPI_Info*>(info.mpi_info)), baseptr);
     //::MPI_Alloc_mem(size.mpi_aint, MPI_INFO_NULL_STD, baseptr);
     return 0;
@@ -17,5 +17,5 @@
   int MPI_Alloc_mem(unsigned long size, MPI_Info info, void *baseptr)
   {
-    ::MPI_Alloc_mem(size, static_cast< ::MPI_Info>(info.mpi_info), baseptr);
+    ::MPI_Alloc_mem(size, *(static_cast< ::MPI_Info*>(info.mpi_info)), baseptr);
     //::MPI_Alloc_mem(size, MPI_INFO_NULL_STD, baseptr);
     return 0;
Index: /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_message.cpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_message.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_message.cpp	(revision 1362)
@@ -69,5 +69,6 @@
 
         MPI_Message *msg_block = new MPI_Message; 
-        msg_block->mpi_message = message;  
+        msg_block->mpi_message = new ::MPI_Message;
+        *(static_cast< ::MPI_Message*>(msg_block->mpi_message)) = message;  
         msg_block->ep_tag = bitset<15>(status.MPI_TAG >> 16).to_ulong(); 
         int src_loc       = bitset<8> (status.MPI_TAG >> 8) .to_ulong(); 
@@ -135,6 +136,6 @@
 
         MPI_Message *msg_block = new MPI_Message;
-
-        msg_block->mpi_message = message;
+        msg_block->mpi_message = new ::MPI_Message;
+        *(static_cast< ::MPI_Message*>(msg_block->mpi_message)) = message;
         msg_block->ep_tag = bitset<15>(status.MPI_TAG >> 16).to_ulong();
         int src_loc       = bitset<8> (status.MPI_TAG >> 8) .to_ulong();
@@ -188,6 +189,6 @@
 
         MPI_Message *msg_block = new MPI_Message;
-       
-        msg_block->mpi_message = message;
+        msg_block->mpi_message = new ::MPI_Message;
+        *(static_cast< ::MPI_Message*>(msg_block->mpi_message)) = message;
         msg_block->ep_tag = bitset<15>(status.MPI_TAG >> 16).to_ulong();
         int src_loc       = bitset<8> (status.MPI_TAG >> 8) .to_ulong();
Index: /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_mpi.hpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_mpi.hpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_mpi.hpp	(revision 1362)
@@ -7,4 +7,6 @@
 MPI_Op       to_mpi_op(ep_lib::MPI_Op op);
 MPI_Comm     to_mpi_comm(void* comm);
+MPI_Message  to_mpi_message(void* message);
+MPI_Info     to_mpi_info(void* info);
 
 #endif // EP_MPI_HPP_INCLUDED
Index: /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_probe.cpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_probe.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_probe.cpp	(revision 1362)
@@ -85,5 +85,6 @@
       status->ep_tag = tag;
 
-      message->mpi_message = mpi_message;
+      message->mpi_message = new ::MPI_Message;
+      *(static_cast< ::MPI_Message*>(message->mpi_message)) = mpi_message;
       message->ep_src = src;
       message->ep_tag = tag;
Index: /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_recv.cpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_recv.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_recv.cpp	(revision 1362)
@@ -89,4 +89,5 @@
     EP_PendingRequests->push_back(request);
 
+
     Request_Check();
 
@@ -101,7 +102,7 @@
 
     ::MPI_Request mpi_request;
-    ::MPI_Message mpi_message = static_cast< ::MPI_Message >(message->mpi_message);
-		
-    ::MPI_Imrecv(buf, count, to_mpi_type(datatype), &mpi_message, &mpi_request);
+    //::MPI_Message mpi_message = *(static_cast< ::MPI_Message* >(message->mpi_message));
+    ::MPI_Imrecv(buf, count, to_mpi_type(datatype), static_cast< ::MPI_Message* >(message->mpi_message), &mpi_request);		
+    //::MPI_Imrecv(buf, count, to_mpi_type(datatype), &mpi_message, &mpi_request);
 
     request->mpi_request = mpi_request;
@@ -109,4 +110,6 @@
     request->ep_tag = message->ep_tag;
     request->ep_src = message->ep_src;
+    
+    delete message->mpi_message;
 
     return 0;
@@ -119,7 +122,7 @@
 
     ::MPI_Status mpi_status;
-    ::MPI_Message mpi_message = static_cast< ::MPI_Message >(message->mpi_message);
-    
-    ::MPI_Mrecv(buf, count, to_mpi_type(datatype), &mpi_message, &mpi_status);
+    //::MPI_Message mpi_message = *(static_cast< ::MPI_Message* >(message->mpi_message));
+    ::MPI_Mrecv(buf, count, to_mpi_type(datatype), static_cast< ::MPI_Message* >(message->mpi_message), &mpi_status);
+    //::MPI_Mrecv(buf, count, to_mpi_type(datatype), &mpi_message, &mpi_status);
 
     status->mpi_status = new ::MPI_Status(mpi_status);
@@ -127,4 +130,6 @@
     status->ep_datatype = datatype;
     status->ep_tag = message->ep_tag;
+
+    delete message->mpi_message;
 
     //check_sum_recv(buf, count, datatype, message->ep_src, message->ep_tag);
Index: /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_type.cpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_type.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_type.cpp	(revision 1362)
@@ -48,4 +48,22 @@
     intercomm = NULL;
   }
+
+  MPI_Message::MPI_Message(void* message)
+  {
+    mpi_message = new ::MPI_Message;
+    *(static_cast< ::MPI_Message*>(mpi_message)) = *(static_cast< ::MPI_Message*>(message));
+  }
+
+  MPI_Info::MPI_Info(void* info)
+  {
+    mpi_info = new ::MPI_Info;
+    *(static_cast< ::MPI_Info*>(mpi_info)) = *(static_cast< ::MPI_Info*>(info));
+  }
+  
+//  MPI_Request::MPI_Request(void* request)
+//  {
+//    mpi_request = new ::MPI_Request;
+//    *(static_cast< ::MPI_Request*>(mpi_request)) = *(static_cast< ::MPI_Request*>(request));
+//  }
 
 
Index: /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_type.hpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_type.hpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_type.hpp	(revision 1362)
@@ -67,5 +67,5 @@
     public:
 
-      int mpi_message;
+      void* mpi_message;
       int ep_src;
       int ep_tag;
@@ -73,5 +73,5 @@
 
       MPI_Message() {}
-      MPI_Message(int message): mpi_message(message) {}
+      MPI_Message(void* message);
   };
 
@@ -201,5 +201,5 @@
     EP_Comm ep_comm_ptr;
     MPI_Comm *mem_bridge;
-    int* mpi_bridge;
+    void* mpi_bridge;
 
     MPI_Comm();  
@@ -219,8 +219,8 @@
     public:
 
-      int mpi_info;
+      void* mpi_info;
 
       MPI_Info(){ }
-      MPI_Info(int info): mpi_info(info) {}
+      MPI_Info(void* info);
   };
 
@@ -242,5 +242,5 @@
 
       MPI_Request() {}
-      MPI_Request(int request): mpi_request(request) {}
+      MPI_Request(int request):mpi_request(request) {}
       bool operator == (MPI_Request right);
 
Index: /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_wait.cpp
===================================================================
--- /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_wait.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/extern/src_ep_dev/ep_wait.cpp	(revision 1362)
@@ -35,5 +35,8 @@
     ::MPI_Status mpi_status;
     ::MPI_Wait(&(request->mpi_request), &mpi_status);
-      
+
+   
+           
+ 
     // request->mpi_request = mpi_request;
 
@@ -42,4 +45,6 @@
     status->ep_tag = request->ep_tag;
     status->ep_datatype = request->ep_datatype;
+    
+
 
     return MPI_SUCCESS;
@@ -93,4 +98,5 @@
     delete[] mpi_status;
     
+    
     return MPI_SUCCESS;
   }  /* end of mpi_waitall*/
Index: /XIOS/dev/branch_openmp/src/io/inetcdf4.cpp
===================================================================
--- /XIOS/dev/branch_openmp/src/io/inetcdf4.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/src/io/inetcdf4.cpp	(revision 1362)
@@ -23,5 +23,5 @@
     // even if Parallel NetCDF ends up being used.
     if (mpi)
-      CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp);
+      CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *(static_cast<MPI_Comm*>(comm->mpi_comm)), *(static_cast<MPI_Info*>(info_null.mpi_info)), this->ncidp);
       //CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp);
     else
Index: /XIOS/dev/branch_openmp/src/io/netCdfInterface.cpp
===================================================================
--- /XIOS/dev/branch_openmp/src/io/netCdfInterface.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/src/io/netCdfInterface.cpp	(revision 1362)
@@ -49,5 +49,6 @@
 int CNetCdfInterface::createPar(const StdString& fileName, int cMode, MPI_Comm comm, MPI_Info info, int& ncId)
 {
-  int status = xios::nc_create_par(fileName.c_str(), cMode, comm, MPI_INFO_NULL.mpi_info, &ncId);
+  //int status = xios::nc_create_par(fileName.c_str(), cMode, comm, MPI_INFO_NULL.mpi_info, &ncId);
+  int status = xios::nc_create_par(fileName.c_str(), cMode, comm, *(static_cast< MPI_Info* >(MPI_INFO_NULL.mpi_info)), &ncId);
   if (NC_NOERR != status)
   {
@@ -104,5 +105,5 @@
   int status;
   #pragma omp critical (_netcdf)
-  status = xios::nc_open_par(fileName.c_str(), oMode, comm, MPI_INFO_NULL.mpi_info, &ncId);
+  status = xios::nc_open_par(fileName.c_str(), oMode, comm, *(static_cast< MPI_Info* >(MPI_INFO_NULL.mpi_info)), &ncId);
   
   if (NC_NOERR != status)
Index: /XIOS/dev/branch_openmp/src/io/onetcdf4.cpp
===================================================================
--- /XIOS/dev/branch_openmp/src/io/onetcdf4.cpp	(revision 1361)
+++ /XIOS/dev/branch_openmp/src/io/onetcdf4.cpp	(revision 1362)
@@ -58,5 +58,5 @@
             CTimer::get("Files : create").resume();
             if (wmpi)
-               CNetCdfInterface::createPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp);
+               CNetCdfInterface::createPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), *(static_cast<MPI_Info*>(info_null.mpi_info)), this->ncidp);
                //CNetCdfInterface::createPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp);
             else
@@ -71,5 +71,5 @@
             CTimer::get("Files : open").resume();
             if (wmpi)
-               CNetCdfInterface::openPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp);
+               CNetCdfInterface::openPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), *(static_cast<MPI_Info*>(info_null.mpi_info)), this->ncidp);
                //CNetCdfInterface::openPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp);
             else
