aid_t pid = simgrid::s4u::this_actor::get_pid();
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Bcast" : "PMPI_Ibcast",
new simgrid::instr::CollTIData(request == MPI_REQUEST_IGNORED ? "bcast" : "ibcast", root, -1.0,
- datatype->is_replayable() ? count : count * datatype->size(), 0,
+ count, 0,
simgrid::smpi::Datatype::encode(datatype), ""));
if (comm->size() > 1) {
if (request == MPI_REQUEST_IGNORED)
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Gather" : "PMPI_Igather",
new simgrid::instr::CollTIData(
request == MPI_REQUEST_IGNORED ? "gather" : "igather", root, -1.0,
- real_sendtype->is_replayable() ? real_sendcount : real_sendcount * real_sendtype->size(),
- (comm->rank() != root || recvtype->is_replayable()) ? recvcount : recvcount * recvtype->size(),
+ real_sendcount, recvcount,
simgrid::smpi::Datatype::encode(real_sendtype), simgrid::smpi::Datatype::encode(recvtype)));
if (request == MPI_REQUEST_IGNORED)
simgrid::smpi::colls::gather(real_sendbuf, real_sendcount, real_sendtype, recvbuf, recvcount, recvtype, root, comm);
}
aid_t pid = simgrid::s4u::this_actor::get_pid();
- int dt_size_recv = recvtype->is_replayable() ? 1 : recvtype->size();
auto trace_recvcounts = std::make_shared<std::vector<int>>();
if (rank == root) {
for (int i = 0; i < comm->size(); i++) // copy data to avoid bad free
- trace_recvcounts->push_back(recvcounts[i] * dt_size_recv);
+ trace_recvcounts->push_back(recvcounts[i]);
}
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Gatherv" : "PMPI_Igatherv",
new simgrid::instr::VarCollTIData(
request == MPI_REQUEST_IGNORED ? "gatherv" : "igatherv", root,
- real_sendtype->is_replayable() ? real_sendcount : real_sendcount * real_sendtype->size(),
- nullptr, dt_size_recv, trace_recvcounts, simgrid::smpi::Datatype::encode(real_sendtype),
+ real_sendcount,
+ nullptr, recvtype->size(), trace_recvcounts, simgrid::smpi::Datatype::encode(real_sendtype),
simgrid::smpi::Datatype::encode(recvtype)));
if (request == MPI_REQUEST_IGNORED)
simgrid::smpi::colls::gatherv(real_sendbuf, real_sendcount, real_sendtype, recvbuf, recvcounts, displs, recvtype,
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Allgather" : "PMPI_Iallggather",
new simgrid::instr::CollTIData(
request == MPI_REQUEST_IGNORED ? "allgather" : "iallgather", -1, -1.0,
- sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(),
- recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
+ sendcount, recvcount,
simgrid::smpi::Datatype::encode(sendtype), simgrid::smpi::Datatype::encode(recvtype)));
if (request == MPI_REQUEST_IGNORED)
simgrid::smpi::colls::allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
sendtype = recvtype;
}
aid_t pid = simgrid::s4u::this_actor::get_pid();
- int dt_size_recv = recvtype->is_replayable() ? 1 : recvtype->size();
auto trace_recvcounts = std::make_shared<std::vector<int>>();
for (int i = 0; i < comm->size(); i++) { // copy data to avoid bad free
- trace_recvcounts->push_back(recvcounts[i] * dt_size_recv);
+ trace_recvcounts->push_back(recvcounts[i]);
}
TRACE_smpi_comm_in(
pid, request == MPI_REQUEST_IGNORED ? "PMPI_Allgatherv" : "PMPI_Iallgatherv",
new simgrid::instr::VarCollTIData(request == MPI_REQUEST_IGNORED ? "allgatherv" : "iallgatherv", -1,
- sendtype->is_replayable() ? sendcount : sendcount * sendtype->size(), nullptr,
- dt_size_recv, trace_recvcounts, simgrid::smpi::Datatype::encode(sendtype),
+ sendcount, nullptr,
+ recvtype->size(), trace_recvcounts, simgrid::smpi::Datatype::encode(sendtype),
simgrid::smpi::Datatype::encode(recvtype)));
if (request == MPI_REQUEST_IGNORED)
simgrid::smpi::colls::allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm);
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Scatter" : "PMPI_Iscatter",
new simgrid::instr::CollTIData(
request == MPI_REQUEST_IGNORED ? "scatter" : "iscatter", root, -1.0,
- (rank != root || sendtype->is_replayable()) ? sendcount : sendcount * sendtype->size(),
- recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
+ sendcount, recvcount,
simgrid::smpi::Datatype::encode(sendtype), simgrid::smpi::Datatype::encode(recvtype)));
if (request == MPI_REQUEST_IGNORED)
simgrid::smpi::colls::scatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm);
const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
- int dt_size_send = sendtype->is_replayable() ? 1 : sendtype->size();
auto trace_sendcounts = std::make_shared<std::vector<int>>();
if (rank == root) {
for (int i = 0; i < comm->size(); i++) { // copy data to avoid bad free
- trace_sendcounts->push_back(sendcounts[i] * dt_size_send);
+ trace_sendcounts->push_back(sendcounts[i]);
}
}
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Scatterv" : "PMPI_Iscatterv",
new simgrid::instr::VarCollTIData(
- request == MPI_REQUEST_IGNORED ? "scatterv" : "iscatterv", root, dt_size_send,
- trace_sendcounts, recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
+ request == MPI_REQUEST_IGNORED ? "scatterv" : "iscatterv", root, sendtype->size(),
+ trace_sendcounts, recvcount,
nullptr, simgrid::smpi::Datatype::encode(sendtype),
simgrid::smpi::Datatype::encode(recvtype)));
if (request == MPI_REQUEST_IGNORED)
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Reduce" : "PMPI_Ireduce",
new simgrid::instr::CollTIData(request == MPI_REQUEST_IGNORED ? "reduce" : "ireduce", root, 0,
- datatype->is_replayable() ? count : count * datatype->size(), 0,
+ count, 0,
simgrid::smpi::Datatype::encode(datatype), ""));
if (request == MPI_REQUEST_IGNORED)
simgrid::smpi::colls::reduce(sendbuf, recvbuf, count, datatype, op, root, comm);
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Allreduce" : "PMPI_Iallreduce",
new simgrid::instr::CollTIData(request == MPI_REQUEST_IGNORED ? "allreduce" : "iallreduce", -1, 0,
- datatype->is_replayable() ? count : count * datatype->size(), 0,
+ count, 0,
simgrid::smpi::Datatype::encode(datatype), ""));
if (request == MPI_REQUEST_IGNORED)
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Scan" : "PMPI_Iscan",
new simgrid::instr::Pt2PtTIData(request == MPI_REQUEST_IGNORED ? "scan" : "iscan", -1,
- datatype->is_replayable() ? count : count * datatype->size(),
- simgrid::smpi::Datatype::encode(datatype)));
+ count, simgrid::smpi::Datatype::encode(datatype)));
int retval;
if (request == MPI_REQUEST_IGNORED)
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Exscan" : "PMPI_Iexscan",
new simgrid::instr::Pt2PtTIData(request == MPI_REQUEST_IGNORED ? "exscan" : "iexscan", -1,
- datatype->is_replayable() ? count : count * datatype->size(),
- simgrid::smpi::Datatype::encode(datatype)));
+ count, simgrid::smpi::Datatype::encode(datatype)));
int retval;
if (request == MPI_REQUEST_IGNORED)
const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
auto trace_recvcounts = std::make_shared<std::vector<int>>();
- int dt_send_size = datatype->is_replayable() ? 1 : datatype->size();
int totalcount = 0;
for (int i = 0; i < comm->size(); i++) { // copy data to avoid bad free
- trace_recvcounts->push_back(recvcounts[i] * dt_send_size);
+ trace_recvcounts->push_back(recvcounts[i]);
totalcount += recvcounts[i];
}
std::vector<unsigned char> tmp_sendbuf;
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Reduce_scatter" : "PMPI_Ireduce_scatter",
new simgrid::instr::VarCollTIData(
- request == MPI_REQUEST_IGNORED ? "reducescatter" : "ireducescatter", -1, dt_send_size, nullptr,
+ request == MPI_REQUEST_IGNORED ? "reducescatter" : "ireducescatter", -1, datatype->size(), nullptr,
0, trace_recvcounts, simgrid::smpi::Datatype::encode(datatype), ""));
if (request == MPI_REQUEST_IGNORED)
int count = comm->size();
aid_t pid = simgrid::s4u::this_actor::get_pid();
- int dt_send_size = datatype->is_replayable() ? 1 : datatype->size();
- auto trace_recvcounts = std::make_shared<std::vector<int>>(recvcount * dt_send_size); // copy data to avoid bad free
+ auto trace_recvcounts = std::make_shared<std::vector<int>>(recvcount); // copy data to avoid bad free
std::vector<unsigned char> tmp_sendbuf;
const void* real_sendbuf = smpi_get_in_place_buf(sendbuf, recvbuf, tmp_sendbuf, recvcount * count, datatype);
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Alltoall" : "PMPI_Ialltoall",
new simgrid::instr::CollTIData(
request == MPI_REQUEST_IGNORED ? "alltoall" : "ialltoall", -1, -1.0,
- real_sendtype->is_replayable() ? real_sendcount : real_sendcount * real_sendtype->size(),
- recvtype->is_replayable() ? recvcount : recvcount * recvtype->size(),
+ real_sendcount, recvcount,
simgrid::smpi::Datatype::encode(real_sendtype), simgrid::smpi::Datatype::encode(recvtype)));
int retval;
if (request == MPI_REQUEST_IGNORED)
int recv_size = 0;
auto trace_sendcounts = std::make_shared<std::vector<int>>();
auto trace_recvcounts = std::make_shared<std::vector<int>>();
- int dt_size_recv = recvtype->is_replayable() ? 1 : recvtype->size();
+ int dt_size_recv = recvtype->size();
const int* real_sendcounts = sendcounts;
const int* real_senddispls = senddispls;
int maxsize = 0;
for (int i = 0; i < size; i++) { // copy data to avoid bad free
recv_size += recvcounts[i] * dt_size_recv;
- trace_recvcounts->push_back(recvcounts[i] * dt_size_recv);
+ trace_recvcounts->push_back(recvcounts[i]);
if (((recvdispls[i] + recvcounts[i]) * dt_size_recv) > maxsize)
maxsize = (recvdispls[i] + recvcounts[i]) * dt_size_recv;
}
return MPI_ERR_TRUNCATE;
}
- int dt_size_send = real_sendtype->is_replayable() ? 1 : real_sendtype->size();
-
for (int i = 0; i < size; i++) { // copy data to avoid bad free
- send_size += real_sendcounts[i] * dt_size_send;
- trace_sendcounts->push_back(real_sendcounts[i] * dt_size_send);
+ send_size += real_sendcounts[i] * real_sendtype->size();
+ trace_sendcounts->push_back(real_sendcounts[i]);
}
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Alltoallv" : "PMPI_Ialltoallv",
for (int i = 0; i < size; i++) { // copy data to avoid bad free
if (recvtypes[i] == MPI_DATATYPE_NULL)
return MPI_ERR_TYPE;
- int dt_size_recv = recvtypes[i]->is_replayable() ? 1 : recvtypes[i]->size();
recv_size += recvcounts[i] * recvtypes[i]->size();
- trace_recvcounts->push_back(recvcounts[i] * dt_size_recv);
+ trace_recvcounts->push_back(recvcounts[i]);
if ((recvdispls[i] + (recvcounts[i] * recvtypes[i]->size())) > maxsize)
maxsize = recvdispls[i] + (recvcounts[i] * recvtypes[i]->size());
}
}
for (int i = 0; i < size; i++) { // copy data to avoid bad free
- int dt_size_send = real_sendtypes[i]->is_replayable() ? 1 : real_sendtypes[i]->size();
send_size += real_sendcounts[i] * real_sendtypes[i]->size();
- trace_sendcounts->push_back(real_sendcounts[i] * dt_size_send);
+ trace_sendcounts->push_back(real_sendcounts[i]);
}
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Alltoallw" : "PMPI_Ialltoallw",
aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("irecv", src,
- datatype->is_replayable() ? count : count * datatype->size(),
+ count,
tag, simgrid::smpi::Datatype::encode(datatype)));
*request = simgrid::smpi::Request::irecv(buf, count, datatype, src, tag, comm);
TRACE_smpi_comm_out(my_proc_id);
aid_t trace_dst = getPid(comm, dst);
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("isend", dst,
- datatype->is_replayable() ? count : count * datatype->size(),
+ count,
tag, simgrid::smpi::Datatype::encode(datatype)));
TRACE_smpi_send(my_proc_id, my_proc_id, trace_dst, tag, count * datatype->size());
*request = simgrid::smpi::Request::isend(buf, count, datatype, dst, tag, comm);
aid_t trace_dst = getPid(comm, dst);
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("ISsend", dst,
- datatype->is_replayable() ? count : count * datatype->size(),
+ count,
tag, simgrid::smpi::Datatype::encode(datatype)));
TRACE_smpi_send(my_proc_id, my_proc_id, trace_dst, tag, count * datatype->size());
*request = simgrid::smpi::Request::issend(buf, count, datatype, dst, tag, comm);
aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("recv", src,
- datatype->is_replayable() ? count : count * datatype->size(),
+ count,
tag, simgrid::smpi::Datatype::encode(datatype)));
retval = simgrid::smpi::Request::recv(buf, count, datatype, src, tag, comm, status);
aid_t dst_traced = getPid(comm, dst);
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("send", dst,
- datatype->is_replayable() ? count : count * datatype->size(),
+ count,
tag, simgrid::smpi::Datatype::encode(datatype)));
if (not TRACE_smpi_view_internals()) {
TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, tag, count * datatype->size());
return MPI_ERR_BUFFER;
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("bsend", dst,
- datatype->is_replayable() ? count : count * datatype->size(),
+ count,
tag, simgrid::smpi::Datatype::encode(datatype)));
if (not TRACE_smpi_view_internals()) {
TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, tag, count * datatype->size());
return MPI_ERR_BUFFER;
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("ibsend", dst,
- datatype->is_replayable() ? count : count * datatype->size(),
+ count,
tag, simgrid::smpi::Datatype::encode(datatype)));
TRACE_smpi_send(my_proc_id, my_proc_id, trace_dst, tag, count * datatype->size());
*request = simgrid::smpi::Request::ibsend(buf, count, datatype, dst, tag, comm);
aid_t dst_traced = getPid(comm, dst);
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData("Ssend", dst,
- datatype->is_replayable() ? count : count * datatype->size(),
+ count,
tag, simgrid::smpi::Datatype::encode(datatype)));
TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, tag, count * datatype->size());
simgrid::smpi::Request::ssend(buf, count, datatype, dst, tag, comm);
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,
+ "sendRecv", -1, sendcount,
+ dst_hack, recvcount, 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());
MPI_Group group;
win->get_group(&group);
TRACE_smpi_comm_in(my_proc_id, __func__,
- new simgrid::instr::Pt2PtTIData("Get", target_rank, origin_datatype->is_replayable()
- ? origin_count
- : origin_count * origin_datatype->size(),
+ new simgrid::instr::Pt2PtTIData("Get", target_rank, origin_count,
simgrid::smpi::Datatype::encode(origin_datatype)));
retval = win->get( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count,
target_datatype);
win->get_group(&group);
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
- "Rget", target_rank,
- origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
+ "Rget", target_rank, origin_count,
simgrid::smpi::Datatype::encode(origin_datatype)));
retval = win->get( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count,
win->get_group(&group);
aid_t dst_traced = group->actor(target_rank);
TRACE_smpi_comm_in(my_proc_id, __func__,
- new simgrid::instr::Pt2PtTIData("Put", target_rank, origin_datatype->is_replayable()
- ? origin_count
- : origin_count * origin_datatype->size(),
+ new simgrid::instr::Pt2PtTIData("Put", target_rank, origin_count,
simgrid::smpi::Datatype::encode(origin_datatype)));
TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, SMPI_RMA_TAG, origin_count * origin_datatype->size());
aid_t dst_traced = group->actor(target_rank);
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
- "Rput", target_rank,
- origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
+ "Rput", target_rank, origin_count,
simgrid::smpi::Datatype::encode(origin_datatype)));
TRACE_smpi_send(my_proc_id, my_proc_id, dst_traced, SMPI_RMA_TAG, origin_count * origin_datatype->size());
win->get_group(&group);
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
- "Accumulate", target_rank,
- origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
+ "Accumulate", target_rank, origin_count,
simgrid::smpi::Datatype::encode(origin_datatype)));
retval = win->accumulate( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count,
target_datatype, op);
win->get_group(&group);
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
- "Raccumulate", target_rank,
- origin_datatype->is_replayable() ? origin_count : origin_count * origin_datatype->size(),
+ "Raccumulate", target_rank, origin_count,
simgrid::smpi::Datatype::encode(origin_datatype)));
retval = win->accumulate( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count,
win->get_group(&group);
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
- "Get_accumulate", target_rank,
- target_datatype->is_replayable() ? target_count : target_count * target_datatype->size(),
+ "Get_accumulate", target_rank, target_count,
simgrid::smpi::Datatype::encode(target_datatype)));
retval = win->get_accumulate( origin_addr, origin_count, origin_datatype, result_addr,
win->get_group(&group);
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::Pt2PtTIData(
- "Rget_accumulate", target_rank,
- target_datatype->is_replayable() ? target_count : target_count * target_datatype->size(),
+ "Rget_accumulate", target_rank, target_count,
simgrid::smpi::Datatype::encode(target_datatype)));
retval = win->get_accumulate( origin_addr, origin_count, origin_datatype, result_addr,
MPI_Group group;
win->get_group(&group);
TRACE_smpi_comm_in(my_proc_id, __func__,
- new simgrid::instr::Pt2PtTIData("Compare_and_swap", target_rank,
- datatype->is_replayable() ? 1 : datatype->size(),
+ new simgrid::instr::Pt2PtTIData("Compare_and_swap", target_rank, 1,
simgrid::smpi::Datatype::encode(datatype)));
retval = win->compare_and_swap(origin_addr, compare_addr, result_addr, datatype, target_rank, target_disp);