Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix _sg_do_model_check use with model_check=OFF
authorPaul Bédaride <paul.bedaride@gmail.com>
Tue, 18 Dec 2012 09:01:10 +0000 (10:01 +0100)
committerPaul Bédaride <paul.bedaride@gmail.com>
Tue, 18 Dec 2012 09:01:10 +0000 (10:01 +0100)
src/mc/mc_global.c
src/simgrid/sg_config.c

index d935b75..394d2a9 100644 (file)
@@ -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) {
index db7de62..e647b9d 100644 (file)
@@ -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