Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename the replay example as such
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 10 Dec 2017 20:17:10 +0000 (21:17 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 10 Dec 2017 20:19:02 +0000 (21:19 +0100)
15 files changed:
examples/s4u/CMakeLists.txt
examples/s4u/actions-comm/s4u-actions-comm-split-p0.txt [deleted file]
examples/s4u/actions-comm/s4u-actions-comm-split-p1.txt [deleted file]
examples/s4u/exec-remote/s4u-exec-remote.tesh
examples/s4u/replay-comm/s4u-replay-comm-split-p0.txt [new file with mode: 0644]
examples/s4u/replay-comm/s4u-replay-comm-split-p1.txt [new file with mode: 0644]
examples/s4u/replay-comm/s4u-replay-comm-split_d.xml [moved from examples/s4u/actions-comm/s4u-actions-comm-split_d.xml with 65% similarity]
examples/s4u/replay-comm/s4u-replay-comm.cpp [moved from examples/s4u/actions-comm/s4u-actions-comm.cpp with 76% similarity]
examples/s4u/replay-comm/s4u-replay-comm.tesh [moved from examples/s4u/actions-comm/s4u-actions-comm.tesh with 50% similarity]
examples/s4u/replay-comm/s4u-replay-comm.txt [moved from examples/s4u/actions-comm/s4u-actions-comm.txt with 100% similarity]
examples/s4u/replay-comm/s4u-replay-comm_d.xml [moved from examples/s4u/actions-comm/s4u-actions-comm_d.xml with 100% similarity]
examples/s4u/replay-storage/s4u-replay-storage.cpp [moved from examples/s4u/actions-storage/s4u-actions-storage.cpp with 93% similarity]
examples/s4u/replay-storage/s4u-replay-storage.tesh [moved from examples/s4u/actions-storage/s4u-actions-storage.tesh with 60% similarity]
examples/s4u/replay-storage/s4u-replay-storage.txt [moved from examples/s4u/actions-storage/s4u-actions-storage.txt with 100% similarity]
examples/s4u/replay-storage/s4u-replay-storage_d.xml [moved from examples/s4u/actions-storage/s4u-actions-storage_d.xml with 100% similarity]

index 436667f..25846d7 100644 (file)
@@ -1,11 +1,12 @@
-foreach (example actions-comm actions-storage 
-                 actor-create actor-daemon actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-yield
+foreach (example actor-create actor-daemon actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-yield
                  app-masterworker app-pingpong app-token-ring
                  async-wait async-waitany async-waitall
                  energy-link energy-pstate energy-ptask energy-vm
                  exec-async exec-basic exec-monitor exec-remote
                  io-file-system io-file-remote io-storage-raw
                  app-masterworker app-pingpong app-token-ring
                  async-wait async-waitany async-waitall
                  energy-link energy-pstate energy-ptask energy-vm
                  exec-async exec-basic exec-monitor exec-remote
                  io-file-system io-file-remote io-storage-raw
-                 platform-properties plugin-hostload mutex)
+                mutex
+                 platform-properties plugin-hostload 
+                replay-comm replay-storage)
   add_executable       (s4u-${example}  ${example}/s4u-${example}.cpp)
   target_link_libraries(s4u-${example}  simgrid)
   set_target_properties(s4u-${example}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${example})
   add_executable       (s4u-${example}  ${example}/s4u-${example}.cpp)
   target_link_libraries(s4u-${example}  simgrid)
   set_target_properties(s4u-${example}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${example})
@@ -43,10 +44,7 @@ set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u
                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/s4u-async-waitall.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/exec-basic/s4u-exec-basic.tesh
                   PARENT_SCOPE)
                                   ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/s4u-async-waitall.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/exec-basic/s4u-exec-basic.tesh
                   PARENT_SCOPE)
-set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/s4u-actions-comm-split_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/s4u-actions-comm_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actions-storage/s4u-actions-storage_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-actor-create_d.xml
+set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-actor-create_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-lifetime/s4u-actor-lifetime_d.xml
                                   ${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}/actor-lifetime/s4u-actor-lifetime_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/s4u-actor-yield_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/app-bittorrent/s4u-app-bittorrent_d.xml
@@ -57,22 +55,25 @@ set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/s4u-a
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/s4u-io-file-remote_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/s4u-platform-properties_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/dht-chord/s4u-dht-chord_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/s4u-io-file-remote_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/s4u-platform-properties_d.xml
+                                 ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split_d.xml
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm_d.xml
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/replay-storage/s4u-replay-storage_d.xml
                  PARENT_SCOPE)
                  PARENT_SCOPE)
-set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/s4u-actions-comm-split-p0.txt
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/s4u-actions-comm-split-p1.txt
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actions-comm/s4u-actions-comm.txt
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/actions-storage/s4u-actions-storage.txt
+set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p1.txt
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm.txt
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/replay-storage/s4u-replay-storage.txt
                                   ${CMAKE_CURRENT_SOURCE_DIR}/README.doc                                   PARENT_SCOPE)
 
                                   ${CMAKE_CURRENT_SOURCE_DIR}/README.doc                                   PARENT_SCOPE)
 
-foreach(example actions-comm actions-storage 
-                actor-create actor-daemon actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-yield
+foreach(example actor-create actor-daemon actor-join actor-kill actor-lifetime actor-migration actor-suspend actor-yield
                 app-bittorrent app-masterworker app-pingpong app-token-ring 
                 async-wait async-waitall async-waitany
                 dht-chord 
                 energy-link energy-pstate energy-ptask energy-vm
                 exec-async exec-basic exec-monitor exec-remote
                 platform-properties plugin-hostload mutex
                 app-bittorrent app-masterworker app-pingpong app-token-ring 
                 async-wait async-waitall async-waitany
                 dht-chord 
                 energy-link energy-pstate energy-ptask energy-vm
                 exec-async exec-basic exec-monitor exec-remote
                 platform-properties plugin-hostload mutex
-                io-file-system io-file-remote io-storage-raw)
+                io-file-system io-file-remote io-storage-raw
+               replay-comm replay-storage)
   ADD_TESH_FACTORIES(s4u-${example} "thread;ucontext;raw;boost" 
                                     --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} 
                                    --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
   ADD_TESH_FACTORIES(s4u-${example} "thread;ucontext;raw;boost" 
                                     --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} 
                                    --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
diff --git a/examples/s4u/actions-comm/s4u-actions-comm-split-p0.txt b/examples/s4u/actions-comm/s4u-actions-comm-split-p0.txt
deleted file mode 100644 (file)
index 906c643..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# sample action file (with only the actions for p0, to be launched by deployment file)
-p0 recv p1
-p0 compute 1e9
-
diff --git a/examples/s4u/actions-comm/s4u-actions-comm-split-p1.txt b/examples/s4u/actions-comm/s4u-actions-comm-split-p1.txt
deleted file mode 100644 (file)
index 9fe2062..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# sample action file (with only the actions for p1, to be launched by deployment file)
-p1 send p0 1e10
-p1 compute 1e9
index f66cbe1..fd849b5 100644 (file)
@@ -4,4 +4,5 @@
 $ $SG_TEST_EXENV ${bindir:=.}/s4u-exec-remote$EXEEXT ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (1:test@Fafard) I'm a wizard! I can run a task on the Fafard host from the Ginette one! Look!
 > [  0.000000] (1:test@Fafard) It started. Running 48.492Mf takes exactly one second on Ginette (but not on Fafard).
 $ $SG_TEST_EXENV ${bindir:=.}/s4u-exec-remote$EXEEXT ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [  0.000000] (1:test@Fafard) I'm a wizard! I can run a task on the Fafard host from the Ginette one! Look!
 > [  0.000000] (1:test@Fafard) It started. Running 48.492Mf takes exactly one second on Ginette (but not on Fafard).
+> [  0.100000] (1:test@Fafard) Load on Fafard: 0.000000e+00 flops/s; Load on Ginette: 4.849200e+07 flops/s.
 > [  1.000000] (1:test@Fafard) Done!
 > [  1.000000] (1:test@Fafard) Done!
diff --git a/examples/s4u/replay-comm/s4u-replay-comm-split-p0.txt b/examples/s4u/replay-comm/s4u-replay-comm-split-p0.txt
new file mode 100644 (file)
index 0000000..59b3293
--- /dev/null
@@ -0,0 +1,4 @@
+# sample replay file (with only the actions for p0, to be launched by deployment file)
+p0 recv p1
+p0 compute 1e9
+
diff --git a/examples/s4u/replay-comm/s4u-replay-comm-split-p1.txt b/examples/s4u/replay-comm/s4u-replay-comm-split-p1.txt
new file mode 100644 (file)
index 0000000..89b2219
--- /dev/null
@@ -0,0 +1,3 @@
+# sample replay file (with only the actions for p1, to be launched by deployment file)
+p1 send p0 1e10
+p1 compute 1e9
@@ -3,12 +3,12 @@
 <platform version="4.1">
 <!-- Example file of how to use trace replay, with actions split in separate files, one per actor.
      Launch it like this:
 <platform version="4.1">
 <!-- Example file of how to use trace replay, with actions split in separate files, one per actor.
      Launch it like this:
-         ./actions-comm ../../platforms/platform.xml actions-comm-split_d.xml  -->
+         ./s4u-replay-comm ../../platforms/platform.xml actions-comm-split_d.xml  -->
 
   <actor host="Tremblay" function="p0">
 
   <actor host="Tremblay" function="p0">
-    <argument value="s4u-actions-comm-split-p0.txt"/>
+    <argument value="s4u-replay-comm-split-p0.txt"/>
   </actor>
   <actor host="Ruby"     function="p1">
   </actor>
   <actor host="Ruby"     function="p1">
-    <argument value="s4u-actions-comm-split-p1.txt"/>
+    <argument value="s4u-replay-comm-split-p1.txt"/>
   </actor>
 </platform>
   </actor>
 </platform>
@@ -8,19 +8,20 @@
 #include "xbt/str.h"
 #include <string>
 
 #include "xbt/str.h"
 #include <string>
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(actions, "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(replay, "Messages specific for this msg example");
 
 
-#define ACT_DEBUG(...) \
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) {  \
-    char *NAME = xbt_str_join_array(action, " ");              \
-    XBT_DEBUG(__VA_ARGS__);                                    \
-    xbt_free(NAME);                                            \
-  } else ((void)0)
+#define ACT_DEBUG(...)                                                                                                 \
+  if (XBT_LOG_ISENABLED(replay, xbt_log_priority_verbose)) {                                                           \
+    char* NAME = xbt_str_join_array(action, " ");                                                                      \
+    XBT_DEBUG(__VA_ARGS__);                                                                                            \
+    xbt_free(NAME);                                                                                                    \
+  } else                                                                                                               \
+  ((void)0)
 
 
-static void log_action(const char *const *action, double date)
+static void log_action(const char* const* action, double date)
 {
 {
-  if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) {
-    char *name = xbt_str_join_array(action, " ");
+  if (XBT_LOG_ISENABLED(replay, xbt_log_priority_verbose)) {
+    charname = xbt_str_join_array(action, " ");
     XBT_VERB("%s %f", name, date);
     xbt_free(name);
   }
     XBT_VERB("%s %f", name, date);
     xbt_free(name);
   }
@@ -83,7 +84,7 @@ public:
   }
 };
 
   }
 };
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
 
 {
   simgrid::s4u::Engine e(&argc, argv);
 
@@ -1,12 +1,14 @@
 ! output sort 19
 ! output sort 19
-$ ${bindir:=.}/s4u-actions-comm --log=actions.thres=verbose ${platfdir}/small_platform_fatpipe.xml s4u-actions-comm-split_d.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
+$ ${bindir:=.}/s4u-replay-comm --log=replay.thres=verbose ${platfdir}/small_platform_fatpipe.xml s4u-replay-comm-split_d.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
+> [  0.000000] (p0@Tremblay) Prepare to replay file 's4u-replay-comm-split-p0.txt'
+> [  0.000000] (p1@Ruby) Prepare to replay file 's4u-replay-comm-split-p1.txt'
 > [ 20.703314] (p0@Tremblay) p0 recv p1 20.703314
 > [ 20.703314] (p1@Ruby) p1 send p0 1e10 20.703314
 > [ 30.897513] (p0@Tremblay) p0 compute 1e9 10.194200
 > [ 30.897513] (p1@Ruby) p1 compute 1e9 10.194200
 > [ 30.897513] (maestro@) Simulation time 30.8975
 
 > [ 20.703314] (p0@Tremblay) p0 recv p1 20.703314
 > [ 20.703314] (p1@Ruby) p1 send p0 1e10 20.703314
 > [ 30.897513] (p0@Tremblay) p0 compute 1e9 10.194200
 > [ 30.897513] (p1@Ruby) p1 compute 1e9 10.194200
 > [ 30.897513] (maestro@) Simulation time 30.8975
 
-$ ${bindir:=.}/s4u-actions-comm --log=actions.thres=verbose ${platfdir}/small_platform_fatpipe.xml s4u-actions-comm_d.xml s4u-actions-comm.txt "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
+$ ${bindir:=.}/s4u-replay-comm --log=replay.thres=verbose ${platfdir}/small_platform_fatpipe.xml s4u-replay-comm_d.xml s4u-replay-comm.txt "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
 > [ 20.703314] (p0@Tremblay) p0 recv p1 20.703314
 > [ 20.703314] (p1@Ruby) p1 send p0 1e10 20.703314
 > [ 30.897513] (p0@Tremblay) p0 compute 1e9 10.194200
 > [ 20.703314] (p0@Tremblay) p0 recv p1 20.703314
 > [ 20.703314] (p1@Ruby) p1 send p0 1e10 20.703314
 > [ 30.897513] (p0@Tremblay) p0 compute 1e9 10.194200
 #include <xbt/replay.hpp>
 #include <xbt/str.h>
 
 #include <xbt/replay.hpp>
 #include <xbt/str.h>
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(storage_actions, "Messages specific for this example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(storage_replay, "Messages specific for this example");
 
 static std::unordered_map<std::string, simgrid::s4u::File*> opened_files;
 
 #define ACT_DEBUG(...)                                                                                                 \
 
 static std::unordered_map<std::string, simgrid::s4u::File*> opened_files;
 
 #define ACT_DEBUG(...)                                                                                                 \
-  if (XBT_LOG_ISENABLED(storage_actions, xbt_log_priority_verbose)) {                                                  \
+  if (XBT_LOG_ISENABLED(storage_replay, xbt_log_priority_verbose)) {                                                   \
     char* NAME = xbt_str_join_array(action, " ");                                                                      \
     XBT_DEBUG(__VA_ARGS__);                                                                                            \
     xbt_free(NAME);                                                                                                    \
     char* NAME = xbt_str_join_array(action, " ");                                                                      \
     XBT_DEBUG(__VA_ARGS__);                                                                                            \
     xbt_free(NAME);                                                                                                    \
@@ -24,7 +24,7 @@ static std::unordered_map<std::string, simgrid::s4u::File*> opened_files;
 
 static void log_action(const char* const* action, double date)
 {
 
 static void log_action(const char* const* action, double date)
 {
-  if (XBT_LOG_ISENABLED(storage_actions, xbt_log_priority_verbose)) {
+  if (XBT_LOG_ISENABLED(storage_replay, xbt_log_priority_verbose)) {
     char* name = xbt_str_join_array(action, " ");
     XBT_VERB("%s %f", name, date);
     xbt_free(name);
     char* name = xbt_str_join_array(action, " ");
     XBT_VERB("%s %f", name, date);
     xbt_free(name);
@@ -1,5 +1,5 @@
 ! output sort 19
 ! output sort 19
-$ ${bindir:=.}/s4u-actions-storage --log=storage_actions.thres=verbose ${platfdir}/storage/storage.xml s4u-actions-storage_d.xml s4u-actions-storage.txt "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
+$ ${bindir:=.}/s4u-replay-storage --log=storage_replay.thres=verbose ${platfdir}/storage/storage.xml s4u-replay-storage_d.xml s4u-replay-storage.txt "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
 > [  0.000000] (p0@denise) p0 open /home/lib/libsimgrid.so.3.6.2 0.000000
 > [  0.063552] (p0@denise) p0 read /home/lib/libsimgrid.so.3.6.2 12710497 0.063552
 > [  0.063552] (p0@denise) p0 close /home/lib/libsimgrid.so.3.6.2 0.000000
 > [  0.000000] (p0@denise) p0 open /home/lib/libsimgrid.so.3.6.2 0.000000
 > [  0.063552] (p0@denise) p0 read /home/lib/libsimgrid.so.3.6.2 12710497 0.063552
 > [  0.063552] (p0@denise) p0 close /home/lib/libsimgrid.so.3.6.2 0.000000