Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move one more tracing test
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Sat, 26 Mar 2016 16:14:29 +0000 (17:14 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Sat, 26 Mar 2016 16:14:29 +0000 (17:14 +0100)
.gitignore
examples/msg/CMakeLists.txt
examples/msg/trace-categories/trace-categories.c
examples/msg/trace-user-variables/trace-user-variables.c [moved from examples/msg/tracing/user_variables.c with 95% similarity]
examples/msg/trace-user-variables/trace-user-variables.tesh [moved from examples/msg/tracing/user_variables.tesh with 65% similarity]
examples/msg/tracing/CMakeLists.txt
examples/msg/tracing/procmig.c

index d112887..199dd54 100644 (file)
@@ -192,7 +192,7 @@ examples/msg/tracing/procmig
 examples/msg/trace-simple/trace-simple
 examples/msg/tracing/tasks
 examples/msg/trace-platform/trace-platform
-examples/msg/tracing/user_variables
+examples/msg/trace-user-variables/trace-user-variables
 examples/s4u/basic/s4u_basic
 examples/s4u/io/s4u_io
 examples/simdag/daxload/sd_daxload
index f9f9338..5334f6e 100644 (file)
@@ -1,7 +1,8 @@
 foreach(x actions-mpi actions-storage async-wait async-waitall async-waitany dht-chord dht-pastry 
           exception energy-consumption energy-onoff energy-pstate energy-ptask energy-vm failures io-file io-file-unlink
           io-remote io-storage pmm priority process-kill process-migration process-suspend properties sendrecv
-          set-maestro start_kill_time synchro token_ring trace-categories trace-platform trace-simple)
+          set-maestro start_kill_time synchro token_ring 
+          trace-categories trace-platform trace-simple trace-user-variables)
   add_executable       (${x}     ${x}/${x}.c)
   target_link_libraries(${x}     simgrid)
   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
@@ -64,7 +65,7 @@ foreach (example consumption onoff pstate vm)
   ADD_TESH_FACTORIES(msg-energy-${example} "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy-${example}/energy-${example}.tesh)
 endforeach()
 
-foreach (x categories platform simple)
+foreach (x categories platform simple user-variables)
   ADD_TESH(msg-trace-${x} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/trace-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/trace-${x} trace-${x}.tesh)
 endforeach()
 
index 22d2c47..acc12b3 100644 (file)
  * (See \ref tracing_tracing_options for details)
  */
 
-#include <stdio.h>
 #include "simgrid/msg.h"
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
-
 static int master(int argc, char *argv[])
 {
   long number_of_tasks = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s");
@@ -12,7 +12,7 @@
  * --cfg=tracing/platform:yes
  * (See \ref tracing_tracing_options for details)
  */
-
+#include <stdio.h>
 #include "simgrid/msg.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
@@ -51,10 +51,8 @@ static int master(int argc, char *argv[])
 int main(int argc, char *argv[])
 {
   MSG_init(&argc, argv);
-  if (argc < 3) {
-    printf("Usage: %s platform_file deployment_file\n", argv[0]);
-    exit(1);
-  }
+  xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
+             "\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);
 
   MSG_create_environment(argv[1]);
 
@@ -1,7 +1,7 @@
 #! ./tesh
 
 p Tracing user variables
-$ $SG_TEST_EXENV ${bindir:=.}/tracing/user_variables$EXEEXT --cfg=tracing:yes --cfg=tracing/platform:yes ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/tracing/deployment.xml
+$ $SG_TEST_EXENV ${bindir:=.}/trace-user-variabless$EXEEXT --cfg=tracing:yes  --cfg=tracing/platform:yes ${srcdir:=.}/small_platform.xml ${srcdir:=.}/../msg/masterslave/deployment_masterslave_mailbox.xml
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/platform' to 'yes'
 > [0.004078] [msg_test/INFO] Declared host variables:
@@ -16,7 +16,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/tracing/user_variables$EXEEXT --cfg=tracing:yes --
 > [0.004078] [msg_test/INFO] 0-HOST1-LINK3
 > [0.004078] [msg_test/INFO] 0-LINK3-HOST1
 
-$ rm viva_graph.plist
+$ rm -f viva_graph.plist
 
 p Not tracing user variables
-$ $SG_TEST_EXENV ${bindir:=.}/tracing/user_variables$EXEEXT ${srcdir:=.}/../platforms/small_platform.xml ${srcdir:=.}/tracing/deployment.xml
+$ $SG_TEST_EXENV ${bindir:=.}/trace-user-variabless$EXEEXT ${srcdir:=.}/small_platform.xml ${srcdir:=.}/../msg/masterslave/deployment_masterslave_mailbox.xml
index 295887a..efecac9 100644 (file)
@@ -1,4 +1,4 @@
-foreach (example ms procmig user_variables link_user_variables link_srcdst_user_variables)
+foreach (example ms procmig link_user_variables link_srcdst_user_variables)
   add_executable       (${example} ${example}.c)
   target_link_libraries(${example} simgrid)
   set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${example}.c)
index 78f3616..13f3955 100644 (file)
@@ -16,8 +16,6 @@
 
 #include "simgrid/msg.h"
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
-
 /** The guy we will move from host to host. It move alone and then is moved by policeman back  */
 static int emigrant(int argc, char *argv[])
 {
@@ -39,7 +37,7 @@ static int emigrant(int argc, char *argv[])
   return 0;
 }
 
-static int master(int argc, char *argv[])
+static int policeman(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 
@@ -81,7 +79,7 @@ int main(int argc, char *argv[])
   TRACE_category ("migration_order");
 
   MSG_process_create("emigrant", emigrant, NULL, MSG_get_host_by_name("Fafard"));
-  MSG_process_create("master", master, NULL, MSG_get_host_by_name("Tremblay"));
+  MSG_process_create("policeman", policeman, NULL, MSG_get_host_by_name("Tremblay"));
 
   MSG_main();
   return 0;