Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Apply the default settings of 'smpi/buffering' too
[simgrid.git] / src / smpi / bindings / smpi_pmpi_request.cpp
index 0c1f5b4..5090682 100644 (file)
@@ -66,6 +66,12 @@ int PMPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int src, int tag
   return retval;
 }
 
+int PMPI_Rsend_init(const void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm,
+                    MPI_Request* request)
+{
+  return PMPI_Send_init(buf, count, datatype, dst, tag, comm, request);
+}
+
 int PMPI_Ssend_init(const void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request* request)
 {
   int retval = 0;
@@ -262,6 +268,12 @@ int PMPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dst, int t
   return retval;
 }
 
+int PMPI_Irsend(const void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm,
+                MPI_Request* request)
+{
+  return PMPI_Isend(buf, count, datatype, dst, tag, comm, request);
+}
+
 int PMPI_Issend(const void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request* request)
 {
   int retval = 0;
@@ -390,6 +402,11 @@ int PMPI_Send(const void *buf, int count, MPI_Datatype datatype, int dst, int ta
   return retval;
 }
 
+int PMPI_Rsend(const void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm)
+{
+  return PMPI_Send(buf, count, datatype, dst, tag, comm);
+}
+
 int PMPI_Ssend(const void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm) {
   int retval = 0;
 
@@ -702,7 +719,7 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta
   }
 
   int rank_traced = simgrid::s4u::this_actor::get_pid(); // FIXME: In PMPI_Wait, we check if the comm is null?
-  TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("waitAny", static_cast<double>(count)));
+  TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("waitAny", count));
 
   *index = simgrid::smpi::Request::waitany(count, requests, status);
 
@@ -733,7 +750,7 @@ int PMPI_Waitall(int count, MPI_Request requests[], MPI_Status status[])
   }
 
   int rank_traced = simgrid::s4u::this_actor::get_pid(); // FIXME: In PMPI_Wait, we check if the comm is null?
-  TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("waitall", static_cast<double>(count)));
+  TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("waitall", count));
 
   int retval = simgrid::smpi::Request::waitall(count, requests, status);
 
@@ -826,9 +843,13 @@ int PMPI_Request_get_status( MPI_Request request, int *flag, MPI_Status *status)
 }
 
 MPI_Request PMPI_Request_f2c(MPI_Fint request){
+  if(request==-1)
+    return MPI_REQUEST_NULL;
   return static_cast<MPI_Request>(simgrid::smpi::Request::f2c(request));
 }
 
 MPI_Fint PMPI_Request_c2f(MPI_Request request) {
+  if(request==MPI_REQUEST_NULL)
+    return -1;
   return request->c2f();
 }