Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
replay-storage becomes replay-io ... with disks
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 16 Sep 2019 14:05:13 +0000 (16:05 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 16 Sep 2019 14:05:13 +0000 (16:05 +0200)
MANIFEST.in
examples/s4u/CMakeLists.txt
examples/s4u/replay-io/s4u-replay-io.cpp [moved from examples/s4u/replay-storage/s4u-replay-storage.cpp with 85% similarity]
examples/s4u/replay-io/s4u-replay-io.tesh [new file with mode: 0644]
examples/s4u/replay-io/s4u-replay-io.txt [new file with mode: 0644]
examples/s4u/replay-io/s4u-replay-io_d.xml [moved from examples/s4u/replay-storage/s4u-replay-storage_d.xml with 75% similarity]
examples/s4u/replay-storage/s4u-replay-storage.tesh [deleted file]
examples/s4u/replay-storage/s4u-replay-storage.txt [deleted file]

index 29d9cef..36cce7e 100644 (file)
@@ -405,10 +405,10 @@ include examples/s4u/replay-comm/s4u-replay-comm.cpp
 include examples/s4u/replay-comm/s4u-replay-comm.tesh
 include examples/s4u/replay-comm/s4u-replay-comm.txt
 include examples/s4u/replay-comm/s4u-replay-comm_d.xml
 include examples/s4u/replay-comm/s4u-replay-comm.tesh
 include examples/s4u/replay-comm/s4u-replay-comm.txt
 include examples/s4u/replay-comm/s4u-replay-comm_d.xml
-include examples/s4u/replay-storage/s4u-replay-storage.cpp
-include examples/s4u/replay-storage/s4u-replay-storage.tesh
+include examples/s4u/replay-io/s4u-replay-io.cpp
+include examples/s4u/replay-io/s4u-replay-io.tesh
+include examples/s4u/replay-io/s4u-replay-io_d.xml
 include examples/s4u/replay-storage/s4u-replay-storage.txt
 include examples/s4u/replay-storage/s4u-replay-storage.txt
-include examples/s4u/replay-storage/s4u-replay-storage_d.xml
 include examples/s4u/routing-get-clusters/s4u-routing-get-clusters.cpp
 include examples/s4u/routing-get-clusters/s4u-routing-get-clusters.tesh
 include examples/s4u/synchro-barrier/s4u-synchro-barrier.cpp
 include examples/s4u/routing-get-clusters/s4u-routing-get-clusters.cpp
 include examples/s4u/routing-get-clusters/s4u-routing-get-clusters.tesh
 include examples/s4u/synchro-barrier/s4u-synchro-barrier.cpp
index 12a6e4c..48344c8 100644 (file)
@@ -13,7 +13,7 @@ foreach (example actor-create actor-daemon actor-exiting actor-join actor-kill
                  io-async io-file-system io-file-remote io-disk-raw
                  platform-failures platform-profile platform-properties
                  plugin-hostload
                  io-async io-file-system io-file-remote io-disk-raw
                  platform-failures platform-profile platform-properties
                  plugin-hostload
-                 replay-comm replay-storage
+                 replay-comm replay-io
                  routing-get-clusters
                  synchro-barrier synchro-mutex synchro-semaphore)
   add_executable       (s4u-${example} EXCLUDE_FROM_ALL ${example}/s4u-${example}.cpp)
                  routing-get-clusters
                  synchro-barrier synchro-mutex synchro-semaphore)
   add_executable       (s4u-${example} EXCLUDE_FROM_ALL ${example}/s4u-${example}.cpp)
@@ -181,7 +181,7 @@ set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-a
                                   ${CMAKE_CURRENT_SOURCE_DIR}/platform-failures/s4u-platform-failures_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}/platform-failures/s4u-platform-failures_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
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/replay-io/s4u-replay-io_d.xml
                   PARENT_SCOPE)
 set(bin_files     ${bin_files}    ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py                     PARENT_SCOPE)
 set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt
                   PARENT_SCOPE)
 set(bin_files     ${bin_files}    ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py                     PARENT_SCOPE)
 set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt
 
 #include <boost/algorithm/string/join.hpp>
 
 
 #include <boost/algorithm/string/join.hpp>
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(replay_storage, "Messages specific for this example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(replay_io, "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(replay_storage, xbt_log_priority_verbose)) {                                                   \
+  if (XBT_LOG_ISENABLED(replay_io, xbt_log_priority_verbose)) {                                                        \
     std::string NAME = boost::algorithm::join(action, " ");                                                            \
     XBT_DEBUG(__VA_ARGS__);                                                                                            \
   } else                                                                                                               \
     std::string NAME = boost::algorithm::join(action, " ");                                                            \
     XBT_DEBUG(__VA_ARGS__);                                                                                            \
   } else                                                                                                               \
-  ((void)0)
+    ((void)0)
 
 static void log_action(simgrid::xbt::ReplayAction& action, double date)
 {
 
 static void log_action(simgrid::xbt::ReplayAction& action, double date)
 {
-  if (XBT_LOG_ISENABLED(replay_storage, xbt_log_priority_verbose)) {
+  if (XBT_LOG_ISENABLED(replay_io, xbt_log_priority_verbose)) {
     std::string s = boost::algorithm::join(action, " ");
     XBT_VERB("%s %f", s.c_str(), date);
   }
     std::string s = boost::algorithm::join(action, " ");
     XBT_VERB("%s %f", s.c_str(), date);
   }
@@ -97,10 +97,11 @@ int main(int argc, char* argv[])
   simgrid::s4u::Engine e(&argc, argv);
   sg_storage_file_system_init();
 
   simgrid::s4u::Engine e(&argc, argv);
   sg_storage_file_system_init();
 
-  xbt_assert(argc > 3, "Usage: %s platform_file deployment_file [action_files]\n"
-                       "\texample: %s platform.xml deployment.xml actions # if all actions are in the same file\n"
-                       "\t# if actions are in separate files, specified in deployment\n"
-                       "\texample: %s platform.xml deployment.xml",
+  xbt_assert(argc > 3,
+             "Usage: %s platform_file deployment_file [action_files]\n"
+             "\texample: %s platform.xml deployment.xml actions # if all actions are in the same file\n"
+             "\t# if actions are in separate files, specified in deployment\n"
+             "\texample: %s platform.xml deployment.xml",
              argv[0], argv[0], argv[0]);
 
   e.load_platform(argv[1]);
              argv[0], argv[0], argv[0]);
 
   e.load_platform(argv[1]);
diff --git a/examples/s4u/replay-io/s4u-replay-io.tesh b/examples/s4u/replay-io/s4u-replay-io.tesh
new file mode 100644 (file)
index 0000000..31b4f0e
--- /dev/null
@@ -0,0 +1,6 @@
+! output sort 19
+$ ${bindir:=.}/s4u-replay-io --log=replay_io.thres=verbose ${platfdir}/hosts_with_disks.xml s4u-replay-io_d.xml s4u-replay-io.txt "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
+> [  0.000000] (p0@alice) p0 open /lib/libsimgrid.so.3.6.2 0.000000
+> [  0.063552] (p0@alice) p0 read /lib/libsimgrid.so.3.6.2 12710497 0.063552
+> [  0.063552] (p0@alice) p0 close /lib/libsimgrid.so.3.6.2 0.000000
+> [  0.063552] (maestro@) Simulation time 0.0635525
diff --git a/examples/s4u/replay-io/s4u-replay-io.txt b/examples/s4u/replay-io/s4u-replay-io.txt
new file mode 100644 (file)
index 0000000..0748847
--- /dev/null
@@ -0,0 +1,3 @@
+p0 open /lib/libsimgrid.so.3.6.2
+p0 read /lib/libsimgrid.so.3.6.2 12710497
+p0 close /lib/libsimgrid.so.3.6.2
@@ -1,5 +1,5 @@
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 <platform version="4.1">
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
 <platform version="4.1">
-  <actor host="denise" function="p0"/>
+  <actor host="alice" function="p0"/>
 </platform>
 </platform>
diff --git a/examples/s4u/replay-storage/s4u-replay-storage.tesh b/examples/s4u/replay-storage/s4u-replay-storage.tesh
deleted file mode 100644 (file)
index a7a63a1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-! output sort 19
-$ ${bindir:=.}/s4u-replay-storage --log=replay_storage.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.063552] (maestro@) Simulation time 0.0635525
diff --git a/examples/s4u/replay-storage/s4u-replay-storage.txt b/examples/s4u/replay-storage/s4u-replay-storage.txt
deleted file mode 100644 (file)
index cc9142a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-p0 open /home/lib/libsimgrid.so.3.6.2  
-p0 read /home/lib/libsimgrid.so.3.6.2 12710497
-p0 close /home/lib/libsimgrid.so.3.6.2