-/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2023. 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 "private.hpp"
-#include <boost/algorithm/string.hpp>
-#include <deque>
+#include "src/simgrid/sg_config.hpp"
+#include "src/smpi/include/smpi_actor.hpp"
#include <simgrid/host.h>
#include <simgrid/s4u/Actor.hpp>
#include <simgrid/s4u/Host.hpp>
-#include <simgrid/sg_config.hpp>
+
+#include <boost/algorithm/string.hpp>
+#include <deque>
#include <string>
#include <vector>
-#include "src/smpi/include/smpi_actor.hpp"
-
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI");
static std::unordered_map<std::string, std::deque<std::string>> keys;
XBT_PRIVATE simgrid::instr::Container* smpi_container(aid_t pid)
{
- return simgrid::instr::Container::by_name(std::string("rank-") + std::to_string(pid));
+ return simgrid::instr::Container::by_name("rank-" + std::to_string(pid));
}
static std::string TRACE_smpi_put_key(aid_t src, aid_t dst, int tag, int send)
parent = simgrid::instr::Container::by_name_or_null(host->get_name());
xbt_assert(parent != nullptr, "Could not find a parent for mpi rank 'rank-%ld' at function %s", pid, __func__);
}
- parent->create_child(std::string("rank-") + std::to_string(pid), "MPI"); // This container is of type MPI
+ parent->create_child("rank-" + std::to_string(pid), "MPI"); // This container is of type MPI
}
void TRACE_smpi_init(aid_t pid, const std::string& calling_func)
if (not TRACE_smpi_is_enabled())
return;
- auto self = simgrid::s4u::Actor::self();
+ const auto* self = simgrid::s4u::Actor::self();
TRACE_smpi_setup_container(pid, sg_host_self());
simgrid::s4u::this_actor::on_exit([self](bool) { smpi_container(self->get_pid())->remove_from_parent(); });