Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove MSG_load_platform_script and SD_load_environment_script functions
authorPaul Bédaride <paul.bedaride@gmail.com>
Wed, 23 Jan 2013 17:12:38 +0000 (18:12 +0100)
committerPaul Bédaride <paul.bedaride@gmail.com>
Wed, 23 Jan 2013 17:12:38 +0000 (18:12 +0100)
examples/simdag/CMakeLists.txt
include/msg/msg.h
include/simdag/simdag.h
src/msg/msg_environment.c
src/simdag/sd_global.c

index e814baa..d177379 100644 (file)
@@ -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
index d3999e6..41b9483 100644 (file)
@@ -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);
index e3eceb1..6c9a083 100644 (file)
@@ -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);
index 44ef32c..497b254 100644 (file)
@@ -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
-}
index 34c9939..b10b000 100644 (file)
@@ -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;
-}