Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
new option to any SimGrid-based simulator: --cfg=model-check:1 (for now, that's a...
[simgrid.git] / src / msg / global.c
index 6dc3f3b..d711b68 100644 (file)
@@ -5,6 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "msg/private.h"
+#include "mc/mc.h"
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/virtu.h"
@@ -75,7 +76,6 @@ void MSG_global_init(int *argc, char **argv)
     SIMIX_function_register_process_cleanup(__MSG_process_cleanup);
     SIMIX_function_register_process_kill(_MSG_process_kill_from_SIMIX);
   }
-  return;
 }
 
 /** \defgroup m_channel_management    Understanding channels
@@ -140,7 +140,10 @@ MSG_error_t MSG_main(void)
   fflush(stderr);
   SIMIX_init();
 
-  while (SIMIX_solve(NULL, NULL) != -1.0);
+  if (_surf_do_model_check)
+    MC_modelcheck(1);
+  else
+    while (SIMIX_solve(NULL, NULL) != -1.0);
   
   return MSG_OK;
 }