-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})
${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}/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
+++ /dev/null
-# sample action file (with only the actions for p0, to be launched by deployment file)
-p0 recv p1
-p0 compute 1e9
-
+++ /dev/null
-# sample action file (with only the actions for p1, to be launched by deployment file)
-p1 send p0 1e10
-p1 compute 1e9
$ $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!
--- /dev/null
+# sample replay file (with only the actions for p0, to be launched by deployment file)
+p0 recv p1
+p0 compute 1e9
+
--- /dev/null
+# sample replay file (with only the actions for p1, to be launched by deployment file)
+p1 send p0 1e10
+p1 compute 1e9
<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">
- <argument value="s4u-actions-comm-split-p0.txt"/>
+ <argument value="s4u-replay-comm-split-p0.txt"/>
</actor>
<actor host="Ruby" function="p1">
- <argument value="s4u-actions-comm-split-p1.txt"/>
+ <argument value="s4u-replay-comm-split-p1.txt"/>
</actor>
</platform>
#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)) {
+ char* name = xbt_str_join_array(action, " ");
XBT_VERB("%s %f", name, date);
xbt_free(name);
}
}
};
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
{
simgrid::s4u::Engine e(&argc, argv);
! 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
#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(...) \
- 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); \
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);
! 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