+void WaitTestParser::parse(simgrid::xbt::ReplayAction& action, std::string)
+{
+ CHECK_ACTION_PARAMS(action, 3, 0)
+ src = std::stoi(action[2]);
+ dst = std::stoi(action[3]);
+ tag = std::stoi(action[4]);
+}
+
+void SendRecvParser::parse(simgrid::xbt::ReplayAction& action, std::string)
+{
+ CHECK_ACTION_PARAMS(action, 3, 1)
+ partner = std::stoi(action[2]);
+ tag = std::stoi(action[3]);
+ size = parse_double(action[4]);
+ if (action.size() > 5)
+ datatype1 = simgrid::smpi::Datatype::decode(action[5]);
+}
+
+void ComputeParser::parse(simgrid::xbt::ReplayAction& action, std::string)
+{
+ CHECK_ACTION_PARAMS(action, 1, 0)
+ flops = parse_double(action[2]);
+}
+
+void BcastArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
+{
+ CHECK_ACTION_PARAMS(action, 1, 2)
+ size = parse_double(action[2]);
+ root = (action.size() > 3) ? std::stoi(action[3]) : 0;
+ if (action.size() > 4)
+ datatype1 = simgrid::smpi::Datatype::decode(action[4]);
+}
+
+void ReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
+{
+ CHECK_ACTION_PARAMS(action, 2, 2)
+ comm_size = parse_double(action[2]);
+ comp_size = parse_double(action[3]);
+ root = (action.size() > 4) ? std::stoi(action[4]) : 0;
+ if (action.size() > 5)
+ datatype1 = simgrid::smpi::Datatype::decode(action[5]);
+}
+
+void AllReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
+{
+ CHECK_ACTION_PARAMS(action, 2, 1)
+ comm_size = parse_double(action[2]);
+ comp_size = parse_double(action[3]);
+ if (action.size() > 4)
+ datatype1 = simgrid::smpi::Datatype::decode(action[4]);
+}
+
+void AllToAllArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
+{
+ CHECK_ACTION_PARAMS(action, 2, 1)
+ comm_size = MPI_COMM_WORLD->size();
+ send_size = parse_double(action[2]);
+ recv_size = parse_double(action[3]);
+
+ if (action.size() > 4)
+ datatype1 = simgrid::smpi::Datatype::decode(action[4]);
+ if (action.size() > 5)
+ datatype2 = simgrid::smpi::Datatype::decode(action[5]);
+}
+
+void GatherArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+{
+ /* The structure of the gather action for the rank 0 (total 4 processes) is the following:
+ 0 gather 68 68 0 0 0
+ where:
+ 1) 68 is the sendcounts
+ 2) 68 is the recvcounts
+ 3) 0 is the root node
+ 4) 0 is the send datatype id, see simgrid::smpi::Datatype::decode()
+ 5) 0 is the recv datatype id, see simgrid::smpi::Datatype::decode()
+ */
+ CHECK_ACTION_PARAMS(action, 2, 3)
+ comm_size = MPI_COMM_WORLD->size();
+ send_size = parse_double(action[2]);
+ recv_size = parse_double(action[3]);