From: Frederic Suter Date: Mon, 11 Dec 2017 14:41:38 +0000 (+0100) Subject: mv trace-platform from MSG to S4U X-Git-Tag: v3.18~49 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5b4afebffb0ca5c8c09c203c30c72242c8e9ad80 mv trace-platform from MSG to S4U the MSG version is not kept in the dungeon because: - the code does absolutely nothing - the tesh comprises a huge Pajé output for G5K --- diff --git a/.gitignore b/.gitignore index c3ef7ba5af..3b6b966eb0 100644 --- a/.gitignore +++ b/.gitignore @@ -165,7 +165,6 @@ examples/msg/trace-route-user-variables/trace-route-user-variables examples/msg/trace-link-user-variables/trace-link-user-variables examples/msg/trace-masterworker/trace-masterworker examples/msg/trace-process-migration/trace-process-migration -examples/msg/trace-platform/trace-platform examples/msg/trace-host-user-variables/trace-host-user-variables examples/msg/*.pcap examples/msg/*.tr @@ -201,6 +200,7 @@ examples/s4u/platform-properties/s4u-platform-properties examples/s4u/plugin-hostload/s4u-plugin-hostload examples/s4u/replay-comm/s4u-replay-comm examples/s4u/replay-storage/s4u-replay-storage +examples/s4u/trace-platform/s4u-trace-platform examples/simdag/daxload/sd_daxload examples/simdag/dag-dotload/sd_dag-dotload examples/simdag/ptg-dotload/sd_ptg-dotload diff --git a/examples/msg/CMakeLists.txt b/examples/msg/CMakeLists.txt index a0450a8f1a..e445ed4a4f 100644 --- a/examples/msg/CMakeLists.txt +++ b/examples/msg/CMakeLists.txt @@ -5,7 +5,7 @@ foreach(x app-masterworker app-token-ring plugin-hostload process-create synchro-semaphore trace-categories - trace-route-user-variables trace-link-user-variables trace-masterworker trace-platform + trace-route-user-variables trace-link-user-variables trace-masterworker trace-process-migration trace-host-user-variables) add_executable (${x} ${x}/${x}.c) target_link_libraries(${x} simgrid) @@ -84,7 +84,7 @@ foreach(x app-chainsend app-masterworker app-token-ring ${CMAKE_HOME_DIRECTORY}/examples/msg/${x}/${x}.tesh) endforeach() -foreach (x trace-categories trace-route-user-variables trace-link-user-variables trace-masterworker trace-platform trace-process-migration trace-host-user-variables) +foreach (x trace-categories trace-route-user-variables trace-link-user-variables trace-masterworker trace-process-migration trace-host-user-variables) ADD_TESH(msg-${x} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms diff --git a/examples/s4u/CMakeLists.txt b/examples/s4u/CMakeLists.txt index 25846d76b2..cb6e47a65a 100644 --- a/examples/s4u/CMakeLists.txt +++ b/examples/s4u/CMakeLists.txt @@ -4,9 +4,10 @@ foreach (example actor-create actor-daemon actor-join actor-kill actor-lifetime 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 - mutex + mutex platform-properties plugin-hostload - replay-comm replay-storage) + replay-comm replay-storage + trace-platform) 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}) @@ -73,10 +74,16 @@ foreach(example actor-create actor-daemon actor-join actor-kill actor-lifetime a exec-async exec-basic exec-monitor exec-remote platform-properties plugin-hostload mutex io-file-system io-file-remote io-storage-raw - replay-comm replay-storage) + 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 --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example} ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh) endforeach() + +foreach (example trace-platform) + ADD_TESH(s4u-${example} --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example} + --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh) +endforeach() diff --git a/examples/msg/trace-platform/trace-platform.c b/examples/s4u/trace-platform/s4u-trace-platform.cpp similarity index 51% rename from examples/msg/trace-platform/trace-platform.c rename to examples/s4u/trace-platform/s4u-trace-platform.cpp index c3a06007a8..b448b0e1cc 100644 --- a/examples/msg/trace-platform/trace-platform.c +++ b/examples/s4u/trace-platform/s4u-trace-platform.cpp @@ -3,13 +3,12 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/msg.h" +#include "simgrid/s4u.hpp" -int main(int argc, char *argv[]) +int main(int argc, char* argv[]) { - MSG_init(&argc, argv); - xbt_assert(argc > 1, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]); - MSG_create_environment(argv[1]); - MSG_main(); + simgrid::s4u::Engine e(&argc, argv); + e.loadPlatform(argv[1]); + e.run(); return 0; } diff --git a/examples/msg/trace-platform/trace-platform.tesh b/examples/s4u/trace-platform/s4u-trace-platform.tesh similarity index 99% rename from examples/msg/trace-platform/trace-platform.tesh rename to examples/s4u/trace-platform/s4u-trace-platform.tesh index a22f7aa77b..6af7e88b0d 100644 --- a/examples/msg/trace-platform/trace-platform.tesh +++ b/examples/s4u/trace-platform/s4u-trace-platform.tesh @@ -1,7 +1,7 @@ #! ./tesh p Tracing platform only -$ $SG_TEST_EXENV ${bindir:=.}/trace-platform$EXEEXT --cfg=tracing:yes --cfg=tracing/filename:trace_platform.trace --cfg=tracing/categorized:yes ${platfdir}/small_platform.xml +$ $SG_TEST_EXENV ${bindir:=.}/s4u-trace-platform$EXEEXT --cfg=tracing:yes --cfg=tracing/filename:trace_platform.trace --cfg=tracing/categorized:yes ${platfdir}/small_platform.xml > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'trace_platform.trace' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes' @@ -335,7 +335,7 @@ $ tail -n +3 trace_platform.trace $ rm -f trace_platform.trace -$ $SG_TEST_EXENV ${bindir:=.}/trace-platform$EXEEXT --cfg=tracing:yes --cfg=tracing/filename:trace_platform.trace --cfg=tracing/categorized:yes ${platfdir}/g5k.xml +$ $SG_TEST_EXENV ${bindir:=.}/s4u-trace-platform$EXEEXT --cfg=tracing:yes --cfg=tracing/filename:trace_platform.trace --cfg=tracing/categorized:yes ${platfdir}/g5k.xml > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'trace_platform.trace' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'