Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename the async-* tests into comm-*
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 6 Jul 2020 14:32:42 +0000 (16:32 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 6 Jul 2020 14:51:25 +0000 (16:51 +0200)
40 files changed:
examples/README.rst
examples/c/CMakeLists.txt
examples/c/comm-wait/comm-wait.c [moved from examples/c/async-wait/async-wait.c with 98% similarity]
examples/c/comm-wait/comm-wait.tesh [moved from examples/c/async-wait/async-wait.tesh with 84% similarity]
examples/c/comm-wait/comm-wait2_d.xml [moved from examples/c/async-wait/async-wait2_d.xml with 100% similarity]
examples/c/comm-wait/comm-wait3_d.xml [moved from examples/c/async-wait/async-wait3_d.xml with 100% similarity]
examples/c/comm-wait/comm-wait4_d.xml [moved from examples/c/async-wait/async-wait4_d.xml with 100% similarity]
examples/c/comm-wait/comm-wait_d.xml [moved from examples/c/async-wait/async-wait_d.xml with 100% similarity]
examples/c/comm-waitall/comm-waitall.c [moved from examples/c/async-waitall/async-waitall.c with 97% similarity]
examples/c/comm-waitall/comm-waitall.tesh [moved from examples/c/async-waitall/async-waitall.tesh with 88% similarity]
examples/c/comm-waitall/comm-waitall_d.xml [moved from examples/c/async-waitall/async-waitall_d.xml with 100% similarity]
examples/c/comm-waitany/comm-waitany.c [moved from examples/c/async-waitany/async-waitany.c with 98% similarity]
examples/c/comm-waitany/comm-waitany.tesh [moved from examples/c/async-waitany/async-waitany.tesh with 88% similarity]
examples/c/comm-waitany/comm-waitany_d.xml [moved from examples/c/async-waitany/async-waitany_d.xml with 100% similarity]
examples/python/CMakeLists.txt
examples/python/comm-wait/comm-wait.py [moved from examples/python/async-wait/async-wait.py with 100% similarity]
examples/python/comm-wait/comm-wait.tesh [moved from examples/python/async-wait/async-wait.tesh with 80% similarity]
examples/python/comm-wait/comm-wait_d.xml [moved from examples/python/async-wait/async-wait_d.xml with 100% similarity]
examples/python/comm-waitall/comm-waitall.py [moved from examples/python/async-waitall/async-waitall.py with 100% similarity]
examples/python/comm-waitall/comm-waitall.tesh [moved from examples/python/async-waitall/async-waitall.tesh with 86% similarity]
examples/python/comm-waitall/comm-waitall_d.xml [moved from examples/python/async-waitall/async-waitall_d.xml with 100% similarity]
examples/python/comm-waitany/comm-waitany.py [moved from examples/python/async-waitany/async-waitany.py with 100% similarity]
examples/python/comm-waitany/comm-waitany.tesh [moved from examples/python/async-waitany/async-waitany.tesh with 89% similarity]
examples/python/comm-waitany/comm-waitany_d.xml [moved from examples/python/async-waitany/async-waitany_d.xml with 100% similarity]
examples/s4u/CMakeLists.txt
examples/s4u/comm-ready/s4u-comm-ready.cpp [moved from examples/s4u/async-ready/s4u-async-ready.cpp with 77% similarity]
examples/s4u/comm-ready/s4u-comm-ready.tesh [moved from examples/s4u/async-ready/s4u-async-ready.tesh with 97% similarity]
examples/s4u/comm-ready/s4u-comm-ready_d.xml [moved from examples/s4u/async-ready/s4u-async-ready_d.xml with 100% similarity]
examples/s4u/comm-wait/s4u-comm-wait.cpp [moved from examples/s4u/async-wait/s4u-async-wait.cpp with 96% similarity]
examples/s4u/comm-wait/s4u-comm-wait.tesh [moved from examples/s4u/async-wait/s4u-async-wait.tesh with 85% similarity]
examples/s4u/comm-wait/s4u-comm-wait_d.xml [moved from examples/s4u/async-wait/s4u-async-wait_d.xml with 100% similarity]
examples/s4u/comm-waitall/s4u-comm-waitall.cpp [moved from examples/s4u/async-waitall/s4u-async-waitall.cpp with 99% similarity]
examples/s4u/comm-waitall/s4u-comm-waitall.tesh [moved from examples/s4u/async-waitall/s4u-async-waitall.tesh with 88% similarity]
examples/s4u/comm-waitall/s4u-comm-waitall_d.xml [moved from examples/s4u/async-waitall/s4u-async-waitall_d.xml with 100% similarity]
examples/s4u/comm-waitany/s4u-comm-waitany.cpp [moved from examples/s4u/async-waitany/s4u-async-waitany.cpp with 97% similarity]
examples/s4u/comm-waitany/s4u-comm-waitany.tesh [moved from examples/s4u/async-waitany/s4u-async-waitany.tesh with 91% similarity]
examples/s4u/comm-waitany/s4u-comm-waitany_d.xml [moved from examples/s4u/async-waitany/s4u-async-waitany_d.xml with 100% similarity]
examples/s4u/comm-waituntil/s4u-comm-waituntil.cpp [moved from examples/s4u/async-waituntil/s4u-async-waituntil.cpp with 79% similarity]
examples/s4u/comm-waituntil/s4u-comm-waituntil.tesh [moved from examples/s4u/async-waituntil/s4u-async-waituntil.tesh with 77% similarity]
examples/s4u/comm-waituntil/s4u-comm-waituntil_d.xml [moved from examples/s4u/async-waituntil/s4u-async-waituntil_d.xml with 100% similarity]

index 0ae9e50..3ac1648 100644 (file)
@@ -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`.
      
index 34168e5..ff0d3a4 100644 (file)
@@ -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
similarity index 98%
rename from examples/c/async-wait/async-wait.c
rename to examples/c/comm-wait/comm-wait.c
index 64ba4ef..6119863 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <stdio.h>
 
-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[])
similarity index 84%
rename from examples/c/async-wait/async-wait.tesh
rename to examples/c/comm-wait/comm-wait.tesh
index 72cc48a..9307cd9 100644 (file)
@@ -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'
similarity index 97%
rename from examples/c/async-waitall/async-waitall.c
rename to examples/c/comm-waitall/comm-waitall.c
index f0755cf..1992205 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <stdio.h> /* 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[])
 {
similarity index 88%
rename from examples/c/async-waitall/async-waitall.tesh
rename to examples/c/comm-waitall/comm-waitall.tesh
index ce51d6d..326f543 100644 (file)
@@ -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
similarity index 98%
rename from examples/c/async-waitany/async-waitany.c
rename to examples/c/comm-waitany/comm-waitany.c
index 14a0767..248a219 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <stdio.h> /* 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[])
 {
similarity index 88%
rename from examples/c/async-waitany/async-waitany.tesh
rename to examples/c/comm-waitany/comm-waitany.tesh
index 9ecd947..3d19ecd 100644 (file)
@@ -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'
index a62c35e..fa32133 100644 (file)
@@ -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)
similarity index 80%
rename from examples/python/async-wait/async-wait.tesh
rename to examples/python/comm-wait/comm-wait.tesh
index d95c005..7d7670f 100644 (file)
@@ -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)'
@@ -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
@@ -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
index fb66719..5961f08 100644 (file)
@@ -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
similarity index 77%
rename from examples/s4u/async-ready/s4u-async-ready.cpp
rename to examples/s4u/comm-ready/s4u-comm-ready.cpp
index 68f1242..88cfbda 100644 (file)
@@ -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<std::string*>(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]);
 
similarity index 97%
rename from examples/s4u/async-ready/s4u-async-ready.tesh
rename to examples/s4u/comm-ready/s4u-comm-ready.tesh
index 9b6d9a8..96902d9 100644 (file)
@@ -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'
similarity index 96%
rename from examples/s4u/async-wait/s4u-async-wait.cpp
rename to examples/s4u/comm-wait/s4u-comm-wait.cpp
index 37d6058..4e7ee1a 100644 (file)
@@ -16,7 +16,7 @@
 #include <iostream>
 #include <string>
 
-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, charargv[])
 {
   xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]);
 
similarity index 85%
rename from examples/s4u/async-wait/s4u-async-wait.tesh
rename to examples/s4u/comm-wait/s4u-comm-wait.tesh
index 83b5859..d78bf49 100644 (file)
@@ -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
@@ -98,7 +98,7 @@ public:
   }
 };
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
   xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]);
 
@@ -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
@@ -22,7 +22,7 @@
 #include <iostream>
 #include <string>
 
-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, charargv[])
 {
   xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n", argv[0]);
 
@@ -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
@@ -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 <iostream>
 #include <string>
 
-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);
@@ -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'