Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Start to replace old simdag tests of the ptask_L07 model
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 16 Feb 2021 19:55:30 +0000 (20:55 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 16 Feb 2021 20:07:50 +0000 (21:07 +0100)
17 files changed:
MANIFEST.in
examples/platforms/ptask_L07.xml [new file with mode: 0644]
teshsuite/models/CMakeLists.txt
teshsuite/models/ptask_L07/ptask_L07.cpp [new file with mode: 0644]
teshsuite/models/ptask_L07/ptask_L07.tesh [new file with mode: 0644]
teshsuite/simdag/CMakeLists.txt
teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.c [deleted file]
teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.tesh [deleted file]
teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.c [deleted file]
teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.tesh [deleted file]
teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.c [deleted file]
teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.tesh [deleted file]
teshsuite/simdag/comp-only-par/comp-only-par.c [deleted file]
teshsuite/simdag/comp-only-par/comp-only-par.tesh [deleted file]
teshsuite/simdag/comp-only-seq/comp-only-seq.c [deleted file]
teshsuite/simdag/comp-only-seq/comp-only-seq.tesh [deleted file]
tools/cmake/DefinePackages.cmake

index 7944f43..2ffe42a 100644 (file)
@@ -673,6 +673,8 @@ include teshsuite/mc/random-bug/random-bug.cpp
 include teshsuite/mc/random-bug/random-bug.tesh
 include teshsuite/models/cloud-sharing/cloud-sharing.cpp
 include teshsuite/models/cloud-sharing/cloud-sharing.tesh
+include teshsuite/models/ptask_L07/ptask_L07.cpp
+include teshsuite/models/ptask_L07/ptask_L07.tesh
 include teshsuite/models/wifi_usage/wifi_usage.cpp
 include teshsuite/models/wifi_usage/wifi_usage.tesh
 include teshsuite/models/wifi_usage_decay/wifi_usage_decay.cpp
@@ -774,18 +776,8 @@ include teshsuite/simdag/comm-mxn-independent/comm-mxn-independent.c
 include teshsuite/simdag/comm-mxn-independent/comm-mxn-independent.tesh
 include teshsuite/simdag/comm-mxn-scatter/comm-mxn-scatter.c
 include teshsuite/simdag/comm-mxn-scatter/comm-mxn-scatter.tesh
-include teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.c
-include teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.tesh
-include teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.c
-include teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.tesh
-include teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.c
-include teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.tesh
 include teshsuite/simdag/comm-p2p-latency-bound/comm-p2p-latency-bound.c
 include teshsuite/simdag/comm-p2p-latency-bound/comm-p2p-latency-bound.tesh
-include teshsuite/simdag/comp-only-par/comp-only-par.c
-include teshsuite/simdag/comp-only-par/comp-only-par.tesh
-include teshsuite/simdag/comp-only-seq/comp-only-seq.c
-include teshsuite/simdag/comp-only-seq/comp-only-seq.tesh
 include teshsuite/simdag/flatifier/bogus_missing_gateway.tesh
 include teshsuite/simdag/flatifier/bogus_two_hosts_asymetric.tesh
 include teshsuite/simdag/flatifier/flatifier.cpp
diff --git a/examples/platforms/ptask_L07.xml b/examples/platforms/ptask_L07.xml
new file mode 100644 (file)
index 0000000..93e6999
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
+<platform version="4.1">
+  <zone  id="AS0"  routing="Full">
+    <host id="cpu0" speed="1f" />
+    <host id="cpu1" speed="1f" />
+       <host id="cpu2" speed="2f" />
+
+    <link id="switch" bandwidth="2Bps" latency="1s" sharing_policy="FATPIPE"/>
+    <link id="link0" bandwidth="1Bps" latency="500ms" sharing_policy="SHARED" />
+    <link id="link1" bandwidth="1Bps" latency="500ms" sharing_policy="SHARED" />
+    <link id="link2" bandwidth="1Bps" latency="500ms" sharing_policy="FATPIPE" />
+
+    <route src="cpu0" dst="cpu1">
+      <link_ctn id="link0" />
+    </route>
+    <route src="cpu0" dst="cpu2">
+      <link_ctn id="link2" />
+    </route>
+    <route src="cpu1" dst="cpu2">
+      <link_ctn id="link0" />
+      <link_ctn id="switch" />
+      <link_ctn id="link1" />
+    </route>
+  </zone>
+</platform>
index 66b7b1a..c3fe573 100644 (file)
@@ -1,4 +1,4 @@
-foreach(x cloud-sharing wifi_usage wifi_usage_decay)
+foreach(x cloud-sharing ptask_L07 wifi_usage wifi_usage_decay)
   add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.cpp)
   target_link_libraries(${x}  simgrid)
   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
diff --git a/teshsuite/models/ptask_L07/ptask_L07.cpp b/teshsuite/models/ptask_L07/ptask_L07.cpp
new file mode 100644 (file)
index 0000000..c171005
--- /dev/null
@@ -0,0 +1,200 @@
+/* Copyright g(c) 2019-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 "simgrid/s4u.hpp"
+#include "xbt/asserts.h"
+#include "xbt/log.h"
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(ptask_L07_tes, "[usage] ptask_LO7 <platform-file>");
+
+namespace sg4 = simgrid::s4u;
+
+/* We need a separate actor so that it can sleep after each test */
+static void main_dispatcher()
+{
+  sg4::Engine* e = sg4::Engine::get_instance();
+  double start_time;
+  double end_time;
+  std::vector<sg4::Host*> hosts = e->get_all_hosts();
+
+  XBT_INFO("TEST: Create and run a sequential execution.");
+  XBT_INFO("------------------------------------------------------------");
+  XBT_INFO("Have to compute 1 flop on a 1 flop/s host.");
+  XBT_INFO("Should be done in exactly one second.");
+  start_time = e->get_clock();
+  sg4::Exec::init()->set_flops_amount(1)->set_host(hosts[0])->wait();
+  end_time = e->get_clock();
+  XBT_INFO("Actual result: computing 1 flop at 1 flop/s takes %.2f seconds.", end_time - start_time);
+  XBT_INFO("\n");
+
+  sg4::this_actor::sleep_for(5);
+
+  XBT_INFO("TEST: Create and run a parallel execution on 2 homogeneous hosts.");
+  XBT_INFO("------------------------------------------------------------");
+  XBT_INFO("Have to compute 2 flops across two hosts running at 1 flop/s.");
+  XBT_INFO("Should be done in exactly one second.");
+  start_time = e->get_clock();
+  sg4::Exec::init()->set_flops_amounts(std::vector<double>({1.0, 1.0}))
+                   ->set_hosts(std::vector<sg4::Host*>({hosts[0], hosts[1]}))
+                   ->wait();
+  end_time = e->get_clock();
+  XBT_INFO("Actual result: computing 2 flops on 2 hosts at 1 flop/s takes %.2f seconds.", end_time - start_time);
+  XBT_INFO("\n");
+
+  sg4::this_actor::sleep_for(5);
+
+  XBT_INFO("TEST: Create and run a parallel execution on 2 heterogeneous hosts.");
+  XBT_INFO("------------------------------------------------------------");
+  XBT_INFO("Have to compute 2 flops across two hosts, one running at 1 flop/s and one at 2 flop/s.");
+  XBT_INFO("Should be done in exactly one second.");
+  start_time = e->get_clock();
+  sg4::Exec::init()->set_flops_amounts(std::vector<double>({1.0, 1.0}))
+                   ->set_hosts(std::vector<sg4::Host*>({hosts[1], hosts[2]}))
+                   ->wait();
+  end_time = e->get_clock();
+  XBT_INFO("Actual result: computing 2 flops on 2 heterogeneous hosts takes %.2f seconds.", end_time - start_time);
+  XBT_INFO("\n");
+
+  sg4::this_actor::sleep_for(5);
+
+  XBT_INFO("TEST: Latency test between hosts connected by a shared link.");
+  XBT_INFO("------------------------------------------------------------");
+  XBT_INFO("Have to send 1B from one host to another at 1Bps with a latency of 500ms.");
+  XBT_INFO("Should be done in 1.5 seconds (500ms latency + 1s transfert).");
+  start_time = e->get_clock();
+  sg4::Comm::sendto_async(hosts[0], hosts[1], 1.0)->wait();
+  end_time = e->get_clock();
+  XBT_INFO("Actual result: sending 1 byte on a shared link at 1Bps + 500ms takes %.2f seconds.", end_time - start_time);
+  XBT_INFO("\n");
+
+  sg4::this_actor::sleep_for(5);
+
+  XBT_INFO("TEST: Latency test between hosts connected by a fatpipe link.");
+  XBT_INFO("------------------------------------------------------------");
+  XBT_INFO("Have to send 1B from one host to another at 1Bps with a latency of 500ms.");
+  XBT_INFO("Should be done in 1.5 seconds (500ms latency + 1s transfert).");
+  start_time = e->get_clock();
+  sg4::Comm::sendto_async(hosts[0], hosts[2], 1.0)->wait();
+  end_time = e->get_clock();
+  XBT_INFO("Actual result: sending 1 byte on a fatpipe link at 1Bps + 500ms takes %.2f seconds.", end_time - start_time);
+  XBT_INFO("\n");
+
+  sg4::this_actor::sleep_for(5);
+
+  XBT_INFO("TEST: Latency test between hosts connected by a 3-link route.");
+  XBT_INFO("------------------------------------------------------------");
+  XBT_INFO("Have to send 1B from one host to another at 1Bps with a latency of 2 x 500ms + 1s.");
+  XBT_INFO("Should be done in 3 seconds (2 x 500ms + 1s latency + 1s transfert).");
+  start_time = e->get_clock();
+  sg4::Comm::sendto_async(hosts[1], hosts[2], 1.0)->wait();
+  end_time = e->get_clock();
+  XBT_INFO("Actual result: sending 1 byte on a 3-link route at 1Bps + 2,500ms takes %.2f seconds.", end_time - start_time);
+  XBT_INFO("\n");
+
+  sg4::this_actor::sleep_for(5);
+
+   XBT_INFO("TEST: Latency test between hosts connected by a shared link with 2 comms in same direction.");
+   XBT_INFO("------------------------------------------------------------");
+   XBT_INFO("Have to send 2 x 1B from one host to another at 1Bps with a latency of 500ms.");
+   XBT_INFO("Should be done in 2.5 seconds (500ms latency + 2s transfert).");
+   start_time = e->get_clock();
+   sg4::CommPtr c1 = sg4::Comm::sendto_async(hosts[0], hosts[1], 1.0);
+   sg4::CommPtr c2 = sg4::Comm::sendto_async(hosts[0], hosts[1], 1.0);
+   c1->wait();
+   c2->wait();
+   end_time = e->get_clock();
+   XBT_INFO("Actual result: sending 2x1 bytes on a shared link at 1Bps + 500ms takes %.2f seconds.", end_time - start_time);
+   XBT_INFO("\n");
+
+   sg4::this_actor::sleep_for(5);
+
+   XBT_INFO("TEST: Latency test between hosts connected by a fatpipe link with 2 comms in same direction.");
+   XBT_INFO("------------------------------------------------------------");
+   XBT_INFO("Have to send 2 x 1B from one host to another at 1Bps with a latency of 500ms.");
+   XBT_INFO("Should be done in 1.5 seconds (500ms latency + 1s transfert).");
+   start_time = e->get_clock();
+   c1 = sg4::Comm::sendto_async(hosts[0], hosts[2], 1.0);
+   c2 = sg4::Comm::sendto_async(hosts[0], hosts[2], 1.0);
+   c1->wait();
+   c2->wait();
+   end_time = e->get_clock();
+   XBT_INFO("Actual result: sending 2x1 bytes on a fatpipe link at 1Bps + 500ms takes %.2f seconds.", end_time - start_time);
+   XBT_INFO("\n");
+
+   sg4::this_actor::sleep_for(5);
+
+   XBT_INFO("TEST: Latency test between hosts connected by a 3-link route with 2 comms in same direction.");
+   XBT_INFO("------------------------------------------------------------");
+   XBT_INFO("Have to send 2 x 1B from one host to another at 1Bps with a latency of 2 x 500ms + 1s.");
+   XBT_INFO("Should be done in 4 seconds (2 x 500ms + 1s latency + 2s transfert).");
+   start_time = e->get_clock();
+   c1 = sg4::Comm::sendto_async(hosts[1], hosts[2], 1.0);
+   c2 = sg4::Comm::sendto_async(hosts[1], hosts[2], 1.0);
+   c1->wait();
+   c2->wait();
+   end_time = e->get_clock();
+   XBT_INFO("Actual result: sending 2x1 bytes on a 3-link route at 1Bps + 2,500ms takes %.2f seconds.",
+            end_time - start_time);
+   XBT_INFO("\n");
+
+   sg4::this_actor::sleep_for(5);
+
+   XBT_INFO("TEST: Latency test between hosts connected by a shared link with 2 comms in opposite direction.");
+   XBT_INFO("------------------------------------------------------------");
+   XBT_INFO("Have to send 1B between two hosts in each direction at 1Bps with a latency of 500ms.");
+   XBT_INFO("Should be done in 2.5 seconds (500ms latency + 2s transfert).");
+   start_time = e->get_clock();
+   c1 = sg4::Comm::sendto_async(hosts[0], hosts[1], 1.0);
+   c2 = sg4::Comm::sendto_async(hosts[1], hosts[0], 1.0);
+   c1->wait();
+   c2->wait();
+   end_time = e->get_clock();
+   XBT_INFO("Actual result: sending 1 byte in both directions on a shared link at 1Bps + 500ms takes %.2f seconds.",
+            end_time - start_time);
+   XBT_INFO("\n");
+
+   sg4::this_actor::sleep_for(5);
+
+   XBT_INFO("TEST: Latency test between hosts connected by a fatpipe link with 2 comms in opposite direction.");
+   XBT_INFO("------------------------------------------------------------");
+   XBT_INFO("Have to send 1B between two hosts in each direction at 1Bps with a latency of 500ms.");
+   XBT_INFO("Should be done in 1.5 seconds (500ms latency + 1s transfert).");
+   start_time = e->get_clock();
+   c1 = sg4::Comm::sendto_async(hosts[0], hosts[2], 1.0);
+   c2 = sg4::Comm::sendto_async(hosts[2], hosts[0], 1.0);
+   c1->wait();
+   c2->wait();
+   end_time = e->get_clock();
+   XBT_INFO("Actual result: sending 1 byte in both directions on a fatpipe link at 1Bps + 500ms takes %.2f seconds.",
+            end_time - start_time);
+   XBT_INFO("\n");
+
+   sg4::this_actor::sleep_for(5);
+
+   XBT_INFO("TEST: Latency test between hosts connected by a 3-link route with 2 comms in opposite direction.");
+   XBT_INFO("------------------------------------------------------------");
+   XBT_INFO("Have to send 1B between two hosts in each direction at 1Bps with a latency of 2 x 500ms + 1s.");
+   XBT_INFO("Should be done in 4 seconds (2 x 500ms + 1s latency + 2s transfert).");
+   start_time = e->get_clock();
+   c1 = sg4::Comm::sendto_async(hosts[1], hosts[2], 1.0);
+   c2 = sg4::Comm::sendto_async(hosts[2], hosts[1], 1.0);
+   c1->wait();
+   c2->wait();
+   end_time = e->get_clock();
+   XBT_INFO("Actual result: sending 1 byte in both directions on a 3-link route at 1Bps + 2,500ms takes %.2f seconds.",
+             end_time - start_time);
+   XBT_INFO("\n");
+}
+
+int main(int argc, char** argv)
+{
+  simgrid::s4u::Engine engine(&argc, argv);
+  engine.load_platform(argv[1]);
+  simgrid::s4u::Actor::create("dispatcher", simgrid::s4u::Host::by_name("cpu0"), main_dispatcher);
+  engine.run();
+
+  return 0;
+}
+
diff --git a/teshsuite/models/ptask_L07/ptask_L07.tesh b/teshsuite/models/ptask_L07/ptask_L07.tesh
new file mode 100644 (file)
index 0000000..e6347a0
--- /dev/null
@@ -0,0 +1,87 @@
+#!/usr/bin/env tesh
+
+$ ${bindir:=.}/ptask_L07 --cfg=host/model:ptask_L07 ${platfdir}/ptask_L07.xml --log=root.fmt=%m%n
+> Configuration change: Set 'host/model' to 'ptask_L07'
+> Switching to the L07 model to handle parallel tasks.
+> TEST: Create and run a sequential execution.
+> ------------------------------------------------------------
+> Have to compute 1 flop on a 1 flop/s host.
+> Should be done in exactly one second.
+> Actual result: computing 1 flop at 1 flop/s takes 1.00 seconds.
+>
+>
+> TEST: Create and run a parallel execution on 2 homogeneous hosts.
+> ------------------------------------------------------------
+> Have to compute 2 flops across two hosts running at 1 flop/s.
+> Should be done in exactly one second.
+> Actual result: computing 2 flops on 2 hosts at 1 flop/s takes 1.00 seconds.
+> 
+> 
+> TEST: Create and run a parallel execution on 2 heterogeneous hosts.
+> ------------------------------------------------------------
+> Have to compute 2 flops across two hosts, one running at 1 flop/s and one at 2 flop/s.
+> Should be done in exactly one second.
+> Actual result: computing 2 flops on 2 heterogeneous hosts takes 1.00 seconds.
+> 
+> 
+> TEST: Latency test between hosts connected by a shared link.
+> ------------------------------------------------------------
+> Have to send 1B from one host to another at 1Bps with a latency of 500ms.
+> Should be done in 1.5 seconds (500ms latency + 1s transfert).
+> Actual result: sending 1 byte on a shared link at 1Bps + 500ms takes 1.50 seconds.
+> 
+> 
+> TEST: Latency test between hosts connected by a fatpipe link.
+> ------------------------------------------------------------
+> Have to send 1B from one host to another at 1Bps with a latency of 500ms.
+> Should be done in 1.5 seconds (500ms latency + 1s transfert).
+> Actual result: sending 1 byte on a fatpipe link at 1Bps + 500ms takes 1.50 seconds.
+> 
+> 
+> TEST: Latency test between hosts connected by a 3-link route.
+> ------------------------------------------------------------
+> Have to send 1B from one host to another at 1Bps with a latency of 2 x 500ms + 1s.
+> Should be done in 3 seconds (2 x 500ms + 1s latency + 1s transfert).
+> Actual result: sending 1 byte on a 3-link route at 1Bps + 2,500ms takes 3.00 seconds.
+> 
+> 
+> TEST: Latency test between hosts connected by a shared link with 2 comms in same direction.
+> ------------------------------------------------------------
+> Have to send 2 x 1B from one host to another at 1Bps with a latency of 500ms.
+> Should be done in 2.5 seconds (500ms latency + 2s transfert).
+> Actual result: sending 2x1 bytes on a shared link at 1Bps + 500ms takes 2.50 seconds.
+> 
+> 
+> TEST: Latency test between hosts connected by a fatpipe link with 2 comms in same direction.
+> ------------------------------------------------------------
+> Have to send 2 x 1B from one host to another at 1Bps with a latency of 500ms.
+> Should be done in 1.5 seconds (500ms latency + 1s transfert).
+> Actual result: sending 2x1 bytes on a fatpipe link at 1Bps + 500ms takes 1.50 seconds.
+>
+> 
+> TEST: Latency test between hosts connected by a 3-link route with 2 comms in same direction.
+> ------------------------------------------------------------
+> Have to send 2 x 1B from one host to another at 1Bps with a latency of 2 x 500ms + 1s.
+> Should be done in 4 seconds (2 x 500ms + 1s latency + 2s transfert).
+> Actual result: sending 2x1 bytes on a 3-link route at 1Bps + 2,500ms takes 4.00 seconds.
+> 
+> 
+> TEST: Latency test between hosts connected by a shared link with 2 comms in opposite direction.
+> ------------------------------------------------------------
+> Have to send 1B between two hosts in each direction at 1Bps with a latency of 500ms.
+> Should be done in 2.5 seconds (500ms latency + 2s transfert).
+> Actual result: sending 1 byte in both directions on a shared link at 1Bps + 500ms takes 2.50 seconds.
+> 
+> 
+> TEST: Latency test between hosts connected by a fatpipe link with 2 comms in opposite direction.
+> ------------------------------------------------------------
+> Have to send 1B between two hosts in each direction at 1Bps with a latency of 500ms.
+> Should be done in 1.5 seconds (500ms latency + 1s transfert).
+> Actual result: sending 1 byte in both directions on a fatpipe link at 1Bps + 500ms takes 1.50 seconds.
+>
+> 
+> TEST: Latency test between hosts connected by a 3-link route with 2 comms in opposite direction.
+> ------------------------------------------------------------
+> Have to send 1B between two hosts in each direction at 1Bps with a latency of 2 x 500ms + 1s.
+> Should be done in 4 seconds (2 x 500ms + 1s latency + 2s transfert).
+> Actual result: sending 1 byte in both directions on a 3-link route at 1Bps + 2,500ms takes 4.00 seconds.
index 485c68e..e7fc0e2 100644 (file)
@@ -1,6 +1,6 @@
 foreach(x availability basic0 basic1 basic3 basic4 basic5 basic6 basic-parsing-test
-          comm-mxn-all2all comm-mxn-independent comm-mxn-scatter comm-p2p-latency-1
-          comm-p2p-latency-2 comm-p2p-latency-3 comm-p2p-latency-bound comp-only-par comp-only-seq incomplete)
+          comm-mxn-all2all comm-mxn-independent comm-mxn-scatter
+          comm-p2p-latency-bound incomplete)
   add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.c)
   target_link_libraries(${x}  simgrid)
   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
diff --git a/teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.c b/teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.c
deleted file mode 100644 (file)
index cb7a6d4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Latency tests                                                            */
-
-/* Copyright (c) 2007-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"
-
-/*
- * simple latency test
- * send one byte from 0 to 1
- *
- * this is a test for multiple platforms
- * see tesh file for expected output
- */
-int main(int argc, char **argv)
-{
-  double communication_amount[] = { 0.0, 1.0, 0.0, 0.0 };
-  const double no_cost[] = { 0.0, 0.0 };
-
-  SD_init(&argc, argv);
-  SD_create_environment(argv[1]);
-
-  SD_task_t task = SD_task_create("Comm 1", NULL, 1.0);
-
-  sg_host_t *hosts = sg_host_list();
-  SD_task_schedule(task, 2, hosts, no_cost, communication_amount, -1.0);
-  xbt_free(hosts);
-
-  SD_simulate(-1.0);
-
-  printf("%g\n", SD_get_clock());
-  fflush(stdout);
-
-  SD_task_destroy(task);
-
-  return 0;
-}
diff --git a/teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.tesh b/teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.tesh
deleted file mode 100644 (file)
index 654230b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-p latency check, 1 byte, shared link
-! output sort
-
-$ ${bindir:=.}/comm-p2p-latency-1 ../platforms/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--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.
-> 1.5
-
-p latency check, 1 byte, fat pipe
-! output sort
-
-$ ${bindir:=.}/comm-p2p-latency-1 ../platforms/platform_2p_1fl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--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.
-> 1.5
-
-p latency check, 1 byte, link - switch - link
-! output sort
-
-$ ${bindir:=.}/comm-p2p-latency-1 ../platforms/platform_2p_1switch.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--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.
-> 3
diff --git a/teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.c b/teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.c
deleted file mode 100644 (file)
index 860f995..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Latency tests                                                            */
-
-/* Copyright (c) 2007-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"
-
-/*
- * bw and latency test 2
- * send 2 x 1 byte from 2 task in same direction 0 -> 1
- */
-
-int main(int argc, char **argv)
-{
-  double communication_amount1[] = { 0.0, 1.0, 0.0, 0.0 };
-  double communication_amount2[] = { 0.0, 1.0, 0.0, 0.0 };
-  double no_cost1[] = { 0.0 };
-  double no_cost[] = { 0.0, 0.0 };
-
-  SD_init(&argc, argv);
-  SD_create_environment(argv[1]);
-
-  SD_task_t root = SD_task_create("Root", NULL, 1.0);
-  SD_task_t task1 = SD_task_create("Comm 1", NULL, 1.0);
-  SD_task_t task2 = SD_task_create("Comm 2", NULL, 1.0);
-
-  sg_host_t *hosts = sg_host_list();
-  SD_task_schedule(root, 1, hosts, no_cost1, no_cost1, -1.0);
-  SD_task_schedule(task1, 2, hosts, no_cost, communication_amount1, -1.0);
-  SD_task_schedule(task2, 2, hosts, no_cost, communication_amount2, -1.0);
-  xbt_free(hosts);
-
-  SD_task_dependency_add(root, task1);
-  SD_task_dependency_add(root, task2);
-
-  SD_simulate(-1.0);
-
-  printf("%g\n", SD_get_clock());
-  fflush(stdout);
-
-  SD_task_destroy(root);
-  SD_task_destroy(task1);
-  SD_task_destroy(task2);
-
-
-  return 0;
-}
diff --git a/teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.tesh b/teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.tesh
deleted file mode 100644 (file)
index 6416d54..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-p latency check, 2 x 1 byte, same direction, shared link
-! output sort
-
-$ ${bindir:=.}/comm-p2p-latency-2 ../platforms/platform_2p_1sl.xml --log=sd_kernel.thres=warning "--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.
-> 2.5
-
-p latency check, 2 x 1 byte, same direction, fat pipe
-! output sort
-
-$ ${bindir:=.}/comm-p2p-latency-2 ../platforms/platform_2p_1fl.xml --log=sd_kernel.thres=warning "--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.
-> 1.5
-
-p latency check, 2 x 1 byte, same direction, link - switch - link
-! output sort
-
-$ ${bindir:=.}/comm-p2p-latency-2 ../platforms/platform_2p_1switch.xml --log=sd_kernel.thres=warning "--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.
-> 4
diff --git a/teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.c b/teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.c
deleted file mode 100644 (file)
index 8d67226..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Latency tests                                                            */
-
-/* Copyright (c) 2007-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"
-
-/**
- * bw and latency test 3
- * same intention as test 2
- * sending 2 x 1 bytes at the same time
- * this time in opposite direction
- */
-
-int main(int argc, char **argv)
-{
-  double communication_amount1[] = { 0.0, 1.0, 0.0, 0.0 };
-  double communication_amount2[] = { 0.0, 0.0, 1.0, 0.0 };
-  double no_cost1[] = { 0.0 };
-  double no_cost[] = { 0.0, 0.0 };
-
-  SD_init(&argc, argv);
-  SD_create_environment(argv[1]);
-
-  SD_task_t root = SD_task_create("Root", NULL, 1.0);
-  SD_task_t task1 = SD_task_create("Comm 1", NULL, 1.0);
-  SD_task_t task2 = SD_task_create("Comm 2", NULL, 1.0);
-
-  sg_host_t *hosts = sg_host_list();
-  SD_task_schedule(root, 1, hosts, no_cost1, no_cost1, -1.0);
-  SD_task_schedule(task1, 2, hosts, no_cost, communication_amount1, -1.0);
-  SD_task_schedule(task2, 2, hosts, no_cost, communication_amount2, -1.0);
-  xbt_free(hosts);
-
-  SD_task_dependency_add(root, task1);
-  SD_task_dependency_add(root, task2);
-
-  SD_simulate(-1.0);
-
-  printf("%g\n", SD_get_clock());
-  fflush(stdout);
-
-  SD_task_destroy(root);
-  SD_task_destroy(task1);
-  SD_task_destroy(task2);
-
-  return 0;
-}
diff --git a/teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.tesh b/teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.tesh
deleted file mode 100644 (file)
index c4935b4..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-
-p latency check, 2 x 1 byte, opposite direction, shared link
-! output sort
-
-$ ${bindir:=.}/comm-p2p-latency-3 ../platforms/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--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.
-> 2.5
-
-p latency check, 2 x 1 byte, opposite direction, fat pipe
-! output sort
-
-$ ${bindir:=.}/comm-p2p-latency-3 ../platforms/platform_2p_1fl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--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.
-> 1.5
-
-p latency check, 2 x 1 byte, opposite direction, link - switch - link
-! output sort
-
-$ ${bindir:=.}/comm-p2p-latency-3 ../platforms/platform_2p_1switch.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--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.
-> 4
diff --git a/teshsuite/simdag/comp-only-par/comp-only-par.c b/teshsuite/simdag/comp-only-par/comp-only-par.c
deleted file mode 100644 (file)
index fbfb6fb..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (c) 2007-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"
-
-int main(int argc, char **argv)
-{
-  double comm_amount[] = { 0.0, 0.0, 0.0, 0.0 };
-  double comp_cost[] = { 1.0, 1.0 };
-
-  SD_init(&argc, argv);
-  SD_create_environment(argv[1]);
-
-  SD_task_t task = SD_task_create("partask", NULL, 1.0);
-  sg_host_t *hosts = sg_host_list();
-  SD_task_schedule(task, 2, hosts, comp_cost, comm_amount, -1.0);
-  xbt_free(hosts);
-
-  SD_simulate(-1.0);
-
-  printf("%g\n", SD_get_clock());
-  fflush(stdout);
-
-  SD_task_destroy(task);
-
-  return 0;
-}
diff --git a/teshsuite/simdag/comp-only-par/comp-only-par.tesh b/teshsuite/simdag/comp-only-par/comp-only-par.tesh
deleted file mode 100644 (file)
index 19c2a36..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-p par task comp only, no comm, homogeneous
-! output sort
-$ ${bindir:=.}/comp-only-par ../platforms/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--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.
-> 1
-
-p par task comp only, no comm, heterogeneous
-! output sort
-$ ${bindir:=.}/comp-only-par ../platforms/platform_2p_1sl_hetero.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--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.
-> 1
diff --git a/teshsuite/simdag/comp-only-seq/comp-only-seq.c b/teshsuite/simdag/comp-only-seq/comp-only-seq.c
deleted file mode 100644 (file)
index ab9c68b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (c) 2007-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 <stdlib.h>
-
-#include "simgrid/simdag.h"
-
-int main(int argc, char **argv)
-{
-
-  double comm_amount[] = { 0.0 };
-  double comp_cost[] = { 1.0 };
-
-  SD_init(&argc, argv);
-  SD_create_environment(argv[1]);
-
-  SD_task_t task = SD_task_create("seqtask", NULL, 1.0);
-  sg_host_t *hosts = sg_host_list();
-  SD_task_schedule(task, 1, hosts, comp_cost, comm_amount, -1.0);
-  xbt_free(hosts);
-
-  SD_simulate(-1.0);
-
-  printf("%g\n", SD_get_clock());
-  fflush(stdout);
-
-  SD_task_destroy(task);
-
-  return 0;
-}
diff --git a/teshsuite/simdag/comp-only-seq/comp-only-seq.tesh b/teshsuite/simdag/comp-only-seq/comp-only-seq.tesh
deleted file mode 100644 (file)
index 1aeec46..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-p seq task comp only, no comm
-
-! output sort
-$ ${bindir:=.}/comp-only-seq ../platforms/platform_2p_1sl.xml --cfg=path:${srcdir} --log=sd_kernel.thres=warning "--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.
-> 1
index d9e4f77..ee1750d 100644 (file)
@@ -1163,6 +1163,7 @@ set(PLATFORMS_EXAMPLES
   examples/platforms/multicore_machine.xml
   examples/platforms/ns3-big-cluster.xml
   examples/platforms/onelink.xml
+  examples/platforms/ptask_L07.xml
   examples/platforms/prop.xml
   examples/platforms/routing_cluster.xml
   examples/platforms/routing_cluster.lua