Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Replay: Make start_time a local variable
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Mon, 26 Mar 2018 17:56:36 +0000 (19:56 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 28 Mar 2018 15:33:52 +0000 (17:33 +0200)
src/smpi/internals/smpi_replay.cpp

index 15fdada..beb0191 100644 (file)
@@ -106,22 +106,17 @@ protected:
   const std::string name;
   T args;
 
   const std::string name;
   T args;
 
-  /*
-   * Used to compute the duration of this action.
-   */
-  double start_time;
-
   int my_proc_id;
 
 public:
   int my_proc_id;
 
 public:
-  explicit ReplayAction(std::string name) : name(name), start_time(0), my_proc_id(simgrid::s4u::Actor::self()->getPid())
+  explicit ReplayAction(std::string name) : name(name), my_proc_id(simgrid::s4u::Actor::self()->getPid())
   {
   }
 
   virtual void execute(simgrid::xbt::ReplayAction& action)
   {
     // Needs to be re-initialized for every action, hence here
   {
   }
 
   virtual void execute(simgrid::xbt::ReplayAction& action)
   {
     // Needs to be re-initialized for every action, hence here
-    start_time = smpi_process()->simulated_elapsed();
+    double start_time = smpi_process()->simulated_elapsed();
     args.parse(action);
     kernel(action);
     log_timed_action(action, start_time);
     args.parse(action);
     kernel(action);
     log_timed_action(action, start_time);