Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Offer the possibility to change smpi bandwidth and latency factor into tag config...
[simgrid.git] / src / simdag / sd_global.c
index a9065e3..3f1ceb9 100644 (file)
@@ -248,7 +248,7 @@ xbt_swag_t SD_simulate_swag(double how_long) {
 
   sd_global->watch_point_reached = 0;
 
-  while(xbt_swag_extract(sd_global->return_set)) {}
+  xbt_swag_reset(sd_global->return_set);
 
   /* explore the runnable tasks */
   xbt_swag_foreach_safe(task, task_safe, sd_global->runnable_task_set) {
@@ -395,15 +395,10 @@ void SD_exit(void)
 
   xbt_mallocator_free(sd_global->task_mallocator);
 
-  XBT_DEBUG("Destroying workstation and link arrays if necessary...");
-  if (sd_global->workstation_list != NULL)
-    xbt_free(sd_global->workstation_list);
-
-  if (sd_global->link_list != NULL)
-    xbt_free(sd_global->link_list);
-
-  if (sd_global->recyclable_route != NULL)
-    xbt_free(sd_global->recyclable_route);
+  XBT_DEBUG("Destroying workstation and link arrays...");
+  xbt_free(sd_global->workstation_list);
+  xbt_free(sd_global->link_list);
+  xbt_free(sd_global->recyclable_route);
 
   XBT_DEBUG("Destroying the swags...");
   xbt_swag_free(sd_global->not_scheduled_task_set);