From: cristianrosa Date: Thu, 29 Jul 2010 14:24:57 +0000 (+0000) Subject: Fix a bug in the MC that enables running programs that might yield several times... X-Git-Tag: v3_5~757 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/41ab3a8eb6cec328330730c333ed8ceb6b818254 Fix a bug in the MC that enables running programs that might yield several times on computation actions before calling a communication action. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8064 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/mc/mc_dpor.c b/src/mc/mc_dpor.c index c67d36de1f..b10416e3ad 100644 --- a/src/mc/mc_dpor.c +++ b/src/mc/mc_dpor.c @@ -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;