Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics and informative comments
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 25 Dec 2015 20:39:32 +0000 (21:39 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 25 Dec 2015 20:42:31 +0000 (21:42 +0100)
src/surf/host_clm03.cpp
src/surf/host_ptask_L07.cpp
src/surf/surf_c_bindings.cpp

index 21fd55e..d74a419 100644 (file)
@@ -31,8 +31,7 @@ void surf_host_model_init_current_default(void)
   surf_cpu_model_init_Cas01();
   surf_network_model_init_LegrandVelho();
 
-  simgrid::surf::Model *model = surf_host_model;
-  xbt_dynar_push(all_existing_models, &model);
+  xbt_dynar_push(all_existing_models, &surf_host_model);
 }
 
 void surf_host_model_init_compound()
index dcf61d6..7c53f9b 100644 (file)
@@ -42,8 +42,7 @@ void surf_host_model_init_ptask_L07(void)
   sg_platf_postparse_add_cb(host_add_traces);
 
   surf_host_model = new simgrid::surf::HostL07Model();
-  simgrid::surf::Model *model = surf_host_model;
-  xbt_dynar_push(all_existing_models, &model);
+  xbt_dynar_push(all_existing_models, &surf_host_model);
 }
 
 
@@ -54,7 +53,6 @@ HostL07Model::HostL07Model() : HostModel() {
   if (!ptask_maxmin_system)
        ptask_maxmin_system = lmm_system_new(1);
   p_maxminSystem = ptask_maxmin_system;
-  surf_host_model = NULL;
   surf_network_model = new NetworkL07Model(this,ptask_maxmin_system);
   surf_cpu_model_pm = new CpuL07Model(this,ptask_maxmin_system);
 
index 5dc27ce..8002a45 100644 (file)
@@ -37,8 +37,7 @@ void surf_presolve(void)
   simgrid::surf::Model *model = NULL;
   unsigned int iter;
 
-  XBT_DEBUG ("First Run! Let's \"purge\" events and put models in the right state");
-
+  XBT_DEBUG ("Consume all trace events occurring before the starting time.");
   while ((next_event_date = tmgr_history_next_date(history)) != -1.0) {
     if (next_event_date > NOW)
       break;
@@ -51,6 +50,8 @@ void surf_presolve(void)
       }
     }
   }
+
+  XBT_DEBUG ("Set every models in the right state by updating them to 0.");
   xbt_dynar_foreach(all_existing_models, iter, model)
       model->updateActionsState(NOW, 0.0);
 }