Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'actor-yield' of github.com:Takishipp/simgrid into actor-yield
[simgrid.git] / src / smpi / bindings / smpi_pmpi_request.cpp
index 53bd024..fd9d4a6 100644 (file)
@@ -406,14 +406,18 @@ int PMPI_Sendrecv(void* sendbuf, int sendcount, MPI_Datatype sendtype, int dst,
     int rank               = smpi_process()->index();
     int dst_traced         = comm->group()->index(dst);
     int src_traced         = comm->group()->index(src);
-    //    extra->src             = src_traced;
-    //    extra->dst             = dst_traced;
-    //    extra->send_size       = sendtype->is_basic() ? sendcount : sendcount * sendtype->size();
-    //    extra->recv_size       = recvtype->is_basic() ? recvcount : recvcount * recvtype->size();
-    //    extra->datatype1       = encode_datatype(sendtype);
-    //    extra->datatype2       = encode_datatype(recvtype);
-
-    // TODO TRACE_smpi_comm_in(rank, __FUNCTION__, extra);
+
+    // FIXME: Hack the way to trace this one
+    std::vector<int>* dst_hack = new std::vector<int>;
+    std::vector<int>* src_hack = new std::vector<int>;
+    dst_hack->push_back(dst_traced);
+    src_hack->push_back(src_traced);
+    TRACE_smpi_comm_in(rank, __FUNCTION__,
+                       new simgrid::instr::VarCollTIData(
+                           "sendRecv", -1, sendtype->is_basic() ? sendcount : sendcount * sendtype->size(), dst_hack,
+                           recvtype->is_basic() ? recvcount : recvcount * recvtype->size(), src_hack,
+                           encode_datatype(sendtype), encode_datatype(recvtype)));
+
     TRACE_smpi_send(rank, rank, dst_traced, sendtag, sendcount * sendtype->size());
 
     simgrid::smpi::Request::sendrecv(sendbuf, sendcount, sendtype, dst, sendtag, recvbuf, recvcount, recvtype, src,