From: Gabriel Corona Date: Wed, 23 Mar 2016 12:37:41 +0000 (+0100) Subject: [mc] Remove MC_init() X-Git-Tag: v3_13~326 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bcd6ed165f1847cb449a73e81918bfe83d89621b [mc] Remove MC_init() --- diff --git a/examples/msg/mc/bugged1_liveness.tesh b/examples/msg/mc/bugged1_liveness.tesh index 68f00f2e0c..c895a37ab2 100644 --- a/examples/msg/mc/bugged1_liveness.tesh +++ b/examples/msg/mc/bugged1_liveness.tesh @@ -12,7 +12,7 @@ $ ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/bugged1_liveness ${srcdir:=. > [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle > [ 0.000000] (3:client@Fafard) Ask the request > [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly -> [ 0.000000] (0:maestro@) Pair 23 already reached (equal to pair 11) ! +> [ 0.000000] (0:maestro@) Pair 22 already reached (equal to pair 10) ! > [ 0.000000] (0:maestro@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > [ 0.000000] (0:maestro@) | ACCEPTANCE CYCLE | > [ 0.000000] (0:maestro@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* @@ -37,8 +37,7 @@ $ ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/bugged1_liveness ${srcdir:=. > [ 0.000000] (0:maestro@) [(3)Fafard (client)] Wait(comm=(verbose only) [(3)Fafard (client)-> (1)Tremblay (coordinator)]) > [ 0.000000] (0:maestro@) [(3)Fafard (client)] iSend(src=(3)Fafard (client), buff=(verbose only), size=(verbose only)) > [ 0.000000] (0:maestro@) [(1)Tremblay (coordinator)] Wait(comm=(verbose only) [(3)Fafard (client)-> (1)Tremblay (coordinator)]) -> [ 0.000000] (0:maestro@) [(1)Tremblay (coordinator)] iSend(src=(1)Tremblay (coordinator), buff=(verbose only), size=(verbose only)) -> [ 0.000000] (0:maestro@) Expanded pairs = 23 -> [ 0.000000] (0:maestro@) Visited pairs = 21 -> [ 0.000000] (0:maestro@) Executed transitions = 21 -> [ 0.000000] (0:maestro@) Counter-example depth : 22 +> [ 0.000000] (0:maestro@) Expanded pairs = 22 +> [ 0.000000] (0:maestro@) Visited pairs = 20 +> [ 0.000000] (0:maestro@) Executed transitions = 20 +> [ 0.000000] (0:maestro@) Counter-example depth : 21 diff --git a/examples/msg/mc/bugged1_liveness_sparse.tesh b/examples/msg/mc/bugged1_liveness_sparse.tesh index 2cb31c9d68..78932cd98b 100644 --- a/examples/msg/mc/bugged1_liveness_sparse.tesh +++ b/examples/msg/mc/bugged1_liveness_sparse.tesh @@ -12,7 +12,7 @@ $ ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/bugged1_liveness ${srcdir:=. > [ 0.000000] (1:coordinator@Tremblay) CS release. resource now idle > [ 0.000000] (3:client@Fafard) Ask the request > [ 0.000000] (1:coordinator@Tremblay) CS idle. Grant immediatly -> [ 0.000000] (0:maestro@) Pair 23 already reached (equal to pair 11) ! +> [ 0.000000] (0:maestro@) Pair 22 already reached (equal to pair 10) ! > [ 0.000000] (0:maestro@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* > [ 0.000000] (0:maestro@) | ACCEPTANCE CYCLE | > [ 0.000000] (0:maestro@) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* @@ -37,8 +37,7 @@ $ ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/bugged1_liveness ${srcdir:=. > [ 0.000000] (0:maestro@) [(3)Fafard (client)] Wait(comm=(verbose only) [(3)Fafard (client)-> (1)Tremblay (coordinator)]) > [ 0.000000] (0:maestro@) [(3)Fafard (client)] iSend(src=(3)Fafard (client), buff=(verbose only), size=(verbose only)) > [ 0.000000] (0:maestro@) [(1)Tremblay (coordinator)] Wait(comm=(verbose only) [(3)Fafard (client)-> (1)Tremblay (coordinator)]) -> [ 0.000000] (0:maestro@) [(1)Tremblay (coordinator)] iSend(src=(1)Tremblay (coordinator), buff=(verbose only), size=(verbose only)) -> [ 0.000000] (0:maestro@) Expanded pairs = 23 -> [ 0.000000] (0:maestro@) Visited pairs = 21 -> [ 0.000000] (0:maestro@) Executed transitions = 21 -> [ 0.000000] (0:maestro@) Counter-example depth : 22 +> [ 0.000000] (0:maestro@) Expanded pairs = 22 +> [ 0.000000] (0:maestro@) Visited pairs = 20 +> [ 0.000000] (0:maestro@) Executed transitions = 20 +> [ 0.000000] (0:maestro@) Counter-example depth : 21 diff --git a/src/include/mc/mc.h b/src/include/mc/mc.h index 74c6ed8fa2..68e2d4f0e7 100644 --- a/src/include/mc/mc.h +++ b/src/include/mc/mc.h @@ -66,7 +66,6 @@ XBT_PRIVATE void _mc_cfg_cb_send_determinism(const char *name, int pos); XBT_PRIVATE void _mc_cfg_cb_termination(const char *name, int pos); XBT_PUBLIC(void) MC_run(void); -XBT_PUBLIC(void) MC_init(void); XBT_PUBLIC(void) MC_exit(void); XBT_PUBLIC(void) MC_process_clock_add(smx_process_t, double); XBT_PUBLIC(double) MC_process_clock_get(smx_process_t); diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index 090fe456b9..41e7877ac9 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -93,33 +93,17 @@ void MC_init_dot_output() } -#if HAVE_MC -void MC_init() -{ - simgrid::mc::processes_time.resize(simix_process_maxpid); - - if (_sg_mc_visited > 0 || _sg_mc_liveness || _sg_mc_termination || mc_mode == MC_MODE_SERVER) { - /* Those requests are handled on the client side and propagated by message - * to the server: */ - - MC_ignore_heap(simgrid::mc::processes_time.data(), - simix_process_maxpid * sizeof(double)); - - smx_process_t process; - xbt_swag_foreach(process, simix_global->process_list) - MC_ignore_heap(&(process->process_hookup), sizeof(process->process_hookup)); - } -} - -#endif - /******************************* Core of MC *******************************/ /**************************************************************************/ void MC_run() { - mc_mode = MC_MODE_CLIENT; - MC_init(); + simgrid::mc::processes_time.resize(simix_process_maxpid); + MC_ignore_heap(simgrid::mc::processes_time.data(), + simgrid::mc::processes_time.size() * sizeof(simgrid::mc::processes_time[0])); + smx_process_t process; + xbt_swag_foreach(process, simix_global->process_list) + MC_ignore_heap(&(process->process_hookup), sizeof(process->process_hookup)); simgrid::mc::Client::get()->mainLoop(); }