Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / src / smpi / internals / smpi_replay.cpp
index 68570b3..701323f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-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. */
@@ -39,7 +39,7 @@ template <class T> inline void hash_combine(std::size_t& seed, T const& v)
 }
 
 // Recursive template code derived from Matthieu M.
-template <class Tuple, size_t Index = std::tuple_size<Tuple>::value - 1> class HashValueImpl {
+template <class Tuple, size_t Index = std::tuple_size_v<Tuple> - 1> class HashValueImpl {
 public:
   static void apply(size_t& seed, Tuple const& tuple)
   {
@@ -117,7 +117,7 @@ public:
   {
     for (auto const& [_, reqs] : store) {
       aid_t my_proc_id = simgrid::s4u::this_actor::get_pid();
-      for (auto& req: reqs){
+      for (const auto& req : reqs) {
         if (req != MPI_REQUEST_NULL && (req->src() == my_proc_id || req->dst() == my_proc_id)) {
           vec.push_back(req);
           req->print_request("MM");
@@ -186,7 +186,7 @@ void SleepParser::parse(simgrid::xbt::ReplayAction& action, const std::string&)
 void LocationParser::parse(simgrid::xbt::ReplayAction& action, const std::string&)
 {
   CHECK_ACTION_PARAMS(action, 2, 0)
-  filename = std::string(action[2]);
+  filename = action[2];
   line = std::stoi(action[3]);
 }
 
@@ -564,7 +564,7 @@ void SleepAction::kernel(simgrid::xbt::ReplayAction&)
 void LocationAction::kernel(simgrid::xbt::ReplayAction&)
 {
   const LocationParser& args = get_args();
-  smpi_trace_set_call_location(args.filename.c_str(), args.line);
+  smpi_trace_set_call_location(args.filename.c_str(), args.line, "replay_action");
 }
 
 void TestAction::kernel(simgrid::xbt::ReplayAction&)
@@ -920,7 +920,7 @@ void smpi_replay_main(int rank, const char* private_trace_filename)
     unsigned int i=0;
 
     for (auto const& [_, reqs] : storage[simgrid::s4u::this_actor::get_pid()].get_store()) {
-      for (auto& req : reqs) {
+      for (const auto& req : reqs) {
         requests[i] = req; // FIXME: overwritten at each iteration?
       }
       i++;