]> AND Public Git Repository - simgrid.git/blobdiff - examples/s4u/actions-comm/s4u_actions-comm.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
We can start the recv requests directly now, and don't have to wait for a synchro.
[simgrid.git] / examples / s4u / actions-comm / s4u_actions-comm.cpp
index e6699558a2ea8ac2df0ba0d397faf0d28975de2b..44b42d1b8c7062f0ae3dc6f04f9c65b6b4d9d024 100644 (file)
@@ -38,7 +38,7 @@ public:
       argc    = 2;
       argv[1] = &args.at(1)[0];
     }
-    xbt_replay_action_runner(argc, argv);
+    simgrid::xbt::replay_runner(argc, argv);
   }
 
   void operator()()
@@ -85,8 +85,6 @@ public:
 int main(int argc, char *argv[])
 {
   simgrid::s4u::Engine* e = new simgrid::s4u::Engine(&argc, argv);
-  /* Explicit initialization of the action module is required now*/
-  _xbt_replay_action_init();
 
   xbt_assert(argc > 2, "Usage: %s platform_file deployment_file [action_files]\n"
                        "\t# if all actions are in the same file\n"
@@ -96,7 +94,7 @@ int main(int argc, char *argv[])
              argv[0], argv[0], argv[0]);
 
   e->loadPlatform(argv[1]);
-  e->registerDefault(&xbt_replay_action_runner);
+  e->registerDefault(&simgrid::xbt::replay_runner);
   e->registerFunction<Replayer>("p0");
   e->registerFunction<Replayer>("p1");
   e->loadDeployment(argv[2]);
@@ -106,7 +104,6 @@ int main(int argc, char *argv[])
   xbt_replay_action_register("send", Replayer::send);
   xbt_replay_action_register("recv", Replayer::recv);
 
-  /* Actually do the simulation using MSG_action_trace_run */
   if (argv[3]) {
     simgrid::xbt::action_fs = new std::ifstream(argv[3], std::ifstream::in);
   }
@@ -120,7 +117,5 @@ int main(int argc, char *argv[])
 
   XBT_INFO("Simulation time %g", e->getClock());
 
-  _xbt_replay_action_exit(); /* Explicit finalization of the action module */
-
   return 0;
 }