Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
modernize basic-parsing-test w/o SimDag
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 17 Feb 2021 13:51:16 +0000 (14:51 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 17 Feb 2021 14:08:57 +0000 (15:08 +0100)
MANIFEST.in
teshsuite/s4u/CMakeLists.txt
teshsuite/s4u/basic-parsing-test/basic-parsing-test-bypass.tesh [moved from teshsuite/simdag/basic-parsing-test/basic-parsing-test-bypass.tesh with 100% similarity]
teshsuite/s4u/basic-parsing-test/basic-parsing-test-sym-full.tesh [moved from teshsuite/simdag/basic-parsing-test/basic-parsing-test-sym-full.tesh with 96% similarity]
teshsuite/s4u/basic-parsing-test/basic-parsing-test.cpp [new file with mode: 0644]
teshsuite/s4u/basic-parsing-test/basic-parsing-test.tesh [new file with mode: 0644]
teshsuite/simdag/CMakeLists.txt
teshsuite/simdag/basic-parsing-test/basic-parsing-test.c [deleted file]
teshsuite/simdag/basic-parsing-test/basic-parsing-test.tesh [deleted file]

index 2ffe42a..27ba74c 100644 (file)
@@ -704,6 +704,10 @@ include teshsuite/s4u/actor/actor.cpp
 include teshsuite/s4u/actor/actor.tesh
 include teshsuite/s4u/basic-link-test/basic-link-test.cpp
 include teshsuite/s4u/basic-link-test/basic-link-test.tesh
+include teshsuite/s4u/basic-parsing-test/basic-parsing-test-bypass.tesh
+include teshsuite/s4u/basic-parsing-test/basic-parsing-test-sym-full.tesh
+include teshsuite/s4u/basic-parsing-test/basic-parsing-test.cpp
+include teshsuite/s4u/basic-parsing-test/basic-parsing-test.tesh
 include teshsuite/s4u/cloud-interrupt-migration/cloud-interrupt-migration.cpp
 include teshsuite/s4u/cloud-interrupt-migration/cloud-interrupt-migration.tesh
 include teshsuite/s4u/cloud-two-execs/cloud-two-execs.cpp
@@ -754,10 +758,6 @@ include teshsuite/s4u/wait-any-for/wait-any-for.cpp
 include teshsuite/s4u/wait-any-for/wait-any-for.tesh
 include teshsuite/simdag/availability/availability.c
 include teshsuite/simdag/availability/availability.tesh
-include teshsuite/simdag/basic-parsing-test/basic-parsing-test-bypass.tesh
-include teshsuite/simdag/basic-parsing-test/basic-parsing-test-sym-full.tesh
-include teshsuite/simdag/basic-parsing-test/basic-parsing-test.c
-include teshsuite/simdag/basic-parsing-test/basic-parsing-test.tesh
 include teshsuite/simdag/basic0/basic0.c
 include teshsuite/simdag/basic0/basic0.tesh
 include teshsuite/simdag/basic1/basic1.c
@@ -1928,6 +1928,7 @@ include examples/platforms/profiles/trace_A.txt
 include examples/platforms/profiles/trace_A_failure.txt
 include examples/platforms/profiles/trace_B.txt
 include examples/platforms/prop.xml
+include examples/platforms/ptask_L07.xml
 include examples/platforms/routing_cluster.lua
 include examples/platforms/routing_cluster.xml
 include examples/platforms/routing_none.xml
index 1b2d59c..9fc591e 100644 (file)
@@ -4,7 +4,7 @@ foreach(x actor actor-autorestart actor-suspend
         cloud-interrupt-migration cloud-two-execs
         concurrent_rw 
         host-on-off host-on-off-actors host-on-off-recv
-        basic-link-test evaluate-get-route-time evaluate-parse-time is-router
+        basic-link-test basic-parsing-test evaluate-get-route-time evaluate-parse-time is-router
         storage_client_server listen_async pid
         trace-integration
        vm-live-migration)
@@ -33,7 +33,8 @@ foreach(x actor actor-autorestart actor-suspend
   ADD_TESH_FACTORIES(tesh-s4u-${x} "*" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x}/${x}.tesh)
 endforeach()
 
-foreach(x basic-link-test host-on-off host-on-off-actors host-on-off-recv is-router listen_async pid storage_client_server trace-integration)
+foreach(x basic-link-test basic-parsing-test host-on-off host-on-off-actors host-on-off-recv is-router listen_async 
+               pid storage_client_server trace-integration)
   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
   ADD_TESH(tesh-s4u-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x}/${x}.tesh)
 endforeach()
@@ -63,8 +64,22 @@ foreach(x ns3-simultaneous-send-rcv ns3-from-src-to-itself)
   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
 endforeach()
 
+# test for code coverage
+ADD_TEST(test-help-version ${TESH_WRAPPER_UNBOXED} ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test
+  --version --help --help-aliases --help-models --help-tracing)
+ADD_TEST(test-help-logs    ${TESH_WRAPPER_UNBOXED} ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test
+  --help-logs --help-log-categories)
+
+ADD_TESH(tesh-parser-bypass   --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/basic-parsing-test --setenv srcdir=${CMAKE_HOME_DIRECTORY} basic-parsing-test-bypass.tesh)
+ADD_TESH(tesh-parser-sym-full --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/basic-parsing-test basic-parsing-test-sym-full.tesh)
+
+ADD_TEST(tesh-parser-full-links01    ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/two_clusters.xml FULL_LINK)
+ADD_TEST(tesh-parser-full-links02    ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/two_clusters_one_name.xml FULL_LINK)
+ADD_TEST(tesh-parser-one-link-g5k    ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/examples/platforms/g5k.xml ONE_LINK)
+
 set(teshsuite_src ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/activity-lifecycle/activity-lifecycle.hpp PARENT_SCOPE)
-set(tesh_files    ${tesh_files}     PARENT_SCOPE)
+set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-sym-full.tesh
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-bypass.tesh PARENT_SCOPE)
 set(xml_files     ${xml_files}      ${CMAKE_CURRENT_SOURCE_DIR}/activity-lifecycle/testing_platform.xml
                                     ${CMAKE_CURRENT_SOURCE_DIR}/trace-integration/test-hbp1.0-hbp1.0-hbp1.0.xml
                                     ${CMAKE_CURRENT_SOURCE_DIR}/trace-integration/test-hbp1.0-hbp3.0-hbp4.0.xml
@@ -1,7 +1,7 @@
 #!/usr/bin/env tesh
 ! output sort
 
-$ ${bindir:=.}/basic-parsing-test ../platforms/one_cluster_splitduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/one_cluster_splitduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
 > Workstation number: 5, link number: 12
 > Route between bob3.hamburger.edu and bob3.hamburger.edu
@@ -156,7 +156,7 @@ $ ${bindir:=.}/basic-parsing-test ../platforms/one_cluster_splitduplex.xml FULL_
 >   Route latency = 0.000600, route bandwidth = 125000000.000000
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/two_clusters.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_clusters.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
 > Workstation number: 4, link number: 12
 > Route between bob1.hamburger.edu and bob1.hamburger.edu
@@ -273,7 +273,7 @@ $ ${bindir:=.}/basic-parsing-test ../platforms/two_clusters.xml FULL_LINK "--log
 >   Route latency = 0.000600, route bandwidth = 125000000.000000
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/two_hosts_one_link.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_hosts_one_link.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
 > Workstation number: 2, link number: 2
 > Route between alice and alice
@@ -294,7 +294,7 @@ $ ${bindir:=.}/basic-parsing-test ../platforms/two_hosts_one_link.xml FULL_LINK
 >   Route latency = 0.000000, route bandwidth = 10000000000.000000
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/two_hosts_one_link_splitduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_hosts_one_link_splitduplex.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
 > Workstation number: 2, link number: 3
 > Route between alice and alice
@@ -315,7 +315,7 @@ $ ${bindir:=.}/basic-parsing-test ../platforms/two_hosts_one_link_splitduplex.xm
 >   Route latency = 0.000000, route bandwidth = 10000000000.000000
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/Dijkstra.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/Dijkstra.xml FULL_LINK "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
 > [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
 > Workstation number: 2, link number: 6
 > Route between NODO01 and NODO01
@@ -338,7 +338,7 @@ $ ${bindir:=.}/basic-parsing-test ../platforms/Dijkstra.xml FULL_LINK "--log=roo
 >   Route latency = 0.000000, route bandwidth = 10000000000.000000
 
 ! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/four_hosts_floyd.xml FULL_LINK
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/four_hosts_floyd.xml FULL_LINK
 > [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
 > Workstation number: 4, link number: 5
 > Route between host1 and host1
diff --git a/teshsuite/s4u/basic-parsing-test/basic-parsing-test.cpp b/teshsuite/s4u/basic-parsing-test/basic-parsing-test.cpp
new file mode 100644 (file)
index 0000000..c745023
--- /dev/null
@@ -0,0 +1,81 @@
+/* Copyright (c) 2008-2021. 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 <simgrid/s4u.hpp>
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(basic_parsing_test, "[usage] basic-parsing-test <platform-file>");
+
+namespace sg4 = simgrid::s4u;
+
+static void test_one_link(const std::vector<sg4::Host*> hosts)
+{
+  const sg4::Host* h1 = hosts[0];
+  const sg4::Host* h2 = hosts[1];
+  std::vector<sg4::Link*> route;
+  double latency = 0;
+  double min_bandwidth = -1;
+
+  XBT_INFO("Route between %s and %s\n", h1->get_cname(), h2->get_cname());
+  h1->route_to(h2, route, &latency);
+  XBT_INFO("Route size %zu\n", route.size());
+
+  for (auto link: route) {
+    double bandwidth = link->get_bandwidth();
+    XBT_INFO("  Link %s: latency = %f, bandwidth = %f\n", link->get_cname(), link->get_latency(), bandwidth);
+    if (bandwidth < min_bandwidth || min_bandwidth < 0.0)
+      min_bandwidth = bandwidth;
+
+  }
+  XBT_INFO("Route latency = %f, route bandwidth = %f\n", latency, min_bandwidth);
+}
+
+static void test_full_link(const std::vector<sg4::Host*> hosts)
+{
+  size_t list_size = hosts.size();
+  for (size_t i = 0; i < list_size; i++) {
+    const sg4::Host* h1 = hosts[i];
+    for (size_t j = 0; j < list_size; j++) {
+      const sg4::Host* h2 = hosts[j];
+      XBT_INFO("Route between %s and %s\n", h1->get_cname(), h2->get_cname());
+      std::vector<sg4::Link*> route;
+      double latency = 0;
+      double min_bandwidth = -1;
+      h1->route_to(h2, route, &latency);
+      XBT_INFO("  Route size %zu\n", route.size());
+
+      for (auto link: route) {
+        double bandwidth = link->get_bandwidth();
+        XBT_INFO("  Link %s: latency = %f, bandwidth = %f\n", link->get_cname(), link->get_latency(), bandwidth);
+        if (bandwidth < min_bandwidth || min_bandwidth < 0.0)
+          min_bandwidth = bandwidth;
+
+      }
+      XBT_INFO("  Route latency = %f, route bandwidth = %f\n", latency, min_bandwidth);
+    }
+  }
+}
+
+int main(int argc, char** argv)
+{
+  simgrid::s4u::Engine e(&argc, argv);
+
+  /* creation of the environment */
+  e.load_platform(argv[1]);
+  XBT_INFO("Workstation number: %zu, link number: %zu\n", e.get_host_count(), e.get_link_count());
+
+  std::vector<simgrid::s4u::Host*> hosts = e.get_all_hosts();
+  if (argc >= 3) {
+    if (!strcmp(argv[2], "ONE_LINK"))
+      test_one_link(hosts);
+    if (!strcmp(argv[2], "FULL_LINK"))
+      test_full_link(hosts);
+    if (!strcmp(argv[2], "PROP"))
+      XBT_INFO("SG_TEST_mem: %s\n", sg4::Host::by_name("host1")->get_property("SG_TEST_mem"));
+  }
+
+  return 0;
+}
diff --git a/teshsuite/s4u/basic-parsing-test/basic-parsing-test.tesh b/teshsuite/s4u/basic-parsing-test/basic-parsing-test.tesh
new file mode 100644 (file)
index 0000000..011a6f8
--- /dev/null
@@ -0,0 +1,45 @@
+! output sort
+
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/one_cluster.xml --log=root.fmt=%m%n
+> Workstation number: 5, link number: 12
+
+! output sort
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/host_attributes.xml --log=root.fmt=%m%n
+> Workstation number: 5, link number: 1
+
+! output sort
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/link_attributes.xml --log=root.fmt=%m%n
+> Workstation number: 1, link number: 5
+
+! output sort
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/three_hosts_non_symmetric_route.xml --log=root.fmt=%m%n
+> Workstation number: 3, link number: 4
+
+! output sort
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_clusters.xml --log=root.fmt=%m%n
+> Workstation number: 4, link number: 12
+
+! output sort
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_hosts_multi_hop.xml --log=root.fmt=%m%n
+> Workstation number: 2, link number: 4
+
+! output sort
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/two_hosts_one_link.xml --log=root.fmt=%m%n
+> Workstation number: 2, link number: 2
+
+! output sort
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/four_hosts_floyd.xml --log=root.fmt=%m%n
+> Workstation number: 4, link number: 5
+
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/properties.xml --log=root.fmt=%m%n
+> Configuration change: Set 'cpu/optim' to 'TI'
+> Configuration change: Set 'host/model' to 'compound'
+> Configuration change: Set 'maxmin/precision' to '0.000010'
+> Workstation number: 1, link number: 1
+
+$ ${bindir:=.}/basic-parsing-test ${srcdir:=.}/../../simdag/platforms/properties.xml --cfg=cpu/optim:TI --log=root.fmt=%m%n
+> Configuration change: Set 'cpu/optim' to 'TI'
+> The custom configuration 'cpu/optim' is already defined by user!
+> Configuration change: Set 'host/model' to 'compound'
+> Configuration change: Set 'maxmin/precision' to '0.000010'
+> Workstation number: 1, link number: 1
index af7f58d..767edc5 100644 (file)
@@ -1,4 +1,4 @@
-foreach(x availability basic0 basic1 basic3 basic4 basic5 basic6 basic-parsing-test
+foreach(x availability basic0 basic1 basic3 basic4 basic5 basic6
           comm-mxn-all2all comm-mxn-independent comm-mxn-scatter
           comm-p2p-latency-bound incomplete)
   add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.c)
@@ -24,8 +24,6 @@ endforeach()
 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
 set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_two_hosts_asymetric.tesh
                                     ${CMAKE_CURRENT_SOURCE_DIR}/flatifier/bogus_missing_gateway.tesh
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-sym-full.tesh
-                                    ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-bypass.tesh
                                     PARENT_SCOPE)
 set(xml_files     ${xml_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/four_hosts_floyd.xml
                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_multi_hop.xml
@@ -60,25 +58,12 @@ set(txt_files     ${txt_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/carol.
                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.fail
                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/link.lat                         PARENT_SCOPE)
 
-foreach(x availability basic0 basic1 basic3 basic4 basic5 basic6 basic-parsing-test
+foreach(x availability basic0 basic1 basic3 basic4 basic5 basic6
           comm-mxn-all2all comm-mxn-independent comm-mxn-scatter flatifier
           comm-p2p-latency-bound incomplete)
   ADD_TESH(tesh-simdag-${x} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/${x} ${x}.tesh)
 endforeach()
 
-# test for code coverage
-ADD_TEST(test-help-version ${TESH_WRAPPER_UNBOXED} ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test
-  --version --help --help-aliases --help-models --help-tracing)
-ADD_TEST(test-help-logs    ${TESH_WRAPPER_UNBOXED} ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test
-  --help-logs --help-log-categories)
-
-ADD_TESH(tesh-simdag-parser-bypass   --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic-parsing-test --setenv srcdir=${CMAKE_HOME_DIRECTORY} basic-parsing-test-bypass.tesh)
-ADD_TESH(tesh-simdag-parser-sym-full --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/basic-parsing-test basic-parsing-test-sym-full.tesh)
-
-ADD_TEST(tesh-simdag-full-links01    ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/two_clusters.xml FULL_LINK)
-ADD_TEST(tesh-simdag-full-links02    ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms/two_clusters_one_name.xml FULL_LINK)
-ADD_TEST(tesh-simdag-one-link-g5k    ${CMAKE_BINARY_DIR}/teshsuite/simdag/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/examples/platforms/g5k.xml ONE_LINK)
-
 if(enable_debug)
   # these tests need assertions
   ADD_TESH(tesh-parser-bogus-symmetric         --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simdag/flatifier --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier ${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh)
diff --git a/teshsuite/simdag/basic-parsing-test/basic-parsing-test.c b/teshsuite/simdag/basic-parsing-test/basic-parsing-test.c
deleted file mode 100644 (file)
index c375ce5..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (c) 2008-2021. 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 "simgrid/simdag.h"
-
-static void test_one_link(const sg_host_t* hosts)
-{
-  const_sg_host_t h1 = hosts[0];
-  const_sg_host_t h2 = hosts[1];
-  const char* name1  = sg_host_get_name(h1);
-  const char* name2  = sg_host_get_name(h2);
-
-  fprintf(stderr, "Route between %s and %s\n", name1, name2);
-  xbt_dynar_t route = xbt_dynar_new(sizeof(SD_link_t), NULL);
-  sg_host_get_route(h1, h2, route);
-  fprintf(stderr, "Route size %lu\n", xbt_dynar_length(route));
-  unsigned int i;
-  SD_link_t link;
-  xbt_dynar_foreach (route, i, link)
-    fprintf(stderr, "  Link %s: latency = %f, bandwidth = %f\n", sg_link_get_name(link), sg_link_get_latency(link),
-            sg_link_get_bandwidth(link));
-  fprintf(stderr, "Route latency = %f, route bandwidth = %f\n", sg_host_get_route_latency(h1, h2),
-          sg_host_get_route_bandwidth(h1, h2));
-  xbt_dynar_free_container(&route);
-}
-
-static void test_full_link(const sg_host_t* hosts)
-{
-  size_t list_size = sg_host_count();
-  for (size_t i = 0; i < list_size; i++) {
-    const_sg_host_t h1 = hosts[i];
-    const char* name1  = sg_host_get_name(h1);
-    for (size_t j = 0; j < list_size; j++) {
-      const_sg_host_t h2 = hosts[j];
-      const char* name2  = sg_host_get_name(h2);
-      fprintf(stderr, "Route between %s and %s\n", name1, name2);
-      xbt_dynar_t route = xbt_dynar_new(sizeof(SD_link_t), NULL);
-      sg_host_get_route(h1, h2, route);
-      fprintf(stderr, "  Route size %lu\n", xbt_dynar_length(route));
-      unsigned int k;
-      SD_link_t link;
-      xbt_dynar_foreach (route, k, link)
-        fprintf(stderr, "  Link %s: latency = %f, bandwidth = %f\n", sg_link_get_name(link), sg_link_get_latency(link),
-                sg_link_get_bandwidth(link));
-      fprintf(stderr, "  Route latency = %f, route bandwidth = %f\n", sg_host_get_route_latency(h1, h2),
-              sg_host_get_route_bandwidth(h1, h2));
-      xbt_dynar_free_container(&route);
-    }
-  }
-}
-
-int main(int argc, char** argv)
-{
-  SD_init(&argc, argv);
-
-  /* creation of the environment */
-  SD_create_environment(argv[1]);
-  fprintf(stderr, "Workstation number: %zu, link number: %d\n", sg_host_count(), sg_link_count());
-
-  sg_host_t* hosts = sg_host_list();
-  if (argc >= 3) {
-    if (!strcmp(argv[2], "ONE_LINK"))
-      test_one_link(hosts);
-    if (!strcmp(argv[2], "FULL_LINK"))
-      test_full_link(hosts);
-    if (!strcmp(argv[2], "PROP"))
-      fprintf(stderr,"SG_TEST_mem: %s\n", sg_host_get_property_value(sg_host_by_name("host1"), "SG_TEST_mem"));
-  }
-  xbt_free(hosts);
-
-  return 0;
-}
diff --git a/teshsuite/simdag/basic-parsing-test/basic-parsing-test.tesh b/teshsuite/simdag/basic-parsing-test/basic-parsing-test.tesh
deleted file mode 100644 (file)
index 566cf35..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-! output sort
-
-$ ${bindir:=.}/basic-parsing-test ../platforms/one_cluster.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
-> [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
-> Workstation number: 5, link number: 12
-
-! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/host_attributes.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
-> [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
-> Workstation number: 5, link number: 1
-
-! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/link_attributes.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
-> [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
-> Workstation number: 1, link number: 5
-
-! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/three_hosts_non_symmetric_route.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
-> [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
-> Workstation number: 3, link number: 4
-
-! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/two_clusters.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
-> [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
-> Workstation number: 4, link number: 12
-
-! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/two_hosts_multi_hop.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
-> [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
-> Workstation number: 2, link number: 4
-
-! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/two_hosts_one_link.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
-> [  0.000000] (0:maestro@) Switching to the L07 model to handle parallel tasks.
-> Workstation number: 2, link number: 2
-
-! output sort
-$ ${bindir:=.}/basic-parsing-test ../platforms/four_hosts_floyd.xml
-> [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
-> Workstation number: 4, link number: 5
-
-$ ${bindir:=.}/basic-parsing-test ../platforms/properties.xml
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/optim' to 'TI'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '0.000010'
-> Workstation number: 1, link number: 1
-
-$ ${bindir:=.}/basic-parsing-test ../platforms/properties.xml --cfg=cpu/optim:TI
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/optim' to 'TI'
-> [0.000000] [surf_parse/INFO] The custom configuration 'cpu/optim' is already defined by user!
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'host/model' to 'compound'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '0.000010'
-> Workstation number: 1, link number: 1
-