From: Martin Quinson Date: Sun, 10 Dec 2017 20:17:10 +0000 (+0100) Subject: rename the replay example as such X-Git-Tag: v3.18~56 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/05810984c0687e49bfb10d17cac13479bfb2c0d0 rename the replay example as such --- diff --git a/examples/s4u/CMakeLists.txt b/examples/s4u/CMakeLists.txt index 436667f16d..25846d76b2 100644 --- a/examples/s4u/CMakeLists.txt +++ b/examples/s4u/CMakeLists.txt @@ -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 - 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}) @@ -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) -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 @@ -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}/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) -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) -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 - 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 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 index 906c643b8b..0000000000 --- a/examples/s4u/actions-comm/s4u-actions-comm-split-p0.txt +++ /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 index 9fe20626f1..0000000000 --- a/examples/s4u/actions-comm/s4u-actions-comm-split-p1.txt +++ /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 diff --git a/examples/s4u/exec-remote/s4u-exec-remote.tesh b/examples/s4u/exec-remote/s4u-exec-remote.tesh index f66cbe109f..fd849b528a 100644 --- a/examples/s4u/exec-remote/s4u-exec-remote.tesh +++ b/examples/s4u/exec-remote/s4u-exec-remote.tesh @@ -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). +> [ 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! 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 index 0000000000..59b3293455 --- /dev/null +++ b/examples/s4u/replay-comm/s4u-replay-comm-split-p0.txt @@ -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 index 0000000000..89b2219706 --- /dev/null +++ b/examples/s4u/replay-comm/s4u-replay-comm-split-p1.txt @@ -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 diff --git a/examples/s4u/actions-comm/s4u-actions-comm-split_d.xml b/examples/s4u/replay-comm/s4u-replay-comm-split_d.xml similarity index 65% rename from examples/s4u/actions-comm/s4u-actions-comm-split_d.xml rename to examples/s4u/replay-comm/s4u-replay-comm-split_d.xml index 993a803103..acc67cc0bc 100644 --- a/examples/s4u/actions-comm/s4u-actions-comm-split_d.xml +++ b/examples/s4u/replay-comm/s4u-replay-comm-split_d.xml @@ -3,12 +3,12 @@ + ./s4u-replay-comm ../../platforms/platform.xml actions-comm-split_d.xml --> - + - + diff --git a/examples/s4u/actions-comm/s4u-actions-comm.cpp b/examples/s4u/replay-comm/s4u-replay-comm.cpp similarity index 76% rename from examples/s4u/actions-comm/s4u-actions-comm.cpp rename to examples/s4u/replay-comm/s4u-replay-comm.cpp index 5a1faacf53..5d5b515a4c 100644 --- a/examples/s4u/actions-comm/s4u-actions-comm.cpp +++ b/examples/s4u/replay-comm/s4u-replay-comm.cpp @@ -8,19 +8,20 @@ #include "xbt/str.h" #include -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)) { + char* name = xbt_str_join_array(action, " "); XBT_VERB("%s %f", name, date); xbt_free(name); } @@ -83,7 +84,7 @@ public: } }; -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { simgrid::s4u::Engine e(&argc, argv); diff --git a/examples/s4u/actions-comm/s4u-actions-comm.tesh b/examples/s4u/replay-comm/s4u-replay-comm.tesh similarity index 50% rename from examples/s4u/actions-comm/s4u-actions-comm.tesh rename to examples/s4u/replay-comm/s4u-replay-comm.tesh index 58cc6254dd..6409afa6fa 100644 --- a/examples/s4u/actions-comm/s4u-actions-comm.tesh +++ b/examples/s4u/replay-comm/s4u-replay-comm.tesh @@ -1,12 +1,14 @@ ! 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 -$ ${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 diff --git a/examples/s4u/actions-comm/s4u-actions-comm.txt b/examples/s4u/replay-comm/s4u-replay-comm.txt similarity index 100% rename from examples/s4u/actions-comm/s4u-actions-comm.txt rename to examples/s4u/replay-comm/s4u-replay-comm.txt diff --git a/examples/s4u/actions-comm/s4u-actions-comm_d.xml b/examples/s4u/replay-comm/s4u-replay-comm_d.xml similarity index 100% rename from examples/s4u/actions-comm/s4u-actions-comm_d.xml rename to examples/s4u/replay-comm/s4u-replay-comm_d.xml diff --git a/examples/s4u/actions-storage/s4u-actions-storage.cpp b/examples/s4u/replay-storage/s4u-replay-storage.cpp similarity index 93% rename from examples/s4u/actions-storage/s4u-actions-storage.cpp rename to examples/s4u/replay-storage/s4u-replay-storage.cpp index fde216ebe7..8d84d0a17c 100644 --- a/examples/s4u/actions-storage/s4u-actions-storage.cpp +++ b/examples/s4u/replay-storage/s4u-replay-storage.cpp @@ -10,12 +10,12 @@ #include #include -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 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); \ @@ -24,7 +24,7 @@ static std::unordered_map opened_files; 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); diff --git a/examples/s4u/actions-storage/s4u-actions-storage.tesh b/examples/s4u/replay-storage/s4u-replay-storage.tesh similarity index 60% rename from examples/s4u/actions-storage/s4u-actions-storage.tesh rename to examples/s4u/replay-storage/s4u-replay-storage.tesh index ba5b8bc0dd..de046436e4 100644 --- a/examples/s4u/actions-storage/s4u-actions-storage.tesh +++ b/examples/s4u/replay-storage/s4u-replay-storage.tesh @@ -1,5 +1,5 @@ ! 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 diff --git a/examples/s4u/actions-storage/s4u-actions-storage.txt b/examples/s4u/replay-storage/s4u-replay-storage.txt similarity index 100% rename from examples/s4u/actions-storage/s4u-actions-storage.txt rename to examples/s4u/replay-storage/s4u-replay-storage.txt diff --git a/examples/s4u/actions-storage/s4u-actions-storage_d.xml b/examples/s4u/replay-storage/s4u-replay-storage_d.xml similarity index 100% rename from examples/s4u/actions-storage/s4u-actions-storage_d.xml rename to examples/s4u/replay-storage/s4u-replay-storage_d.xml