#include "xbt/str.h"
#include "xbt/config.h"
#include "instr/instr_private.h"
+#include "surf/surfxml_parse.h"
#ifdef HAVE_LUA
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#endif
+#ifdef HAVE_JEDULE
+#include "instr/jedule/jedule_sd_binding.h"
+#endif
+
XBT_LOG_NEW_CATEGORY(sd, "Logging specific to SimDag");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_kernel, sd,
"Logging specific to SimDag (kernel)");
#ifdef HAVE_TRACING
TRACE_start ();
#endif
+
+#ifdef HAVE_JEDULE
+ jedule_sd_init();
+#endif
}
/**
sd_global->failed_task_set =
xbt_swag_new(xbt_swag_offset(task, state_hookup));
sd_global->task_number = 0;
+
+#ifdef HAVE_JEDULE
+ jedule_sd_cleanup();
+ jedule_sd_init();
+#endif
+
} else {
WARN0("SD_application_reinit called before initialization of SimDag");
/* we cannot use exceptions here because xbt is not running! */
void *surf_workstation = NULL;
void *surf_link = NULL;
- SD_CHECK_INIT_DONE();
-
- DEBUG0("SD_create_environment");
+ platform_filename = bprintf("%s",platform_file);
- surf_config_models_setup(platform_file);
+ // Reset callbacks
+ surf_parse_reset_callbacks();
+ // Add config callbacks
+ surf_parse_add_callback_config();
+ SD_CHECK_INIT_DONE();
parse_platform_file(platform_file);
surf_config_models_create_elms();
DEBUG2("Workstation number: %d, link number: %d",
SD_workstation_get_number(), SD_link_get_number());
-
-#ifdef HAVE_TRACING
- TRACE_surf_save_onelink();
+#ifdef HAVE_JEDULE
+ jedule_setup_platform();
#endif
}
#ifdef HAVE_TRACING
TRACE_end();
#endif
+#ifdef HAVE_JEDULE
+ jedule_sd_dump();
+ jedule_sd_cleanup();
+#endif
DEBUG0("Exiting Surf...");
surf_exit();