-
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
- int dst_traced = comm->group()->index(dst);
- int src_traced = comm->group()->index(src);
- instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
- extra->type = TRACING_SENDRECV;
- extra->src = src_traced;
- extra->dst = dst_traced;
- int known = 0;
- extra->datatype1 = encode_datatype(sendtype, &known);
- int dt_size_send = 1;
- if (known == 0)
- dt_size_send = sendtype->size();
- extra->send_size = sendcount * dt_size_send;
- extra->datatype2 = encode_datatype(recvtype, &known);
- int dt_size_recv = 1;
- if (known == 0)
- dt_size_recv = recvtype->size();
- extra->recv_size = recvcount * dt_size_recv;
-
- TRACE_smpi_ptp_in(rank, __FUNCTION__, extra);
- TRACE_smpi_send(rank, rank, dst_traced, sendtag, sendcount * sendtype->size());
+ int my_proc_id = simgrid::s4u::this_actor::get_pid();
+ int dst_traced = getPid(comm, dst);
+ int src_traced = getPid(comm, src);
+
+ // 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(my_proc_id, __func__,
+ new simgrid::instr::VarCollTIData(
+ "sendRecv", -1, sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
+ dst_hack, recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(), src_hack,
+ simgrid::smpi::Datatype::encode(sendtype), simgrid::smpi::Datatype::encode(recvtype)));
+
+ TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, sendtag, sendcount * sendtype->size());