From 36abb6b34caac8dde16b256b8b935430fa2bfbf6 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 5 Oct 2017 22:20:30 +0200 Subject: [PATCH] add a test to cover the Constant-time network model --- examples/msg/app-pingpong/app-pingpong.tesh | 15 +++++++++++++++ examples/platforms/small_platform_constant.xml | 13 +++++++++++++ examples/s4u/app-pingpong/s4u-app-pingpong.tesh | 15 +++++++++++++++ tools/cmake/DefinePackages.cmake | 1 + 4 files changed, 44 insertions(+) create mode 100644 examples/platforms/small_platform_constant.xml diff --git a/examples/msg/app-pingpong/app-pingpong.tesh b/examples/msg/app-pingpong/app-pingpong.tesh index cc5879434b..db285761a5 100644 --- a/examples/msg/app-pingpong/app-pingpong.tesh +++ b/examples/msg/app-pingpong/app-pingpong.tesh @@ -55,3 +55,18 @@ $ $SG_TEST_EXENV ${bindir:=.}/app-pingpong$EXEEXT ${srcdir:=.}/small_platform.xm > [150.178356] (1:pinger@Tremblay) Task received : large communication (bandwidth bound) > [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159 > [150.178356] (0:maestro@) Total simulation time: 150.178 + +p Testing the surf network constant model + +$ $SG_TEST_EXENV ${bindir:=.}/app-pingpong$EXEEXT ${srcdir:=.}/small_platform_constant.xml ${srcdir:=.}/../msg/app-pingpong/app-pingpong_d.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Constant" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +> [ 0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound' +> [ 0.000000] (0:maestro@) Configuration change: Set 'cpu/model' to 'Cas01' +> [ 0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'Constant' +> [ 0.000000] (1:pinger@Tremblay) Ping -> Jupiter +> [ 0.000000] (2:ponger@Jupiter) Pong -> Tremblay +> [ 13.010000] (2:ponger@Jupiter) Task received : small communication (latency bound) +> [ 13.010000] (2:ponger@Jupiter) Ping time (latency bound) 13.010000 +> [ 13.010000] (2:ponger@Jupiter) task_bw->data = 13.010 +> [ 26.020000] (1:pinger@Tremblay) Task received : large communication (bandwidth bound) +> [ 26.020000] (1:pinger@Tremblay) Pong time (bandwidth bound): 13.010 +> [ 26.020000] (0:maestro@) Total simulation time: 26.020 diff --git a/examples/platforms/small_platform_constant.xml b/examples/platforms/small_platform_constant.xml new file mode 100644 index 0000000000..a338bd1e4a --- /dev/null +++ b/examples/platforms/small_platform_constant.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/examples/s4u/app-pingpong/s4u-app-pingpong.tesh b/examples/s4u/app-pingpong/s4u-app-pingpong.tesh index dd1102de13..3f4c619e36 100644 --- a/examples/s4u/app-pingpong/s4u-app-pingpong.tesh +++ b/examples/s4u/app-pingpong/s4u-app-pingpong.tesh @@ -55,3 +55,18 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-app-pingpong$EXEEXT ${srcdir:=.}/small_platfor > [150.178356] (1:pinger@Tremblay) Task received : large communication (bandwidth bound) > [150.178356] (1:pinger@Tremblay) Pong time (bandwidth bound): 150.159 > [150.178356] (0:maestro@) Total simulation time: 150.178 + +p Testing the surf network constant model + +$ $SG_TEST_EXENV ${bindir:=.}/s4u-app-pingpong$EXEEXT ${srcdir:=.}/small_platform_constant.xml "--cfg=host/model:compound cpu/model:Cas01 network/model:Constant" "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +> [ 0.000000] (0:maestro@) Configuration change: Set 'host/model' to 'compound' +> [ 0.000000] (0:maestro@) Configuration change: Set 'cpu/model' to 'Cas01' +> [ 0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'Constant' +> [ 0.000000] (1:pinger@Tremblay) Ping -> Jupiter +> [ 0.000000] (2:ponger@Jupiter) Pong -> Tremblay +> [ 13.010000] (2:ponger@Jupiter) Task received : small communication (latency bound) +> [ 13.010000] (2:ponger@Jupiter) Ping time (latency bound) 13.010000 +> [ 13.010000] (2:ponger@Jupiter) task_bw->data = 13.010 +> [ 26.020000] (1:pinger@Tremblay) Task received : large communication (bandwidth bound) +> [ 26.020000] (1:pinger@Tremblay) Pong time (bandwidth bound): 13.010 +> [ 26.020000] (0:maestro@) Total simulation time: 26.020 diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 247836ac98..5f9b6d74b9 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -1126,6 +1126,7 @@ set(PLATFORMS_EXAMPLES examples/platforms/storage/storage.xml examples/platforms/small_platform.xml examples/platforms/small_platform.lua + examples/platforms/small_platform_constant.xml examples/platforms/small_platform_fatpipe.xml examples/platforms/small_platform_one_link_routes.xml examples/platforms/small_platform_with_failures.xml -- 2.20.1