From 656ccde4d843648bc5c5d2a10cbbf767c1183a93 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20B=C3=A9daride?= Date: Wed, 23 Jan 2013 18:12:38 +0100 Subject: [PATCH] Remove MSG_load_platform_script and SD_load_environment_script functions --- examples/simdag/CMakeLists.txt | 4 ---- include/msg/msg.h | 1 - include/simdag/simdag.h | 1 - src/msg/msg_environment.c | 24 ------------------------ src/simdag/sd_global.c | 21 --------------------- 5 files changed, 51 deletions(-) diff --git a/examples/simdag/CMakeLists.txt b/examples/simdag/CMakeLists.txt index e814baa92c..d1773798c3 100644 --- a/examples/simdag/CMakeLists.txt +++ b/examples/simdag/CMakeLists.txt @@ -9,7 +9,6 @@ add_executable(sd_avail sd_avail.c) add_executable(sd_typed_tasks_test sd_typed_tasks_test.c) add_executable(sd_comm_throttling sd_comm_throttling.c) add_executable(sd_seq_access sd_seq_access.c) -add_executable(sd_test_console sd_test_console.c) add_executable(simdag_tracing simdag_trace.c) ### Add definitions for compile @@ -21,7 +20,6 @@ if(NOT WIN32) target_link_libraries(sd_typed_tasks_test simgrid pthread m ) target_link_libraries(sd_comm_throttling simgrid pthread m ) target_link_libraries(sd_seq_access simgrid pthread m ) - target_link_libraries(sd_test_console simgrid pthread m ) target_link_libraries(simdag_tracing simgrid pthread m ) add_custom_command(TARGET ex_sd_test @@ -42,7 +40,6 @@ else() target_link_libraries(sd_typed_tasks_test simgrid) target_link_libraries(sd_comm_throttling simgrid) target_link_libraries(sd_seq_access simgrid) - target_link_libraries(sd_test_console simgrid) target_link_libraries(simdag_tracing simgrid) add_custom_command(TARGET ex_sd_test @@ -83,7 +80,6 @@ set(examples_src ${CMAKE_CURRENT_SOURCE_DIR}/sd_seq_access.c ${CMAKE_CURRENT_SOURCE_DIR}/sd_test.c ${CMAKE_CURRENT_SOURCE_DIR}/sd_test2.c - ${CMAKE_CURRENT_SOURCE_DIR}/sd_test_console.c ${CMAKE_CURRENT_SOURCE_DIR}/sd_typed_tasks_test.c ${CMAKE_CURRENT_SOURCE_DIR}/simdag_trace.c PARENT_SCOPE diff --git a/include/msg/msg.h b/include/msg/msg.h index d3999e6345..41b94838d7 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -107,7 +107,6 @@ XBT_PUBLIC(void) MSG_host_set_property_value(msg_host_t host, XBT_PUBLIC(void) MSG_create_environment(const char *file); -XBT_PUBLIC(void) MSG_load_platform_script(const char *script_file); XBT_PUBLIC(msg_host_t) MSG_get_host_by_name(const char *name); XBT_PUBLIC(xbt_dynar_t) MSG_hosts_as_dynar(void); diff --git a/include/simdag/simdag.h b/include/simdag/simdag.h index e3eceb1105..6c9a0834d5 100644 --- a/include/simdag/simdag.h +++ b/include/simdag/simdag.h @@ -229,7 +229,6 @@ XBT_PUBLIC(int) SD_task_dependency_exists(SD_task_t src, SD_task_t dst); XBT_PUBLIC(void) SD_init(int *argc, char **argv); XBT_PUBLIC(void) SD_application_reinit(void); XBT_PUBLIC(void) SD_create_environment(const char *platform_file); -XBT_PUBLIC(void) SD_load_environment_script(const char *script_file); XBT_PUBLIC(xbt_dynar_t) SD_simulate(double how_long); XBT_PUBLIC(double) SD_get_clock(void); XBT_PUBLIC(void) SD_exit(void); diff --git a/src/msg/msg_environment.c b/src/msg/msg_environment.c index 44ef32caf1..497b254c37 100644 --- a/src/msg/msg_environment.c +++ b/src/msg/msg_environment.c @@ -48,27 +48,3 @@ void MSG_post_create_environment(void) { __MSG_host_create(xbt_dict_cursor_get_elm(cursor)); } } - -/** - * @ingroup MSG_LUA - * \brief A platform constructor bypassing the parser. - * - * load lua script file to set up new platform, including hosts,links - * and the routing table - */ - -void MSG_load_platform_script(const char *script_file) -{ -#ifdef HAVE_LUA - lua_State *L = lua_open(); - luaL_openlibs(L); - - if (luaL_loadfile(L, script_file) || lua_pcall(L, 0, 0, 0)) { - printf("error: %s\n", lua_tostring(L, -1)); - return; - } -#else - xbt_die - ("Lua is not available! It is mandatory to use MSG_load_platform_script however. Bailing out..."); -#endif -} diff --git a/src/simdag/sd_global.c b/src/simdag/sd_global.c index 34c9939834..b10b00096b 100644 --- a/src/simdag/sd_global.c +++ b/src/simdag/sd_global.c @@ -445,24 +445,3 @@ void SD_exit(void) jedule_sd_cleanup(); #endif } - -/** - * \brief load script file - */ - -void SD_load_environment_script(const char *script_file) -{ -#ifdef HAVE_LUA - lua_State *L = lua_open(); - luaL_openlibs(L); - - if (luaL_loadfile(L, script_file) || lua_pcall(L, 0, 0, 0)) { - printf("error: %s\n", lua_tostring(L, -1)); - return; - } -#else - xbt_die - ("Lua is not available!! to call SD_load_environment_script, lua should be available..."); -#endif - return; -} -- 2.20.1