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
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
--- /dev/null
+<?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>
-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})
--- /dev/null
+/* 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;
+}
+
--- /dev/null
+#!/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.
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})
+++ /dev/null
-/* 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;
-}
+++ /dev/null
-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
+++ /dev/null
-/* 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;
-}
+++ /dev/null
-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
+++ /dev/null
-/* 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;
-}
+++ /dev/null
-
-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
+++ /dev/null
-/* 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;
-}
+++ /dev/null
-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
+++ /dev/null
-/* 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;
-}
+++ /dev/null
-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
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