Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
code killed by container usage
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 16 Mar 2017 18:41:07 +0000 (19:41 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 16 Mar 2017 18:41:07 +0000 (19:41 +0100)
examples/s4u/actions-comm/s4u_actions-comm.cpp
include/xbt/replay.hpp
src/msg/msg_actions.cpp
src/smpi/smpi_global.cpp
src/smpi/smpi_replay.cpp
src/xbt/xbt_replay.cpp

index d62c029..1cbdbfb 100644 (file)
@@ -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*/
-  simgrid::xbt::replay_init();
 
   xbt_assert(argc > 2, "Usage: %s platform_file deployment_file [action_files]\n"
                        "\t# if all actions are in the same file\n"
@@ -120,7 +118,5 @@ int main(int argc, char *argv[])
 
   XBT_INFO("Simulation time %g", e->getClock());
 
-  simgrid::xbt::replay_exit(); /* Explicit finalization of the action module */
-
   return 0;
 }
index a317f34..be41b1c 100644 (file)
@@ -22,9 +22,6 @@ typedef std::vector<std::string> ReplayAction;
 static std::unordered_map<std::string, std::queue<ReplayAction*>*> action_queues;
 
 XBT_PUBLIC_DATA(std::ifstream*) action_fs;
-XBT_PUBLIC(bool) replay_is_active();
-XBT_PUBLIC(void) replay_init();
-XBT_PUBLIC(void) replay_exit();
 XBT_PUBLIC(int) replay_runner(int argc, char* argv[]);
 }
 }
index 916aa87..4d9d7ef 100644 (file)
@@ -14,13 +14,12 @@ SG_BEGIN_DECL()
 
 void MSG_action_init()
 {
-  simgrid::xbt::replay_init();
   MSG_function_register_default(simgrid::xbt::replay_runner);
 }
 
 void MSG_action_exit()
 {
-  simgrid::xbt::replay_exit();
+  // Nothing to do anymore here
 }
 
 /** \ingroup msg_trace_driven
index c5b7734..9ca25be 100644 (file)
@@ -212,7 +212,7 @@ bool smpi_process_get_replaying(){
   if (index != MPI_UNDEFINED)
     return process_data[index_to_process_data[index]]->replaying;
   else
-    return !simgrid::xbt::replay_is_active();
+    return false;
 }
 
 int smpi_global_size()
index 031d0d8..7eabab4 100644 (file)
@@ -909,7 +909,6 @@ void smpi_replay_run(int *argc, char***argv){
   TRACE_smpi_collective_in(rank, -1, operation, extra);
   TRACE_smpi_collective_out(rank, -1, operation);
   xbt_free(operation);
-  simgrid::xbt::replay_init();
   xbt_replay_action_register("init",       action_init);
   xbt_replay_action_register("finalize",   action_finalize);
   xbt_replay_action_register("comm_size",  action_comm_size);
@@ -973,7 +972,6 @@ void smpi_replay_run(int *argc, char***argv){
   if(active_processes==0){
     /* Last process alive speaking: end the simulated timer */
     XBT_INFO("Simulation time %f", smpi_process_simulated_elapsed());
-    simgrid::xbt::replay_exit();
     xbt_free(sendbuffer);
     xbt_free(recvbuffer);
   }
index 40b5cee..856d509 100644 (file)
@@ -18,8 +18,6 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(replay,xbt,"Replay trace reader");
 
-bool is_replay_active        = false;
-
 namespace simgrid {
 namespace xbt {
 
@@ -70,22 +68,6 @@ bool ReplayReader::get(ReplayAction* action)
   }
 }
 
-void replay_init()
-{
-  if (!is_replay_active) {
-    is_replay_active  = true;
-  }
-}
-
-void replay_exit()
-{
-}
-
-bool replay_is_active()
-{
-  return is_replay_active;
-}
-
 static ReplayAction* get_action(char* name)
 {
   ReplayAction* action;
@@ -218,7 +200,5 @@ int replay_runner(int argc, char* argv[])
  */
 void xbt_replay_action_register(const char* action_name, action_fun function)
 {
-  if (!is_replay_active) // If the user registers a function before the start
-    simgrid::xbt::replay_init();
   simgrid::xbt::action_funs.insert({std::string(action_name), function});
 }