-/* Copyright (c) 2009-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2022. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "smpi_replay.hpp"
+#include "simgrid/s4u/Exec.hpp"
#include "smpi_coll.hpp"
#include "smpi_comm.hpp"
+#include "smpi_config.hpp"
#include "smpi_datatype.hpp"
#include "smpi_group.hpp"
#include "smpi_request.hpp"
-#include "smpi_config.hpp"
-#include "simgrid/s4u/Exec.hpp"
+#include "src/smpi/include/private.hpp"
#include "xbt/replay.hpp"
-#include <simgrid/smpi/smpi_replay.hpp>
-#include <src/smpi/include/private.hpp>
#include <cmath>
#include <limits>
#include <vector>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_replay, smpi, "Trace Replay with SMPI");
-
// From https://stackoverflow.com/questions/7110301/generic-hash-for-tuples-in-unordered-map-unordered-set
// This is all just to make std::unordered_map work with std::tuple. If we need this in other places,
// this could go into a header file.
TRACE_smpi_comm_in(
get_pid(), "action_reducescatter",
new simgrid::instr::VarCollTIData(get_name(), -1, -1, nullptr, -1, args.recvcounts,
- std::to_string(args.comp_size),
+ /* ugly as we use datatype field to pass computation as string */
+ /* and because of the trick to avoid getting 0.000000 when 0 is given */
+ args.comp_size == 0 ? "0" : std::to_string(args.comp_size),
Datatype::encode(args.datatype1)));
colls::reduce_scatter(send_buffer(args.recv_size_sum * args.datatype1->size()),