From: Martin Quinson Date: Mon, 6 Jul 2020 14:32:42 +0000 (+0200) Subject: Rename the async-* tests into comm-* X-Git-Tag: v3.26~496 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3eb70586943153b08d37dfd66e0ba5e95b0abc24 Rename the async-* tests into comm-* --- diff --git a/examples/README.rst b/examples/README.rst index 0ae9e5065b..3ac16487c6 100644 --- a/examples/README.rst +++ b/examples/README.rst @@ -289,15 +289,15 @@ Communications on the Network .. tabs:: - .. example-tab:: examples/s4u/async-wait/s4u-async-wait.cpp + .. example-tab:: examples/s4u/comm-wait/s4u-comm-wait.cpp See also :cpp:func:`simgrid::s4u::Mailbox::put_async()` and :cpp:func:`simgrid::s4u::Comm::wait()`. - .. example-tab:: examples/python/async-wait/async-wait.py + .. example-tab:: examples/python/comm-wait/comm-wait.py See also :py:func:`simgrid.Mailbox.put_async()` and :py:func:`simgrid.Comm.wait()`. - .. example-tab:: examples/c/async-wait/async-wait.c + .. example-tab:: examples/c/comm-wait/comm-wait.c See also :cpp:func:`sg_mailbox_put_async()` and :cpp:func:`sg_comm__wait()`. @@ -307,15 +307,15 @@ Communications on the Network .. tabs:: - .. example-tab:: examples/s4u/async-waitall/s4u-async-waitall.cpp + .. example-tab:: examples/s4u/comm-waitall/s4u-comm-waitall.cpp See also :cpp:func:`simgrid::s4u::Comm::wait_all()`. - .. example-tab:: examples/python/async-waitall/async-waitall.py + .. example-tab:: examples/python/comm-waitall/comm-waitall.py See also :py:func:`simgrid.Comm.wait_all()`. - .. example-tab:: examples/c/async-waitall/async-waitall.c + .. example-tab:: examples/c/comm-waitall/comm-waitall.c See also :cpp:func:`sg_comm_wait_all()`. @@ -326,15 +326,15 @@ Communications on the Network .. tabs:: - .. example-tab:: examples/s4u/async-waitany/s4u-async-waitany.cpp + .. example-tab:: examples/s4u/comm-waitany/s4u-comm-waitany.cpp See also :cpp:func:`simgrid::s4u::Comm::wait_any()`. - .. example-tab:: examples/python/async-waitany/async-waitany.py + .. example-tab:: examples/python/comm-waitany/comm-waitany.py See also :py:func:`simgrid.Comm.wait_any()`. - .. example-tab:: examples/c/async-waitany/async-waitany.c + .. example-tab:: examples/c/comm-waitany/comm-waitany.c See also :cpp:func:`sg_comm_wait_any`. diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt index 34168e5ef2..ff0d3a4b82 100644 --- a/examples/c/CMakeLists.txt +++ b/examples/c/CMakeLists.txt @@ -5,7 +5,7 @@ foreach(x actor-create actor-daemon actor-exiting actor-join actor-kill actor-lifetime actor-migrate actor-stacksize actor-suspend actor-yield app-masterworker app-pingpong app-token-ring - async-wait async-waitall async-waitany + comm-wait comm-waitall comm-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple dht-pastry exec-async exec-basic exec-dvfs exec-remote exec-waitany @@ -81,12 +81,12 @@ set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/actor-cr ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker-multicore_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworker/app-masterworker-vivaldi_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/app-pingpong_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait2_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait3_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/async-wait4_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/async-waitall_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/async-waitany_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-wait/comm-wait_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-wait/comm-wait2_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-wait/comm-wait3_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-wait/comm-wait4_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-waitall/comm-waitall_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-waitany/comm-waitany_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/dht-kademlia_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/dht-pastry/dht-pastry_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/io-file-remote_d.xml @@ -97,7 +97,7 @@ foreach(x actor-create actor-daemon actor-exiting actor-join actor-kill actor-lifetime actor-migrate actor-stacksize actor-suspend actor-yield app-bittorrent app-chainsend app-masterworker app-pingpong app-token-ring - async-wait async-waitall async-waitany + comm-wait comm-waitall comm-waitany cloud-capping cloud-masterworker cloud-migration cloud-simple dht-kademlia dht-pastry exec-async exec-basic exec-dvfs exec-remote exec-waitany diff --git a/examples/c/async-wait/async-wait.c b/examples/c/comm-wait/comm-wait.c similarity index 98% rename from examples/c/async-wait/async-wait.c rename to examples/c/comm-wait/comm-wait.c index 64ba4efd49..61198631e2 100644 --- a/examples/c/async-wait/async-wait.c +++ b/examples/c/comm-wait/comm-wait.c @@ -14,7 +14,7 @@ #include -XBT_LOG_NEW_DEFAULT_CATEGORY(async_wait, "Messages specific for this example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(comm_wait, "Messages specific for this example"); /* Main function of the Sender actor */ static void sender(int argc, char* argv[]) diff --git a/examples/c/async-wait/async-wait.tesh b/examples/c/comm-wait/comm-wait.tesh similarity index 84% rename from examples/c/async-wait/async-wait.tesh rename to examples/c/comm-wait/comm-wait.tesh index 72cc48a377..9307cd9dd9 100644 --- a/examples/c/async-wait/async-wait.tesh +++ b/examples/c/comm-wait/comm-wait.tesh @@ -2,7 +2,7 @@ p Test1 sg_comm_test() with Sleep_sender > Sleep_receiver -$ ${bindir:=.}/c-async-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/async-wait_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/c-comm-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/comm-wait_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) sleep_start_time : 5.000000 , sleep_test_time : 0.100000 > [ 0.000000] (2:receiver@Ruby) sleep_start_time : 1.000000 , sleep_test_time : 0.100000 > [ 1.000000] (2:receiver@Ruby) Wait for my first message @@ -17,7 +17,7 @@ $ ${bindir:=.}/c-async-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:= p Test2 sg_comm_test() with Sleep_sender < Sleep_receiver -$ ${bindir:=.}/c-async-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/async-wait2_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/c-comm-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/comm-wait2_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) sleep_start_time : 1.000000 , sleep_test_time : 0.100000 > [ 0.000000] (2:receiver@Ruby) sleep_start_time : 5.000000 , sleep_test_time : 0.100000 > [ 1.000000] (1:sender@Tremblay) Send 'Message 0' to 'receiver' @@ -32,7 +32,7 @@ $ ${bindir:=.}/c-async-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:= p Test1 sg_comm_wait() with Sleep_sender > Sleep_receiver -$ ${bindir:=.}/c-async-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/async-wait3_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/c-comm-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/comm-wait3_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) sleep_start_time : 5.000000 , sleep_test_time : 0.000000 > [ 0.000000] (2:receiver@Ruby) sleep_start_time : 1.000000 , sleep_test_time : 0.000000 > [ 1.000000] (2:receiver@Ruby) Wait for my first message @@ -47,7 +47,7 @@ $ ${bindir:=.}/c-async-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:= p Test2 sg_comm_wait() with Sleep_sender < Sleep_receiver -$ ${bindir:=.}/c-async-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/async-wait4_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/c-comm-wait ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/comm-wait4_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) sleep_start_time : 1.000000 , sleep_test_time : 0.000000 > [ 0.000000] (2:receiver@Ruby) sleep_start_time : 5.000000 , sleep_test_time : 0.000000 > [ 1.000000] (1:sender@Tremblay) Send 'Message 0' to 'receiver' diff --git a/examples/c/async-wait/async-wait2_d.xml b/examples/c/comm-wait/comm-wait2_d.xml similarity index 100% rename from examples/c/async-wait/async-wait2_d.xml rename to examples/c/comm-wait/comm-wait2_d.xml diff --git a/examples/c/async-wait/async-wait3_d.xml b/examples/c/comm-wait/comm-wait3_d.xml similarity index 100% rename from examples/c/async-wait/async-wait3_d.xml rename to examples/c/comm-wait/comm-wait3_d.xml diff --git a/examples/c/async-wait/async-wait4_d.xml b/examples/c/comm-wait/comm-wait4_d.xml similarity index 100% rename from examples/c/async-wait/async-wait4_d.xml rename to examples/c/comm-wait/comm-wait4_d.xml diff --git a/examples/c/async-wait/async-wait_d.xml b/examples/c/comm-wait/comm-wait_d.xml similarity index 100% rename from examples/c/async-wait/async-wait_d.xml rename to examples/c/comm-wait/comm-wait_d.xml diff --git a/examples/c/async-waitall/async-waitall.c b/examples/c/comm-waitall/comm-waitall.c similarity index 97% rename from examples/c/async-waitall/async-waitall.c rename to examples/c/comm-waitall/comm-waitall.c index f0755cf812..19922054a3 100644 --- a/examples/c/async-waitall/async-waitall.c +++ b/examples/c/comm-waitall/comm-waitall.c @@ -15,7 +15,7 @@ #include /* snprintf */ -XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_waitall, "Messages specific for this msg example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(comm_waitall, "Messages specific for this msg example"); static void sender(int argc, char* argv[]) { diff --git a/examples/c/async-waitall/async-waitall.tesh b/examples/c/comm-waitall/comm-waitall.tesh similarity index 88% rename from examples/c/async-waitall/async-waitall.tesh rename to examples/c/comm-waitall/comm-waitall.tesh index ce51d6d049..326f543542 100644 --- a/examples/c/async-waitall/async-waitall.tesh +++ b/examples/c/comm-waitall/comm-waitall.tesh @@ -1,7 +1,7 @@ #!/usr/bin/env tesh ! output sort 19 -$ ${bindir:=.}/c-async-waitall ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/async-waitall_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/c-comm-waitall ${platfdir:=.}/small_platform_fatpipe.xml ${srcdir:=.}/comm-waitall_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) Send 'Message 0' to 'receiver-0' > [ 0.000000] (2:receiver@Ruby) Wait for my first message > [ 0.000000] (3:receiver@Perl) Wait for my first message diff --git a/examples/c/async-waitall/async-waitall_d.xml b/examples/c/comm-waitall/comm-waitall_d.xml similarity index 100% rename from examples/c/async-waitall/async-waitall_d.xml rename to examples/c/comm-waitall/comm-waitall_d.xml diff --git a/examples/c/async-waitany/async-waitany.c b/examples/c/comm-waitany/comm-waitany.c similarity index 98% rename from examples/c/async-waitany/async-waitany.c rename to examples/c/comm-waitany/comm-waitany.c index 14a0767470..248a219db0 100644 --- a/examples/c/async-waitany/async-waitany.c +++ b/examples/c/comm-waitany/comm-waitany.c @@ -14,7 +14,7 @@ #include /* snprintf */ -XBT_LOG_NEW_DEFAULT_CATEGORY(async_waitany, "Messages specific for this example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(comm_waitany, "Messages specific for this example"); static void sender(int argc, char* argv[]) { diff --git a/examples/c/async-waitany/async-waitany.tesh b/examples/c/comm-waitany/comm-waitany.tesh similarity index 88% rename from examples/c/async-waitany/async-waitany.tesh rename to examples/c/comm-waitany/comm-waitany.tesh index 9ecd94715d..3d19ecd623 100644 --- a/examples/c/async-waitany/async-waitany.tesh +++ b/examples/c/comm-waitany/comm-waitany.tesh @@ -1,7 +1,7 @@ #!/usr/bin/env tesh ! output sort 19 -$ ${bindir:=.}/c-async-waitany ${platfdir:=.}/small_platform.xml ${srcdir:=.}/async-waitany_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/c-comm-waitany ${platfdir:=.}/small_platform.xml ${srcdir:=.}/comm-waitany_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) Send 'Message 0' to 'receiver-0' > [ 0.000000] (1:sender@Tremblay) Send 'Message 1' to 'receiver-1' > [ 0.000000] (1:sender@Tremblay) Send 'Message 2' to 'receiver-0' diff --git a/examples/c/async-waitany/async-waitany_d.xml b/examples/c/comm-waitany/comm-waitany_d.xml similarity index 100% rename from examples/c/async-waitany/async-waitany_d.xml rename to examples/c/comm-waitany/comm-waitany_d.xml diff --git a/examples/python/CMakeLists.txt b/examples/python/CMakeLists.txt index a62c35e5f8..fa32133393 100644 --- a/examples/python/CMakeLists.txt +++ b/examples/python/CMakeLists.txt @@ -1,5 +1,5 @@ foreach(example actor-create actor-daemon actor-join actor-kill actor-migrate actor-suspend actor-yield actor-lifetime - async-wait async-waitall async-waitany + comm-wait comm-waitall comm-waitany exec-async exec-basic exec-dvfs exec-remote) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${example}/${example}.tesh) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${example}/${example}.py) @@ -19,6 +19,6 @@ endforeach() set(examples_src ${examples_src} PARENT_SCOPE) set(tesh_files ${tesh_files} examples/python/actor-create/actor-create_d.xml examples/python/actor-lifetime/actor-lifetime_d.xml - examples/python/async-wait/async-wait_d.xml - examples/python/async-waitall/async-waitall_d.xml - examples/python/async-waitany/async-waitany_d.xml PARENT_SCOPE) + examples/python/comm-wait/comm-wait_d.xml + examples/python/comm-waitall/comm-waitall_d.xml + examples/python/comm-waitany/comm-waitany_d.xml PARENT_SCOPE) diff --git a/examples/python/async-wait/async-wait.py b/examples/python/comm-wait/comm-wait.py similarity index 100% rename from examples/python/async-wait/async-wait.py rename to examples/python/comm-wait/comm-wait.py diff --git a/examples/python/async-wait/async-wait.tesh b/examples/python/comm-wait/comm-wait.tesh similarity index 80% rename from examples/python/async-wait/async-wait.tesh rename to examples/python/comm-wait/comm-wait.tesh index d95c005b8c..7d7670fbbb 100644 --- a/examples/python/async-wait/async-wait.tesh +++ b/examples/python/comm-wait/comm-wait.tesh @@ -1,6 +1,6 @@ #!/usr/bin/env tesh -$ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${bindir:=.}/async-wait.py ${platfdir}/small_platform_fatpipe.xml async-wait_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${bindir:=.}/comm-wait.py ${platfdir}/small_platform_fatpipe.xml comm-wait_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) Send 'Message 0' to 'Mailbox(receiver-0)' > [ 0.000000] (2:receiver@Ruby) Wait for my first message > [ 0.000000] (1:sender@Tremblay) Send 'Message 1' to 'Mailbox(receiver-0)' diff --git a/examples/python/async-wait/async-wait_d.xml b/examples/python/comm-wait/comm-wait_d.xml similarity index 100% rename from examples/python/async-wait/async-wait_d.xml rename to examples/python/comm-wait/comm-wait_d.xml diff --git a/examples/python/async-waitall/async-waitall.py b/examples/python/comm-waitall/comm-waitall.py similarity index 100% rename from examples/python/async-waitall/async-waitall.py rename to examples/python/comm-waitall/comm-waitall.py diff --git a/examples/python/async-waitall/async-waitall.tesh b/examples/python/comm-waitall/comm-waitall.tesh similarity index 86% rename from examples/python/async-waitall/async-waitall.tesh rename to examples/python/comm-waitall/comm-waitall.tesh index 5a6670471b..208f807c79 100644 --- a/examples/python/async-waitall/async-waitall.tesh +++ b/examples/python/comm-waitall/comm-waitall.tesh @@ -1,6 +1,6 @@ #!/usr/bin/env tesh -$ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${bindir:=.}/async-waitall.py ${platfdir}/small_platform_fatpipe.xml async-waitall_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${bindir:=.}/comm-waitall.py ${platfdir}/small_platform_fatpipe.xml comm-waitall_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) Send 'Message 0' to 'Mailbox(receiver-0)' > [ 0.000000] (2:receiver@Ruby) Wait for my first message > [ 0.000000] (3:receiver@Perl) Wait for my first message diff --git a/examples/python/async-waitall/async-waitall_d.xml b/examples/python/comm-waitall/comm-waitall_d.xml similarity index 100% rename from examples/python/async-waitall/async-waitall_d.xml rename to examples/python/comm-waitall/comm-waitall_d.xml diff --git a/examples/python/async-waitany/async-waitany.py b/examples/python/comm-waitany/comm-waitany.py similarity index 100% rename from examples/python/async-waitany/async-waitany.py rename to examples/python/comm-waitany/comm-waitany.py diff --git a/examples/python/async-waitany/async-waitany.tesh b/examples/python/comm-waitany/comm-waitany.tesh similarity index 89% rename from examples/python/async-waitany/async-waitany.tesh rename to examples/python/comm-waitany/comm-waitany.tesh index 4a1381a547..cd6ebad5df 100644 --- a/examples/python/async-waitany/async-waitany.tesh +++ b/examples/python/comm-waitany/comm-waitany.tesh @@ -3,7 +3,7 @@ p Testing Comm.wait_any() ! output sort 19 -$ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${bindir:=.}/async-waitany.py ${platfdir}/small_platform.xml async-waitany_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${bindir:=.}/comm-waitany.py ${platfdir}/small_platform.xml comm-waitany_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) Send 'Message 0' to 'Mailbox(receiver-0)' > [ 0.000000] (2:receiver@Fafard) Wait for my first message > [ 0.000000] (3:receiver@Jupiter) Wait for my first message diff --git a/examples/python/async-waitany/async-waitany_d.xml b/examples/python/comm-waitany/comm-waitany_d.xml similarity index 100% rename from examples/python/async-waitany/async-waitany_d.xml rename to examples/python/comm-waitany/comm-waitany_d.xml diff --git a/examples/s4u/CMakeLists.txt b/examples/s4u/CMakeLists.txt index fb66719917..5961f089c3 100644 --- a/examples/s4u/CMakeLists.txt +++ b/examples/s4u/CMakeLists.txt @@ -62,7 +62,7 @@ endif() foreach (example actor-create actor-daemon actor-exiting actor-join actor-kill actor-lifetime actor-migrate actor-suspend actor-yield actor-stacksize app-bittorrent app-chainsend app-pingpong app-token-ring - async-ready async-wait async-waitany async-waitall async-waituntil + comm-ready comm-wait comm-waitany comm-waitall comm-waituntil comm-dependent cloud-capping cloud-migration cloud-simple dht-chord dht-kademlia @@ -218,11 +218,11 @@ set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-a ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/app-masterworkers/s4u-app-masterworkers_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-wait/s4u-async-wait_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/s4u-async-waitany_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/s4u-async-waitall_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-ready/s4u-async-ready_d.xml - ${CMAKE_CURRENT_SOURCE_DIR}/async-waituntil/s4u-async-waituntil_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-wait/s4u-comm-wait_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-waitany/s4u-comm-waitany_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-waitall/s4u-comm-waitall_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-ready/s4u-comm-ready_d.xml + ${CMAKE_CURRENT_SOURCE_DIR}/comm-waituntil/s4u-comm-waituntil_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/s4u-dht-kademlia_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/energy-boot/platform_boot.xml diff --git a/examples/s4u/async-ready/s4u-async-ready.cpp b/examples/s4u/comm-ready/s4u-comm-ready.cpp similarity index 77% rename from examples/s4u/async-ready/s4u-async-ready.cpp rename to examples/s4u/comm-ready/s4u-comm-ready.cpp index 68f1242148..88cfbdad60 100644 --- a/examples/s4u/async-ready/s4u-async-ready.cpp +++ b/examples/s4u/comm-ready/s4u-comm-ready.cpp @@ -33,7 +33,8 @@ static void peer(int argc, char** argv) double msg_size = std::stol(argv[3]); /* - message size in bytes */ long peers_count = std::stod(argv[4]); /* - number of peers */ - /* Set myself as the persistent receiver of my mailbox so that messages start flowing to me as soon as they are put into it */ + /* Set myself as the persistent receiver of my mailbox so that messages start flowing to me as soon as they are put + * into it */ simgrid::s4u::Mailbox* my_mbox = simgrid::s4u::Mailbox::by_name(std::string("peer-") + std::to_string(my_id)); my_mbox->set_receiver(simgrid::s4u::Actor::self()); @@ -43,10 +44,11 @@ static void peer(int argc, char** argv) for (int i = 0; i < messages_count; i++) { for (int peer_id = 0; peer_id < peers_count; peer_id++) { if (peer_id != my_id) { - std::string mboxName = std::string("peer-") + std::to_string(peer_id); - simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(mboxName); - std::string msgName = std::string("Message ") + std::to_string(i) + std::string(" from peer ") + std::to_string(my_id); - std::string* payload = new std::string(msgName); // copy the data we send: + std::string mboxName = std::string("peer-") + std::to_string(peer_id); + simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(mboxName); + std::string msgName = + std::string("Message ") + std::to_string(i) + std::string(" from peer ") + std::to_string(my_id); + std::string* payload = new std::string(msgName); // copy the data we send: // 'msgName' is not a stable storage location XBT_INFO("Send '%s' to '%s'", msgName.c_str(), mboxName.c_str()); /* Create a communication representing the ongoing communication */ @@ -58,23 +60,27 @@ static void peer(int argc, char** argv) /* Start sending messages to let peers know that they should stop */ for (int peer_id = 0; peer_id < peers_count; peer_id++) { if (peer_id != my_id) { - std::string mboxName = std::string("peer-") + std::to_string(peer_id); - simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(mboxName); - std::string* payload = new std::string("finalize"); // Make a copy of the data we will send + std::string mboxName = std::string("peer-") + std::to_string(peer_id); + simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(mboxName); + std::string* payload = new std::string("finalize"); // Make a copy of the data we will send pending_comms.push_back(mbox->put_async(payload, msg_size)); XBT_INFO("Send 'finalize' to 'peer-%d'", peer_id); } } XBT_INFO("Done dispatching all messages"); - /* Retrieve all the messages other peers have been sending to me until I receive all the corresponding "Finalize" messages */ + /* Retrieve all the messages other peers have been sending to me until I receive all the corresponding "Finalize" + * messages */ int pending_finalize_messages = peers_count - 1; while (pending_finalize_messages > 0) { if (my_mbox->ready()) { - double start = simgrid::s4u::Engine::get_clock(); + double start = simgrid::s4u::Engine::get_clock(); const std::string* received = static_cast(my_mbox->get()); - double waiting_time = simgrid::s4u::Engine::get_clock() - start; - xbt_assert(waiting_time == 0, "Expecting the waiting time to be 0 because the communication was supposedly ready, but got %f instead", waiting_time); + double waiting_time = simgrid::s4u::Engine::get_clock() - start; + xbt_assert( + waiting_time == 0, + "Expecting the waiting time to be 0 because the communication was supposedly ready, but got %f instead", + waiting_time); XBT_INFO("I got a '%s'.", received->c_str()); if (*received == "finalize") { pending_finalize_messages--; @@ -92,8 +98,7 @@ static void peer(int argc, char** argv) XBT_INFO("Goodbye now!"); } - -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]); diff --git a/examples/s4u/async-ready/s4u-async-ready.tesh b/examples/s4u/comm-ready/s4u-comm-ready.tesh similarity index 97% rename from examples/s4u/async-ready/s4u-async-ready.tesh rename to examples/s4u/comm-ready/s4u-comm-ready.tesh index 9b6d9a8e69..96902d9b02 100644 --- a/examples/s4u/async-ready/s4u-async-ready.tesh +++ b/examples/s4u/comm-ready/s4u-comm-ready.tesh @@ -2,7 +2,7 @@ p Test1 Peer sending and receiving -$ ${bindir:=.}/s4u-async-ready ${platfdir}/small_platform_fatpipe.xml s4u-async-ready_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/s4u-comm-ready ${platfdir}/small_platform_fatpipe.xml s4u-comm-ready_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:peer@Tremblay) Send 'Message 0 from peer 0' to 'peer-1' > [ 0.000000] (2:peer@Ruby) Send 'Message 0 from peer 1' to 'peer-0' > [ 0.000000] (1:peer@Tremblay) Send 'Message 0 from peer 0' to 'peer-2' diff --git a/examples/s4u/async-ready/s4u-async-ready_d.xml b/examples/s4u/comm-ready/s4u-comm-ready_d.xml similarity index 100% rename from examples/s4u/async-ready/s4u-async-ready_d.xml rename to examples/s4u/comm-ready/s4u-comm-ready_d.xml diff --git a/examples/s4u/async-wait/s4u-async-wait.cpp b/examples/s4u/comm-wait/s4u-comm-wait.cpp similarity index 96% rename from examples/s4u/async-wait/s4u-async-wait.cpp rename to examples/s4u/comm-wait/s4u-comm-wait.cpp index 37d6058293..4e7ee1a45d 100644 --- a/examples/s4u/async-wait/s4u-async-wait.cpp +++ b/examples/s4u/comm-wait/s4u-comm-wait.cpp @@ -16,7 +16,7 @@ #include #include -XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_async_wait, "Messages specific for this s4u example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_comm_wait, "Messages specific for this s4u example"); static void sender(int argc, char** argv) { @@ -87,7 +87,7 @@ static void receiver(int, char**) } } -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]); diff --git a/examples/s4u/async-wait/s4u-async-wait.tesh b/examples/s4u/comm-wait/s4u-comm-wait.tesh similarity index 85% rename from examples/s4u/async-wait/s4u-async-wait.tesh rename to examples/s4u/comm-wait/s4u-comm-wait.tesh index 83b5859a6d..d78bf4936c 100644 --- a/examples/s4u/async-wait/s4u-async-wait.tesh +++ b/examples/s4u/comm-wait/s4u-comm-wait.tesh @@ -2,7 +2,7 @@ p Test1 Sleep_sender > Sleep_receiver -$ ${bindir:=.}/s4u-async-wait ${platfdir}/small_platform_fatpipe.xml s4u-async-wait_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/s4u-comm-wait ${platfdir}/small_platform_fatpipe.xml s4u-comm-wait_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) sleep_start_time : 5.000000 , sleep_test_time : 0.000000 > [ 0.000000] (2:receiver@Ruby) sleep_start_time : 1.000000 , sleep_test_time : 0.100000 > [ 1.000000] (2:receiver@Ruby) Wait for my first message diff --git a/examples/s4u/async-wait/s4u-async-wait_d.xml b/examples/s4u/comm-wait/s4u-comm-wait_d.xml similarity index 100% rename from examples/s4u/async-wait/s4u-async-wait_d.xml rename to examples/s4u/comm-wait/s4u-comm-wait_d.xml diff --git a/examples/s4u/async-waitall/s4u-async-waitall.cpp b/examples/s4u/comm-waitall/s4u-comm-waitall.cpp similarity index 99% rename from examples/s4u/async-waitall/s4u-async-waitall.cpp rename to examples/s4u/comm-waitall/s4u-comm-waitall.cpp index 0818656606..09610c3413 100644 --- a/examples/s4u/async-waitall/s4u-async-waitall.cpp +++ b/examples/s4u/comm-waitall/s4u-comm-waitall.cpp @@ -98,7 +98,7 @@ public: } }; -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]); diff --git a/examples/s4u/async-waitall/s4u-async-waitall.tesh b/examples/s4u/comm-waitall/s4u-comm-waitall.tesh similarity index 88% rename from examples/s4u/async-waitall/s4u-async-waitall.tesh rename to examples/s4u/comm-waitall/s4u-comm-waitall.tesh index 04168e495d..5844e84ada 100644 --- a/examples/s4u/async-waitall/s4u-async-waitall.tesh +++ b/examples/s4u/comm-waitall/s4u-comm-waitall.tesh @@ -1,6 +1,6 @@ #!/usr/bin/env tesh -$ ${bindir:=.}/s4u-async-waitall ${platfdir}/small_platform_fatpipe.xml s4u-async-waitall_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/s4u-comm-waitall ${platfdir}/small_platform_fatpipe.xml s4u-comm-waitall_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) Send 'Message 0' to 'receiver-0' > [ 0.000000] (2:receiver@Ruby) Wait for my first message > [ 0.000000] (3:receiver@Perl) Wait for my first message diff --git a/examples/s4u/async-waitall/s4u-async-waitall_d.xml b/examples/s4u/comm-waitall/s4u-comm-waitall_d.xml similarity index 100% rename from examples/s4u/async-waitall/s4u-async-waitall_d.xml rename to examples/s4u/comm-waitall/s4u-comm-waitall_d.xml diff --git a/examples/s4u/async-waitany/s4u-async-waitany.cpp b/examples/s4u/comm-waitany/s4u-comm-waitany.cpp similarity index 97% rename from examples/s4u/async-waitany/s4u-async-waitany.cpp rename to examples/s4u/comm-waitany/s4u-comm-waitany.cpp index d4ef016a4d..dcefe970e1 100644 --- a/examples/s4u/async-waitany/s4u-async-waitany.cpp +++ b/examples/s4u/comm-waitany/s4u-comm-waitany.cpp @@ -22,7 +22,7 @@ #include #include -XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_async_waitall, "Messages specific for this s4u example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_comm_waitall, "Messages specific for this s4u example"); class Sender { long messages_count; /* - number of messages */ @@ -111,7 +111,7 @@ public: } }; -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]); diff --git a/examples/s4u/async-waitany/s4u-async-waitany.tesh b/examples/s4u/comm-waitany/s4u-comm-waitany.tesh similarity index 91% rename from examples/s4u/async-waitany/s4u-async-waitany.tesh rename to examples/s4u/comm-waitany/s4u-comm-waitany.tesh index 5f3dee8dc2..0d56306d80 100644 --- a/examples/s4u/async-waitany/s4u-async-waitany.tesh +++ b/examples/s4u/comm-waitany/s4u-comm-waitany.tesh @@ -3,7 +3,7 @@ p Testing this_actor->wait_any() ! output sort 19 -$ ${bindir:=.}/s4u-async-waitany ${platfdir}/small_platform.xml s4u-async-waitany_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/s4u-comm-waitany ${platfdir}/small_platform.xml s4u-comm-waitany_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) Send 'Message 0' to 'receiver-0' > [ 0.000000] (2:receiver@Fafard) Wait for my first message > [ 0.000000] (3:receiver@Jupiter) Wait for my first message diff --git a/examples/s4u/async-waitany/s4u-async-waitany_d.xml b/examples/s4u/comm-waitany/s4u-comm-waitany_d.xml similarity index 100% rename from examples/s4u/async-waitany/s4u-async-waitany_d.xml rename to examples/s4u/comm-waitany/s4u-comm-waitany_d.xml diff --git a/examples/s4u/async-waituntil/s4u-async-waituntil.cpp b/examples/s4u/comm-waituntil/s4u-comm-waituntil.cpp similarity index 79% rename from examples/s4u/async-waituntil/s4u-async-waituntil.cpp rename to examples/s4u/comm-waituntil/s4u-comm-waituntil.cpp index d63273f8ae..cfccd3195a 100644 --- a/examples/s4u/async-waituntil/s4u-async-waituntil.cpp +++ b/examples/s4u/comm-waituntil/s4u-comm-waituntil.cpp @@ -6,7 +6,7 @@ /* This example shows how to use simgrid::s4u::Activity::wait_until() and * simgrid::s4u::Activity::wait_for() on a given communication. * - * It is very similar to the async-wait example, but the sender initially + * It is very similar to the comm-wait example, but the sender initially * does some waits that are too short before doing an infinite wait. */ @@ -15,7 +15,7 @@ #include #include -XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_async_waituntil, "Messages specific for this s4u example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_comm_waituntil, "Messages specific for this s4u example"); static void sender(int argc, char** argv) { @@ -28,10 +28,10 @@ static void sender(int argc, char** argv) /* Start dispatching all messages to receivers, in a round robin fashion */ for (int i = 0; i < messages_count; i++) { - std::string mboxName = std::string("receiver-") + std::to_string(i % receivers_count); - simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(mboxName); - std::string msgName = std::string("Message ") + std::to_string(i); - std::string* payload = new std::string(msgName); // copy the data we send: + std::string mboxName = std::string("receiver-") + std::to_string(i % receivers_count); + simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(mboxName); + std::string msgName = std::string("Message ") + std::to_string(i); + std::string* payload = new std::string(msgName); // copy the data we send: // 'msgName' is not a stable storage location XBT_INFO("Send '%s' to '%s'", msgName.c_str(), mboxName.c_str()); @@ -43,9 +43,9 @@ static void sender(int argc, char** argv) /* Start sending messages to let the workers know that they should stop */ for (int i = 0; i < receivers_count; i++) { - std::string mboxName = std::string("receiver-") + std::to_string(i % receivers_count); - simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(mboxName); - std::string* payload = new std::string("finalize"); // Make a copy of the data we will send + std::string mboxName = std::string("receiver-") + std::to_string(i % receivers_count); + simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(mboxName); + std::string* payload = new std::string("finalize"); // Make a copy of the data we will send simgrid::s4u::CommPtr comm = mbox->put_async(payload, 0); pending_comms.push_back(comm); diff --git a/examples/s4u/async-waituntil/s4u-async-waituntil.tesh b/examples/s4u/comm-waituntil/s4u-comm-waituntil.tesh similarity index 77% rename from examples/s4u/async-waituntil/s4u-async-waituntil.tesh rename to examples/s4u/comm-waituntil/s4u-comm-waituntil.tesh index c3f2bc508c..e5c43f7b44 100644 --- a/examples/s4u/async-waituntil/s4u-async-waituntil.tesh +++ b/examples/s4u/comm-waituntil/s4u-comm-waituntil.tesh @@ -2,7 +2,7 @@ p Test1 Sleep_sender > Sleep_receiver -$ ${bindir:=.}/s4u-async-waituntil ${platfdir}/small_platform_fatpipe.xml s4u-async-waituntil_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/s4u-comm-waituntil ${platfdir}/small_platform_fatpipe.xml s4u-comm-waituntil_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (1:sender@Tremblay) Send 'Message 0' to 'receiver-0' > [ 0.000000] (2:receiver@Ruby) Wait for my first message > [ 0.000000] (1:sender@Tremblay) Send 'Message 1' to 'receiver-0' diff --git a/examples/s4u/async-waituntil/s4u-async-waituntil_d.xml b/examples/s4u/comm-waituntil/s4u-comm-waituntil_d.xml similarity index 100% rename from examples/s4u/async-waituntil/s4u-async-waituntil_d.xml rename to examples/s4u/comm-waituntil/s4u-comm-waituntil_d.xml