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 2cb2b39..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 */
@@ -238,7 +240,7 @@ void SIMIX_run(void)
     /* Clean processes to destroy */
     SIMIX_process_empty_trash();
 
-  } while (time != -1.0);
+  } while (time != -1.0 || xbt_dynar_length(simix_global->process_to_run) > 0);
 
   if (xbt_swag_size(simix_global->process_list) != 0) {
 
@@ -325,6 +327,8 @@ 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>(<pid>) on <host>: <status>.\"");
   xbt_swag_foreach(process, simix_global->process_list) {
 
     if (process->waiting_action) {
@@ -356,8 +360,11 @@ void SIMIX_display_process_status(void)
          action_description = "I/O";
          break;
       }
-      XBT_INFO("Process %ld (%s@%s): waiting for %s action %p to finish", process->pid, process->name, process->smx_host->name,
-         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);
     }
   }
 }