From: Paul Bédaride Date: Tue, 18 Dec 2012 09:01:10 +0000 (+0100) Subject: Fix _sg_do_model_check use with model_check=OFF X-Git-Tag: v3_9_rc1~86^2~105 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1e896e691f69c6e46566d038d37b4fd7ea18fa3d Fix _sg_do_model_check use with model_check=OFF --- diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index d935b75496..394d2a9908 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -31,7 +31,6 @@ int _sg_mc_timeout=0; int _sg_mc_max_depth=1000; int _sg_mc_visited=0; - extern int _sg_init_status; void _mc_cfg_cb_reduce(const char *name, int pos) { if (_sg_init_status && !_sg_do_model_check) { diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index db7de62927..e647b9d920 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -234,14 +234,16 @@ static void _sg_cfg_cb__surf_path(const char *name, int pos) /* callback to decide if we want to use the model-checking */ #include "xbt_modinter.h" +#ifdef HAVE_MC extern int _sg_do_model_check; /* this variable lives in xbt_main until I find a right location for it */ +#endif static void _sg_cfg_cb_model_check(const char *name, int pos) { +#ifdef HAVE_MC _sg_do_model_check = xbt_cfg_get_int(_sg_cfg_set, name); - -#ifndef HAVE_MC - if (_sg_do_model_check) { +#else + if (xbt_cfg_get_int(_sg_cfg_set, name)) { xbt_die("You tried to activate the model-checking from the command line, but it was not compiled in. Change your settings in cmake, recompile and try again"); } #endif