Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill the SD_application_reinit function
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 12 Feb 2016 19:33:03 +0000 (20:33 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 12 Feb 2016 19:33:03 +0000 (20:33 +0100)
ChangeLog
include/simgrid/simdag.h
src/simdag/sd_global.cpp
teshsuite/simdag/network/CMakeLists.txt [deleted file]
teshsuite/simdag/network/platform_2p_1sl.xml [deleted file]
teshsuite/simdag/network/test_reinit_costs.c [deleted file]
teshsuite/simdag/network/test_reinit_costs.tesh [deleted file]
tools/cmake/DefinePackages.cmake
tools/cmake/MakeExe.cmake
tools/cmake/Tests.cmake

index cf38507..265cdce 100644 (file)
--- 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
index dffd6f7..0978733 100644 (file)
@@ -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);
index f506061..426db94 100644 (file)
@@ -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 (file)
index 801abab..0000000
+++ /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 (file)
index fea3fa8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
- <AS  id="AS0"  routing="Full">
-   <host id="cpu0" speed="1f"/>
-   <host id="cpu1" speed="1f"/>
-   <!-- 
-   <link id="link0" bandwidth="125MBps" latency="200us" sharing_policy="SHARED"/>
-    -->
-   <link id="link0" bandwidth="1Bps" latency="500ms" sharing_policy="SHARED"/>
-   <route src="cpu0" dst="cpu1">
-     <link_ctn id="link0"/>
-   </route>
- </AS>
- </platform>
diff --git a/teshsuite/simdag/network/test_reinit_costs.c b/teshsuite/simdag/network/test_reinit_costs.c
deleted file mode 100644 (file)
index 55b6ded..0000000
+++ /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 <stdio.h>
-#include <stdlib.h>
-
-#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 (file)
index a2defbf..0000000
+++ /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.
-
index 626e32f..32051f7 100644 (file)
@@ -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
index 38c38aa..02ce151 100644 (file)
@@ -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)
index 4f8e30f..6bceda7 100644 (file)
@@ -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)