Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mv trace-platform from MSG to S4U
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 11 Dec 2017 14:41:38 +0000 (15:41 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 11 Dec 2017 14:41:38 +0000 (15:41 +0100)
the MSG version is not kept in the dungeon because:
 - the code does absolutely nothing
 - the tesh comprises a huge Pajé output for G5K

.gitignore
examples/msg/CMakeLists.txt
examples/s4u/CMakeLists.txt
examples/s4u/trace-platform/s4u-trace-platform.cpp [moved from examples/msg/trace-platform/trace-platform.c with 51% similarity]
examples/s4u/trace-platform/s4u-trace-platform.tesh [moved from examples/msg/trace-platform/trace-platform.tesh with 99% similarity]

index c3ef7ba..3b6b966 100644 (file)
@@ -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
index a0450a8..e445ed4 100644 (file)
@@ -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 
index 25846d7..cb6e47a 100644 (file)
@@ -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()
@@ -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, charargv[])
 {
-  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;
 }
@@ -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'