Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The process list of MSG is now a swag instead of a fifo.
[simgrid.git] / src / bindings / lua / simgrid_lua.c
index 96b2747..1f78abc 100644 (file)
@@ -412,25 +412,33 @@ static int gras_generate(lua_State * L)
  **********************************/
 static int trace_start(lua_State *L)
 {
+#ifdef HAVE_TRACING
   TRACE_start();
+#endif
   return 1;
 }
 
 static int trace_category(lua_State * L)
 {
+#ifdef HAVE_TRACING
   TRACE_category(luaL_checkstring(L, 1));
+#endif
   return 1;
 }
 
 static int trace_set_task_category(lua_State *L)
 {
+#ifdef HAVE_TRACING
   TRACE_msg_set_task_category(checkTask(L, -2), luaL_checkstring(L, -1));
+#endif
   return 1;
 }
 
 static int trace_end(lua_State *L)
 {
+#ifdef HAVE_TRACING
   TRACE_end();
+#endif
   return 1;
 }
 //***********Register Methods *******************************************//
@@ -610,6 +618,8 @@ static int msg_register_platform(lua_State * L)
 {
   /* Tell Simgrid we dont wanna use its parser */
   surf_parse = console_parse_platform;
+  surf_parse_reset_callbacks();
+  surf_config_models_setup(NULL);
   MSG_create_environment(NULL);
   return 0;
 }
@@ -621,6 +631,8 @@ static int msg_register_platform(lua_State * L)
 static int sd_register_platform(lua_State * L)
 {
   surf_parse = console_parse_platform_wsL07;
+  surf_parse_reset_callbacks();
+  surf_config_models_setup(NULL);
   SD_create_environment(NULL);
   return 0;
 }
@@ -632,6 +644,8 @@ static int gras_register_platform(lua_State * L)
 {
   /* Tell Simgrid we dont wanna use surf parser */
   surf_parse = console_parse_platform;
+  surf_parse_reset_callbacks();
+  surf_config_models_setup(NULL);
   gras_create_environment(NULL);
   return 0;
 }