From: Frederic Suter Date: Fri, 12 Feb 2016 19:33:03 +0000 (+0100) Subject: kill the SD_application_reinit function X-Git-Tag: v3_13~854 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/212ba1c7e2879dd2e1073ad93f98e590c228352b?ds=sidebyside kill the SD_application_reinit function --- diff --git a/ChangeLog b/ChangeLog index cf38507974..265cdce589 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ SimGrid (3.13) UNRELEASED; urgency=low - Removed Java kernel plug-ins. Will be reintroduced after the ongoing major internals reorg. - In SimDag + - the SD_application_reinit function was removed. It was a noop for a while. - The ACCESS_MODE of SD_workstation has been removed. This feature was not really usable and should soon be replaced by a more flexible mechanism. - The following functions thus do not exist anymore diff --git a/include/simgrid/simdag.h b/include/simgrid/simdag.h index dffd6f7db1..0978733cda 100644 --- a/include/simgrid/simdag.h +++ b/include/simgrid/simdag.h @@ -190,7 +190,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_config(const char *key, const char *value); -XBT_PUBLIC(void) SD_application_reinit(void); XBT_PUBLIC(void) SD_create_environment(const char *platform_file); XBT_PUBLIC(xbt_dynar_t) SD_simulate(double how_long); XBT_PUBLIC(double) SD_get_clock(void); diff --git a/src/simdag/sd_global.cpp b/src/simdag/sd_global.cpp index f506061bd0..426db94799 100644 --- a/src/simdag/sd_global.cpp +++ b/src/simdag/sd_global.cpp @@ -76,24 +76,6 @@ void SD_config(const char *key, const char *value){ xbt_cfg_set_as_string(_sg_cfg_set, key, value); } -/** - * \brief Reinits the application part of the simulation (experimental feature) - * - * This function allows you to run several simulations on the same platform - * by resetting the part describing the application. - * - * @warning: this function is still experimental and not perfect. For example, - * the simulation clock (and traces usage) is not reset. So, do not use it if - * you use traces in your simulation, and do not use absolute timing after - * using it. - * That being said, this function is still precious if you want to compare a - * bunch of heuristics on the same platforms. - */ -void SD_application_reinit(void) -{ - xbt_die("This function is not working since the C++ links and others. Please report the problem if you really need that function."); -} - /** * \brief Creates the environment * diff --git a/teshsuite/simdag/network/CMakeLists.txt b/teshsuite/simdag/network/CMakeLists.txt deleted file mode 100644 index 801abab048..0000000000 --- a/teshsuite/simdag/network/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}") - -add_executable(test_reinit_costs test_reinit_costs.c) - -### Add definitions for compile -if(NOT WIN32) - target_link_libraries(test_reinit_costs simgrid m pthread ) -else() - target_link_libraries(test_reinit_costs simgrid) -endif() - -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/test_reinit_costs.tesh - PARENT_SCOPE - ) -set(xml_files - ${xml_files} - ${CMAKE_CURRENT_SOURCE_DIR}/platform_2p_1sl.xml - PARENT_SCOPE - ) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/test_reinit_costs.c - PARENT_SCOPE - ) -set(bin_files - ${bin_files} - PARENT_SCOPE - ) -set(txt_files - ${txt_files} - PARENT_SCOPE - ) diff --git a/teshsuite/simdag/network/platform_2p_1sl.xml b/teshsuite/simdag/network/platform_2p_1sl.xml deleted file mode 100644 index fea3fa8b9e..0000000000 --- a/teshsuite/simdag/network/platform_2p_1sl.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/teshsuite/simdag/network/test_reinit_costs.c b/teshsuite/simdag/network/test_reinit_costs.c deleted file mode 100644 index 55b6dedc06..0000000000 --- a/teshsuite/simdag/network/test_reinit_costs.c +++ /dev/null @@ -1,112 +0,0 @@ -/* Computation tests */ - -/* Copyright (c) 2007, 2009-2011, 2013-2015. The SimGrid Team. - * All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include -#include - -#include "simgrid/simdag.h" - -/* - * This test checks if the reinitialization of - * surf works properly. - * 1 test: empty task, reinit, empty task - * 2 test: comm cost task, reinit, empty task - * - * output should be: - * 0 - * 1.5 - */ - -static SD_task_t create_empty_cost_root() -{ - double no_cost[] = { 0.0 }; - SD_task_t root; - - root = SD_task_create("Root", NULL, 1.0); - SD_task_schedule(root, 1, sg_host_list(), no_cost, no_cost, - -1.0); - - return root; -} - -static void zero_cost_test(int *argc, char *argv[]) -{ - double time; - SD_task_t task; - - SD_init(argc, argv); - SD_create_environment(argv[1]); - - task = create_empty_cost_root(); - SD_simulate(-1.0); - SD_task_destroy(task); - - SD_application_reinit(); - - task = create_empty_cost_root(); - SD_simulate(-1.0); - SD_task_destroy(task); - - SD_simulate(-1.0); - - time = SD_get_clock(); - printf("%g\n", time); - fflush(stdout); - - SD_exit(); -} - -static SD_task_t create_root_with_costs() -{ - double comp_cost[] = { 0.0, 0.0 }; - double comm_cost[] = { 0.0, 1.0, 0.0, 0.0 }; - SD_task_t root; - - root = SD_task_create("Root", NULL, 1.0); - SD_task_schedule(root, 2, sg_host_list(), comp_cost, - comm_cost, -1.0); - - return root; -} - -static void zero_cost_test2(int *argc, char *argv[]) -{ - double time; - SD_task_t task; - - SD_init(argc, argv); - SD_create_environment(argv[1]); - - task = create_root_with_costs(); - SD_simulate(-1.0); - SD_task_destroy(task); - - SD_application_reinit(); - - task = create_empty_cost_root(); - SD_simulate(-1.0); - SD_task_destroy(task); - - SD_simulate(-1.0); - - time = SD_get_clock(); - printf("%g\n", time); - fflush(stdout); - - SD_exit(); -} - -int main(int argc, char **argv) -{ - - zero_cost_test(&argc, argv); - - zero_cost_test2(&argc, argv); - - return 0; -} diff --git a/teshsuite/simdag/network/test_reinit_costs.tesh b/teshsuite/simdag/network/test_reinit_costs.tesh deleted file mode 100644 index a2defbfb23..0000000000 --- a/teshsuite/simdag/network/test_reinit_costs.tesh +++ /dev/null @@ -1,8 +0,0 @@ - -p Reinitialization test - -! expect signal SIGABRT -$ simdag/network/test_reinit_costs ${srcdir:=.}/simdag/network/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" -> [ 0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks. -> [ 0.000000] (0:maestro@) This function is not working since the C++ links and others. Please report the problem if you really need that function. - diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 626e32f046..32051f7388 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -1078,7 +1078,6 @@ set(TESHSUITE_CMAKEFILES_TXT teshsuite/simdag/availability/CMakeLists.txt teshsuite/simdag/basic/CMakeLists.txt teshsuite/simdag/incomplete/CMakeLists.txt - teshsuite/simdag/network/CMakeLists.txt teshsuite/simdag/network/mxn/CMakeLists.txt teshsuite/simdag/network/p2p/CMakeLists.txt teshsuite/simdag/partask/CMakeLists.txt diff --git a/tools/cmake/MakeExe.cmake b/tools/cmake/MakeExe.cmake index 38c38aa15e..02ce151889 100644 --- a/tools/cmake/MakeExe.cmake +++ b/tools/cmake/MakeExe.cmake @@ -102,7 +102,6 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/msg/trace) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/availability) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/incomplete) -add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/mxn) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/p2p) add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask) diff --git a/tools/cmake/Tests.cmake b/tools/cmake/Tests.cmake index 4f8e30ff3c..6bceda72de 100644 --- a/tools/cmake/Tests.cmake +++ b/tools/cmake/Tests.cmake @@ -301,7 +301,6 @@ IF(NOT enable_memcheck) ADD_TESH(tesh-simdag-bypass --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_parsing_test_bypass.tesh) ADD_TESH(tesh-simdag-flatifier --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms flatifier.tesh) ADD_TESH(tesh-simdag-link --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_link_test.tesh) - ADD_TESH(tesh-simdag-reinit-costs --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network/test_reinit_costs.tesh) ADD_TESH(tesh-simdag-parser --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_parsing_test.tesh) ADD_TESH(tesh-simdag-parser-sym-full --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms basic_parsing_test_sym_full.tesh) ADD_TESH(tesh-simdag-full-links --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms get_full_link.tesh)