CHECK_BUFFER(1, buf, count, datatype)
CHECK_ROOT(4)
CHECK_REQUEST(6)
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Bcast" : "PMPI_Ibcast");
- name += " with root " + std::to_string(root);
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(comm, std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Bcast" : "PMPI_Ibcast") + " with root " +
+ std::to_string(root))
const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
}
CHECK_ROOT(7)
CHECK_REQUEST(9)
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Gather" : "PMPI_Igather");
- name += " with root " + std::to_string(root);
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(comm, std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Gather" : "PMPI_Igather") + +" with root " +
+ std::to_string(root))
const void* real_sendbuf = sendbuf;
int real_sendcount = sendcount;
}
CHECK_ROOT(8)
CHECK_REQUEST(10)
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Gatherv" : "PMPI_Igatherv");
- name += " with root " + std::to_string(root);
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(comm, std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Gatherv" : "PMPI_Igatherv") +
+ " with root " + std::to_string(root))
if (rank == root){
for (int i = 0; i < comm->size(); i++) {
}
CHECK_ROOT(8)
CHECK_REQUEST(9)
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Scatter" : "PMPI_Iscatter");
- name += " with root " + std::to_string(root);
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(comm, std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Scatter" : "PMPI_Iscatter") +
+ " with root " + std::to_string(root))
if (recvbuf == MPI_IN_PLACE) {
recvtype = sendtype;
} else {
CHECK_NOT_IN_PLACE_ROOT(4, recvbuf)
}
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Scatterv" : "PMPI_Iscatterv");
- name += " with root " + std::to_string(root);
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(comm, std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Scatterv" : "PMPI_Iscatterv") +
+ " with root " + std::to_string(root))
const SmpiBenchGuard suspend_bench;
CHECK_OP(5, op, datatype)
CHECK_ROOT(7)
CHECK_REQUEST(8)
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Reduce" : "PMPI_Ireduce");
- name += " with op " + op->name();
- name += " and root " + std::to_string(root);
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(comm, std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Reduce" : "PMPI_Ireduce") + " with op " +
+ op->name() + " and root " + std::to_string(root))
const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
CHECK_BUFFER(1, sendbuf, count, datatype)
CHECK_BUFFER(2, recvbuf, count, datatype)
CHECK_REQUEST(7)
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Alleduce" : "PMPI_Iallreduce");
- name += " with op " + op->name();
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(comm, std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Alleduce" : "PMPI_Iallreduce") +
+ " with op " + op->name())
const SmpiBenchGuard suspend_bench;
std::vector<unsigned char> tmp_sendbuf;
CHECK_BUFFER(2,recvbuf,count, datatype)
CHECK_REQUEST(7)
CHECK_OP(5, op, datatype)
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Scan" : "PMPI_Iscan");
- name += " with op " + op->name();
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(comm,
+ std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Scan" : "PMPI_Iscan") + " with op " + op->name())
const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
CHECK_BUFFER(2, recvbuf, count, datatype)
CHECK_REQUEST(7)
CHECK_OP(5, op, datatype)
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Exscan" : "PMPI_Iexscan");
- name += " with op " + op->name();
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(comm, std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Exscan" : "PMPI_Iexscan") + " with op " +
+ op->name())
const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
CHECK_BUFFER(1, sendbuf, recvcounts[i], datatype)
CHECK_BUFFER(2, recvbuf, recvcounts[i], datatype)
}
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Reduce_scatter" : "PMPI_Ireduce_scatter");
- name += " with op " + op->name();
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(comm, std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Reduce_scatter" : "PMPI_Ireduce_scatter") +
+ " with op " + op->name())
const SmpiBenchGuard suspend_bench;
aid_t pid = simgrid::s4u::this_actor::get_pid();
CHECK_BUFFER(2, recvbuf, recvcount, datatype)
CHECK_REQUEST(7)
CHECK_OP(5, op, datatype)
- std::string name = (request == MPI_REQUEST_IGNORED ? "PMPI_Reduce_scatter_block" : "PMPI_Ireduce_scatter_block");
- name += " with op " + op->name();
- CHECK_COLLECTIVE(comm, name.c_str())
+ CHECK_COLLECTIVE(
+ comm, std::string(request == MPI_REQUEST_IGNORED ? "PMPI_Reduce_scatter_block" : "PMPI_Ireduce_scatter_block") +
+ " with op " + op->name())
const SmpiBenchGuard suspend_bench;
int count = comm->size();
int check_collectives_ordering(MPI_Comm comm, const std::string& call)
{
- if(_smpi_cfg_pedantic){
- unsigned int count = comm->get_collectives_count();
- comm->increment_collectives_count();
- auto vec = collective_calls.find(comm->id());
- if (vec == collective_calls.end()) {
- collective_calls.emplace(comm->id(), std::vector<std::string>{call});
- }else{
- //are we the first ? add the call
- if (vec->second.size() == count) {
- vec->second.emplace_back(call);
- } else if (vec->second.size() > count) {
- if (vec->second[count] != call){
- XBT_WARN("Collective operation mismatch. For process %ld, expected %s, got %s", simgrid::s4u::this_actor::get_pid(), vec->second[count].c_str(), call.c_str());
- return MPI_ERR_OTHER;
- }
- } else {
- THROW_IMPOSSIBLE;
+ unsigned int count = comm->get_collectives_count();
+ comm->increment_collectives_count();
+ auto vec = collective_calls.find(comm->id());
+ if (vec == collective_calls.end()) {
+ collective_calls.emplace(comm->id(), std::vector<std::string>{call});
+ } else {
+ // are we the first ? add the call
+ if (vec->second.size() == count) {
+ vec->second.emplace_back(call);
+ } else if (vec->second.size() > count) {
+ if (vec->second[count] != call) {
+ XBT_WARN("Collective operation mismatch. For process %ld, expected %s, got %s",
+ simgrid::s4u::this_actor::get_pid(), vec->second[count].c_str(), call.c_str());
+ return MPI_ERR_OTHER;
}
+ } else {
+ THROW_IMPOSSIBLE;
}
}
return MPI_SUCCESS;