CHECK_COMM(1)
CHECK_REQUEST(2)
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Barrier" : "PMPI_Ibarrier",
new simgrid::instr::NoOpTIData(request == MPI_REQUEST_IGNORED ? "barrier" : "ibarrier"));
simgrid::smpi::colls::ibarrier(comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
CHECK_ROOT(4)
CHECK_REQUEST(6)
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
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,
}
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
}
}
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
}
}
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
const void* real_sendbuf = sendbuf;
int real_sendcount = sendcount;
MPI_Datatype real_sendtype = sendtype;
root, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
return MPI_ERR_TRUNCATE;
}
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
simgrid::smpi::colls::iallgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
CHECK_BUFFER(4, recvbuf, recvcounts[i], recvtype)
}
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
if (sendbuf == MPI_IN_PLACE) {
sendbuf = static_cast<char*>(recvbuf) + recvtype->get_extent() * displs[comm->rank()];
sendcount = recvcounts[comm->rank()];
request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
return MPI_ERR_TRUNCATE;
}
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
simgrid::smpi::colls::iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
CHECK_NOT_IN_PLACE_ROOT(4, recvbuf)
}
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
int dt_size_send = sendtype->is_replayable() ? 1 : sendtype->size();
request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
CHECK_ROOT(7)
CHECK_REQUEST(8)
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Reduce" : "PMPI_Ireduce",
simgrid::smpi::colls::ireduce(sendbuf, recvbuf, count, datatype, op, root, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
CHECK_BUFFER(2, inoutbuf, count, datatype)
CHECK_OP(5, op, datatype)
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
op->apply(inbuf, inoutbuf, &count, datatype);
- smpi_bench_begin();
return MPI_SUCCESS;
}
CHECK_BUFFER(2, recvbuf, count, datatype)
CHECK_REQUEST(7)
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
std::vector<unsigned char> tmp_sendbuf;
const void* real_sendbuf = smpi_get_in_place_buf(sendbuf, recvbuf, tmp_sendbuf, count, datatype);
simgrid::smpi::colls::iallreduce(real_sendbuf, recvbuf, count, datatype, op, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
CHECK_REQUEST(7)
CHECK_OP(5, op, datatype)
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
std::vector<unsigned char> tmp_sendbuf;
const void* real_sendbuf = smpi_get_in_place_buf(sendbuf, recvbuf, tmp_sendbuf, count, datatype);
retval = simgrid::smpi::colls::iscan(real_sendbuf, recvbuf, count, datatype, op, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return retval;
}
CHECK_REQUEST(7)
CHECK_OP(5, op, datatype)
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
std::vector<unsigned char> tmp_sendbuf;
const void* real_sendbuf = smpi_get_in_place_buf(sendbuf, recvbuf, tmp_sendbuf, count, datatype);
retval = simgrid::smpi::colls::iexscan(real_sendbuf, recvbuf, count, datatype, op, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return retval;
}
CHECK_BUFFER(2, recvbuf, recvcounts[i], datatype)
}
- smpi_bench_end();
+ 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();
simgrid::smpi::colls::ireduce_scatter(real_sendbuf, recvbuf, recvcounts, datatype, op, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
CHECK_REQUEST(7)
CHECK_OP(5, op, datatype)
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
int count = comm->size();
aid_t pid = simgrid::s4u::this_actor::get_pid();
simgrid::smpi::colls::ireduce_scatter(real_sendbuf, recvbuf, recvcounts.data(), datatype, op, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return MPI_SUCCESS;
}
return MPI_ERR_TRUNCATE;
}
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
TRACE_smpi_comm_in(pid, request == MPI_REQUEST_IGNORED ? "PMPI_Alltoall" : "PMPI_Ialltoall",
new simgrid::instr::CollTIData(
comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return retval;
}
CHECK_COUNT(6, recvcounts[i])
}
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
int send_size = 0;
int recv_size = 0;
auto trace_sendcounts = std::make_shared<std::vector<int>>();
if(recvtype->size() * recvcounts[comm->rank()] != real_sendtype->size() * real_sendcounts[comm->rank()]){
XBT_WARN("MPI_(I)Alltoallv : receive size from me differs from sent size to me : %zu vs %zu", recvtype->size() * recvcounts[comm->rank()], real_sendtype->size() * real_sendcounts[comm->rank()]);
- smpi_bench_begin();
return MPI_ERR_TRUNCATE;
}
recvcounts, recvdispls, recvtype, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return retval;
}
CHECK_BUFFER(5, recvbuf, recvcounts[i], recvtypes[i])
}
- smpi_bench_end();
+ const SmpiBenchGuard suspend_bench;
int send_size = 0;
int recv_size = 0;
const MPI_Datatype* real_sendtypes = sendtypes;
unsigned long maxsize = 0;
for (int i = 0; i < size; i++) { // copy data to avoid bad free
- if (recvtypes[i] == MPI_DATATYPE_NULL) {
- smpi_bench_begin();
+ if (recvtypes[i] == MPI_DATATYPE_NULL)
return MPI_ERR_TYPE;
- }
recv_size += recvcounts[i] * recvtypes[i]->size();
trace_recvcounts->push_back(recvcounts[i] * recvtypes[i]->size());
if ((recvdispls[i] + (recvcounts[i] * recvtypes[i]->size())) > maxsize)
if(recvtypes[comm->rank()]->size() * recvcounts[comm->rank()] != real_sendtypes[comm->rank()]->size() * real_sendcounts[comm->rank()]){
XBT_WARN("MPI_(I)Alltoallw : receive size from me differs from sent size to me : %zu vs %zu", recvtypes[comm->rank()]->size() * recvcounts[comm->rank()], real_sendtypes[comm->rank()]->size() * real_sendcounts[comm->rank()]);
- smpi_bench_begin();
return MPI_ERR_TRUNCATE;
}
recvcounts, recvdispls, recvtypes, comm, request);
TRACE_smpi_comm_out(pid);
- smpi_bench_begin();
return retval;
}