- int rank = smpi_process()->index();
- instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
- extra->type = TRACING_SCAN;
-
- extra->datatype1 = encode_datatype(datatype);
- extra->send_size = datatype->is_basic() ? count : count * datatype->size();
-
- TRACE_smpi_comm_in(rank, __FUNCTION__, extra);
+ int rank = simgrid::s4u::this_actor::get_pid();
+ void* sendtmpbuf = sendbuf;
+ if (sendbuf == MPI_IN_PLACE) {
+ sendtmpbuf = static_cast<void*>(xbt_malloc(count * datatype->size()));
+ memcpy(sendtmpbuf, recvbuf, count * datatype->size());
+ }
+ TRACE_smpi_comm_in(rank, __func__, new simgrid::instr::Pt2PtTIData(
+ "scan", -1, datatype->is_replayable() ? count : count * datatype->size(),
+ simgrid::smpi::Datatype::encode(datatype)));