Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
In case of failures, a process may become runnable without time step
[simgrid.git] / src / simix / smx_global.c
index b4de7e8..3485c6b 100644 (file)
@@ -209,7 +209,9 @@ void SIMIX_run(void)
       }
     }
 
-    time = surf_solve(SIMIX_timer_next());
+    time = SIMIX_timer_next();
+    if (time != -1.0 || xbt_swag_size(simix_global->process_list) != 0)
+      time = surf_solve(time);
 
     /* Notify all the hosts that have failed */
     /* FIXME: iterate through the list of failed host and mark each of them */
@@ -234,7 +236,11 @@ void SIMIX_run(void)
           SIMIX_request_post((smx_action_t) action->data);
       }
     }
-  } while (time != -1.0);
+
+    /* Clean processes to destroy */
+    SIMIX_process_empty_trash();
+
+  } while (time != -1.0 || xbt_dynar_length(simix_global->process_to_run) > 0);
 
   if (xbt_swag_size(simix_global->process_list) != 0) {
 
@@ -322,7 +328,7 @@ void SIMIX_display_process_status(void)
   XBT_INFO("%d processes are still running, waiting for something.", nbprocess);
   /*  List the process and their state */
   XBT_INFO
-    ("Legend of the following listing: \"<process> on <host>: <status>.\"");
+    ("Legend of the following listing: \"<process>(<pid>) on <host>: <status>.\"");
   xbt_swag_foreach(process, simix_global->process_list) {
 
     if (process->waiting_action) {
@@ -354,7 +360,11 @@ void SIMIX_display_process_status(void)
          action_description = "I/O";
          break;
       }
-      XBT_INFO("Waiting for %s action %p to finish", action_description, process->waiting_action);
+      XBT_INFO("Process %ld (%s@%s): waiting for %s action %p (%s) to finish", process->pid, process->name, process->smx_host->name,
+         action_description, process->waiting_action, process->waiting_action->name);
+    }
+    else {
+      XBT_INFO("Process %ld (%s@%s)", process->pid, process->name, process->smx_host->name);
     }
   }
 }