public:
RequestStorage() {}
- int size()
- {
- return store.size();
- }
+ int size() const { return store.size(); }
req_storage_t& get_store()
{
return store;
}
- void get_requests(std::vector<MPI_Request>& vec)
+ void get_requests(std::vector<MPI_Request>& vec) const
{
for (auto const& pair : store) {
auto& req = pair.second;
return (it == store.end()) ? MPI_REQUEST_NULL : it->second;
}
- void remove(MPI_Request req)
+ void remove(const Request* req)
{
if (req == MPI_REQUEST_NULL) return;
CHECK_ACTION_PARAMS(action, comm_size + 1, 2)
send_size = parse_double(action[2]);
disps = std::vector<int>(comm_size, 0);
- recvcounts = std::shared_ptr<std::vector<int>>(new std::vector<int>(comm_size));
+ recvcounts = std::make_shared<std::vector<int>>(comm_size);
if (name == "gatherv") {
root = (action.size() > 3 + comm_size) ? std::stoi(action[3 + comm_size]) : 0;
CHECK_ACTION_PARAMS(action, comm_size + 1, 2)
recv_size = parse_double(action[2 + comm_size]);
disps = std::vector<int>(comm_size, 0);
- sendcounts = std::shared_ptr<std::vector<int>>(new std::vector<int>(comm_size));
+ sendcounts = std::make_shared<std::vector<int>>(comm_size);
if (action.size() > 5 + comm_size)
datatype1 = simgrid::smpi::Datatype::decode(action[4 + comm_size]);
comm_size = MPI_COMM_WORLD->size();
CHECK_ACTION_PARAMS(action, comm_size + 1, 1)
comp_size = parse_double(action[2 + comm_size]);
- recvcounts = std::shared_ptr<std::vector<int>>(new std::vector<int>(comm_size));
+ recvcounts = std::make_shared<std::vector<int>>(comm_size);
if (action.size() > 3 + comm_size)
datatype1 = simgrid::smpi::Datatype::decode(action[3 + comm_size]);
*/
comm_size = MPI_COMM_WORLD->size();
CHECK_ACTION_PARAMS(action, 2 * comm_size + 2, 2)
- sendcounts = std::shared_ptr<std::vector<int>>(new std::vector<int>(comm_size));
- recvcounts = std::shared_ptr<std::vector<int>>(new std::vector<int>(comm_size));
+ sendcounts = std::make_shared<std::vector<int>>(comm_size);
+ recvcounts = std::make_shared<std::vector<int>>(comm_size);
senddisps = std::vector<int>(comm_size, 0);
recvdisps = std::vector<int>(comm_size, 0);
arg_size = status.count;
}
- bool is_recv = false; // Help analyzers understanding that status is not used unintialized
+ bool is_recv = false; // Help analyzers understanding that status is not used uninitialized
if (get_name() == "recv") {
is_recv = true;
Request::recv(nullptr, arg_size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD, &status);
int my_proc_id = simgrid::s4u::this_actor::get_pid();
- TRACE_smpi_init(my_proc_id);
- TRACE_smpi_computing_init(my_proc_id);
- TRACE_smpi_comm_in(my_proc_id, "smpi_replay_run_init", new simgrid::instr::NoOpTIData("init"));
- TRACE_smpi_comm_out(my_proc_id);
+ TRACE_smpi_init(my_proc_id, "smpi_replay_run_init");
xbt_replay_action_register("init", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::InitAction().execute(action); });
xbt_replay_action_register("finalize", [](simgrid::xbt::ReplayAction const&) { /* nothing to do */ });
xbt_replay_action_register("comm_size", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); });