Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix a bug in the MC that enables running programs that might yield several times...
authorcristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 29 Jul 2010 14:24:57 +0000 (14:24 +0000)
committercristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 29 Jul 2010 14:24:57 +0000 (14:24 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8064 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/mc/mc_dpor.c

index c67d36d..b10416e 100644 (file)
@@ -27,7 +27,11 @@ void MC_dpor_init()
   /* Schedule all the processes to detect the transitions of the initial state */
   DEBUG0("**************************************************"); 
   DEBUG0("Initial state");
-  MC_schedule_enabled_processes();
+
+  while(xbt_swag_size(simix_global->process_to_run)){
+    MC_schedule_enabled_processes();
+    MC_execute_surf_actions();
+  }
 
   MC_SET_RAW_MEM;
   MC_trans_compute_enabled(initial_state->enabled_transitions,
@@ -102,8 +106,12 @@ void MC_dpor(void)
          of the transition */
       DEBUG1("Executing transition %s", trans->name);
       SIMIX_process_schedule(trans->process);
-      MC_execute_surf_actions();        /* Do surf's related black magic */
-      MC_schedule_enabled_processes();
+      MC_execute_surf_actions();
+      
+      while(xbt_swag_size(simix_global->process_to_run)){
+        MC_schedule_enabled_processes();
+        MC_execute_surf_actions();
+      }
       
       /* Calculate the enabled transitions set of the next state */
       MC_SET_RAW_MEM;