From 06e50380de1b8cf82ce7241ce1fb96750097ba01 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Tue, 16 Feb 2021 20:55:30 +0100 Subject: [PATCH] Start to replace old simdag tests of the ptask_L07 model --- MANIFEST.in | 12 +- examples/platforms/ptask_L07.xml | 26 +++ teshsuite/models/CMakeLists.txt | 2 +- teshsuite/models/ptask_L07/ptask_L07.cpp | 200 ++++++++++++++++++ teshsuite/models/ptask_L07/ptask_L07.tesh | 87 ++++++++ teshsuite/simdag/CMakeLists.txt | 4 +- .../comm-p2p-latency-1/comm-p2p-latency-1.c | 41 ---- .../comm-p2p-latency-1.tesh | 20 -- .../comm-p2p-latency-2/comm-p2p-latency-2.c | 51 ----- .../comm-p2p-latency-2.tesh | 20 -- .../comm-p2p-latency-3/comm-p2p-latency-3.c | 52 ----- .../comm-p2p-latency-3.tesh | 21 -- .../simdag/comp-only-par/comp-only-par.c | 31 --- .../simdag/comp-only-par/comp-only-par.tesh | 11 - .../simdag/comp-only-seq/comp-only-seq.c | 34 --- .../simdag/comp-only-seq/comp-only-seq.tesh | 6 - tools/cmake/DefinePackages.cmake | 1 + 17 files changed, 319 insertions(+), 300 deletions(-) create mode 100644 examples/platforms/ptask_L07.xml create mode 100644 teshsuite/models/ptask_L07/ptask_L07.cpp create mode 100644 teshsuite/models/ptask_L07/ptask_L07.tesh delete mode 100644 teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.c delete mode 100644 teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.tesh delete mode 100644 teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.c delete mode 100644 teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.tesh delete mode 100644 teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.c delete mode 100644 teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.tesh delete mode 100644 teshsuite/simdag/comp-only-par/comp-only-par.c delete mode 100644 teshsuite/simdag/comp-only-par/comp-only-par.tesh delete mode 100644 teshsuite/simdag/comp-only-seq/comp-only-seq.c delete mode 100644 teshsuite/simdag/comp-only-seq/comp-only-seq.tesh diff --git a/MANIFEST.in b/MANIFEST.in index 7944f43700..2ffe42a905 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 index 0000000000..93e69995d6 --- /dev/null +++ b/examples/platforms/ptask_L07.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/teshsuite/models/CMakeLists.txt b/teshsuite/models/CMakeLists.txt index 66b7b1aef4..c3fe573c75 100644 --- a/teshsuite/models/CMakeLists.txt +++ b/teshsuite/models/CMakeLists.txt @@ -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 index 0000000000..c171005639 --- /dev/null +++ b/teshsuite/models/ptask_L07/ptask_L07.cpp @@ -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 "); + +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 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({1.0, 1.0})) + ->set_hosts(std::vector({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({1.0, 1.0})) + ->set_hosts(std::vector({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 index 0000000000..e6347a0a26 --- /dev/null +++ b/teshsuite/models/ptask_L07/ptask_L07.tesh @@ -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. diff --git a/teshsuite/simdag/CMakeLists.txt b/teshsuite/simdag/CMakeLists.txt index 485c68ece9..e7fc0e2b9f 100644 --- a/teshsuite/simdag/CMakeLists.txt +++ b/teshsuite/simdag/CMakeLists.txt @@ -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 index cb7a6d46b9..0000000000 --- a/teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.c +++ /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 -#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 index 654230ba04..0000000000 --- a/teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.tesh +++ /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 index 860f995a5d..0000000000 --- a/teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.c +++ /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 -#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 index 6416d54575..0000000000 --- a/teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.tesh +++ /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 index 8d672266d6..0000000000 --- a/teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.c +++ /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 -#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 index c4935b43cc..0000000000 --- a/teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.tesh +++ /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 index fbfb6fb3ca..0000000000 --- a/teshsuite/simdag/comp-only-par/comp-only-par.c +++ /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 -#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 index 19c2a3639a..0000000000 --- a/teshsuite/simdag/comp-only-par/comp-only-par.tesh +++ /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 index ab9c68bcca..0000000000 --- a/teshsuite/simdag/comp-only-seq/comp-only-seq.c +++ /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 -#include - -#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 index 1aeec46e8c..0000000000 --- a/teshsuite/simdag/comp-only-seq/comp-only-seq.tesh +++ /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 diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index d9e4f779dd..ee1750d793 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -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 -- 2.20.1