Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
factoring and cleanups for msg/tracing
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 7 Mar 2016 10:34:59 +0000 (11:34 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 7 Mar 2016 10:34:59 +0000 (11:34 +0100)
examples/msg/tracing/CMakeLists.txt
examples/msg/tracing/categories.c
examples/msg/tracing/deployment.xml
examples/msg/tracing/link_srcdst_user_variables.c
examples/msg/tracing/link_user_variables.c
examples/msg/tracing/ms.c
examples/msg/tracing/procmig.c
examples/msg/tracing/simple.c
examples/msg/tracing/trace_platform.c
examples/msg/tracing/user_variables.c
tools/cmake/Tests.cmake

index 4711217..3be1e6b 100644 (file)
@@ -1,50 +1,20 @@
-add_executable       (ms                         ms.c)
-target_link_libraries(ms                         simgrid)
-add_executable       (categories                 categories.c)
-target_link_libraries(categories                 simgrid)
-add_executable       (procmig                    procmig.c)
-target_link_libraries(procmig                    simgrid)
+foreach (example ms categories procmig trace_platform user_variables 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)
+  set(tesh_files  ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${example}.tesh)
+
+  ADD_TESH(tracing-${example} --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/${example}.tesh)
+endforeach()
+
 add_executable       (simple                     simple.c)
 target_link_libraries(simple                     simgrid)
-add_executable       (trace_platform             trace_platform.c)
-target_link_libraries(trace_platform             simgrid)
-add_executable       (user_variables             user_variables.c)
-target_link_libraries(user_variables             simgrid)
-add_executable       (link_user_variables        link_user_variables.c)
-target_link_libraries(link_user_variables        simgrid)
-add_executable       (link_srcdst_user_variables link_srcdst_user_variables.c)
-target_link_libraries(link_srcdst_user_variables simgrid)
 
 ## Clean generated files
 get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
-set_directory_properties(
-  PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
-  "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/ms.cat.plist;${CMAKE_CURRENT_BINARY_DIR}/ms.trace;${CMAKE_CURRENT_BINARY_DIR}/ms.uncat.plist;"
-  )
+set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/ms.cat.plist;${CMAKE_CURRENT_BINARY_DIR}/ms.trace;${CMAKE_CURRENT_BINARY_DIR}/ms.uncat.plist;")
 
-set(tesh_files
-  ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/categories.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/link_srcdst_user_variables.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/link_user_variables.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/ms.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/procmig.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/trace_platform.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/user_variables.tesh
-  PARENT_SCOPE)
-set(xml_files
-  ${xml_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/deployment.xml
-  ${CMAKE_CURRENT_SOURCE_DIR}/procmig-deploy.xml
-  PARENT_SCOPE)
-set(examples_src
-  ${examples_src}
-  ${CMAKE_CURRENT_SOURCE_DIR}/categories.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/link_srcdst_user_variables.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/link_user_variables.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/ms.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/procmig.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/simple.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/trace_platform.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/user_variables.c
-  PARENT_SCOPE)
+set(tesh_files    ${tesh_files}                                                    PARENT_SCOPE)
+set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/simple.c            PARENT_SCOPE)
+set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/deployment.xml
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/procmig-deploy.xml  PARENT_SCOPE)
index f5e3fc9..43963e3 100644 (file)
@@ -6,12 +6,11 @@
 
 /** @addtogroup MSG_examples
  * 
- * - <b>tracing/categories.c</b> This is a master/slave program where the master creates
- * tasks, send them to the slaves. For each task received, the slave executes
- * it and then destroys it. This program declares several tracing categories that are
- * used to classify tasks. When the program is executed, the tracing mechanism registers
- * the resource utilization of hosts and links according to these categories. You might
- * want to run this program with the following parameters:
+ * - <b>tracing/categories.c</b> This is a master/slave program where the master creates tasks, send them to the slaves.
+ * For each task received, the slave executes it and then destroys it. This program declares several tracing categories
+ * that are used to classify tasks. When the program is executed, the tracing mechanism registers the resource
+ * utilization of hosts and links according to these categories. You might want to run this program with the following
+ * parameters:
  * --cfg=tracing:yes
  * --cfg=tracing/categorized:yes
  * --cfg=tracing/uncategorized:yes
 
 #include <stdio.h>
 #include "simgrid/msg.h"
-#include "xbt/sysdep.h"         /* calloc, printf */
-
-/* Create a log channel to have nice outputs. */
-#include "xbt/log.h"
-#include "xbt/asserts.h"
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
-                             "Messages specific for this msg example");
-int master(int argc, char *argv[]);
-int slave(int argc, char *argv[]);
-
-/** sender function  */
-int master(int argc, char *argv[])
+
+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");
   long slaves_count = xbt_str_parse_int(argv[4], "Invalid amount of slaves: %s");
@@ -65,8 +56,7 @@ int master(int argc, char *argv[])
   return 0;
 }
 
-/** Receiver function  */
-int slave(int argc, char *argv[])
+static int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 
@@ -85,7 +75,6 @@ int slave(int argc, char *argv[])
   return 0;
 }
 
-/** Main function */
 int main(int argc, char *argv[])
 {
   MSG_init(&argc, argv);
@@ -94,9 +83,7 @@ int main(int argc, char *argv[])
     exit(1);
   }
 
-  char *platform_file = argv[1];
-  char *deployment_file = argv[2];
-  MSG_create_environment(platform_file);
+  MSG_create_environment(argv[1]);
 
   //declaring user categories with RGB colors
   TRACE_category_with_color ("compute", "1 0 0"); //red
@@ -106,7 +93,7 @@ int main(int argc, char *argv[])
 
   MSG_function_register("master", master);
   MSG_function_register("slave", slave);
-  MSG_launch_application(deployment_file);
+  MSG_launch_application(argv[2]);
 
   MSG_main();
   return 0;
index 1efc8a7..3c2a758 100644 (file)
@@ -8,7 +8,6 @@
      <argument value="1000000"/>   <!-- Communication size of tasks -->
      <argument value="5"/>         <!-- Number of slaves -->
   </process>
-  <!-- The slave processes (with mailbox to listen on as argument) -->
   <process host="Tremblay" function="slave"/>
   <process host="Jupiter" function="slave"/>
   <process host="Fafard" function="slave"/>
index aa1caf6..632f2d3 100644 (file)
@@ -8,21 +8,17 @@
 
 /** @addtogroup MSG_examples
  *
- * - <b>tracing/link_srcdst_user_variables.c</b>: This program demonstrates how to
- * trace user variables associated to the links of the platform file. Instead of
- * providing the name of the link to update one of its variable, this example shows
- * how to provide two hosts as parameter (source and destination, use their names as
- * defined in the platform file). The tracing mechanism will get the route between
- * these two hosts, if there is one defined in the platform file, and update the variable
- * of all the links of that route to the value provided.
+ * - <b>tracing/link_srcdst_user_variables.c</b>: This program demonstrates how to trace user variables associated to
+ * the links of the platform file. Instead of providing the name of the link to update one of its variable, this
+ * example shows how to provide two hosts as parameter (source and destination, use their names as defined in the
+ * platform file). The tracing mechanism will get the route between these two hosts, if there is one defined in the
+ * platform file, and update the variable of all the links of that route to the value provided.
  * You might want to run this program with the following parameters:
  * --cfg=tracing:yes
  * --cfg=tracing/platform:yes
  * (See \ref tracing_tracing_options for details)
  */
 
-int master(int argc, char *argv[]);
-
 //dump function to create and execute a task
 static void create_and_execute_task (void)
 {
@@ -31,18 +27,11 @@ static void create_and_execute_task (void)
   MSG_task_destroy (task);
 }
 
-int master(int argc, char *argv[])
+static int master(int argc, char *argv[])
 {
-  int i;
-
   //Set initial values for the link user variables
-  //
-  //This example uses source and destination where
-  //source and destination are the name of hosts in
-  //the platform file.
-  //
-  //The functions will set/change the value of the variable
-  //for all links in the route between source and destination.
+  //This example uses source and destination wheresource and destination are the name of hosts inthe platform file.
+  //The functions will set/change the value of the variablefor all links in the route between source and destination.
 
   //Set the Link_Capacity variable
   TRACE_link_srcdst_variable_set("Tremblay", "Bourassa", "Link_Capacity", 12.34);
@@ -53,7 +42,7 @@ int master(int argc, char *argv[])
   TRACE_link_srcdst_variable_set("Fafard", "Ginette", "Link_Utilization", 3.4);
 
   //run the simulation, update my variables accordingly
-  for (i = 0; i < 10; i++) {
+  for (int i = 0; i < 10; i++) {
     create_and_execute_task ();
 
     //Add to link user variables
@@ -61,7 +50,7 @@ int master(int argc, char *argv[])
     TRACE_link_srcdst_variable_add ("Fafard", "Ginette", "Link_Utilization", 7.8);
   }
 
-  for (i = 0; i < 10; i++) {
+  for (int i = 0; i < 10; i++) {
     create_and_execute_task ();
 
     //Subtract from link user variables
@@ -72,7 +61,6 @@ int master(int argc, char *argv[])
   return 0;
 }
 
-/** Main function */
 int main(int argc, char *argv[])
 {
   MSG_init(&argc, argv);
@@ -81,9 +69,7 @@ int main(int argc, char *argv[])
     exit(1);
   }
 
-  char *platform_file = argv[1];
-  char *deployment_file = argv[2];
-  MSG_create_environment(platform_file);
+  MSG_create_environment(argv[1]);
 
   //declaring link user variables (one without, another with a RGB color)
   TRACE_link_variable_declare("Link_Capacity");
@@ -92,7 +78,7 @@ int main(int argc, char *argv[])
   //register "master" and "slave" functions and launch deployment
   MSG_function_register("master", master);
   MSG_function_register("slave", master);
-  MSG_launch_application(deployment_file);
+  MSG_launch_application(argv[2]);
 
   MSG_main();
   return 0;
index 2c6fb26..5c08fc6 100644 (file)
@@ -8,18 +8,14 @@
 
 /** @addtogroup MSG_examples
  *
- * - <b>tracing/link_user_variables.c</b>: This program demonstrates how to
- * trace user variables associated to the links of the platform file. You need
- * to provide the name of the link to update the value of the variable associated
- * to that link.
- * You might want to run this program with the following parameters:
+ * - <b>tracing/link_user_variables.c</b>: This program demonstrates how to trace user variables associated to the
+ * links of the platform file. You need to provide the name of the link to update the value of the variable associated
+ * to that link. You might want to run this program with the following parameters:
  * --cfg=tracing:yes
  * --cfg=tracing/platform:yes
  * (See \ref tracing_tracing_options for details)
  */
 
-int master(int argc, char *argv[]);
-
 //dump function to create and execute a task
 static void create_and_execute_task (void)
 {
@@ -28,13 +24,10 @@ static void create_and_execute_task (void)
   MSG_task_destroy (task);
 }
 
-int master(int argc, char *argv[])
+static int master(int argc, char *argv[])
 {
-  int i;
-
-  //set initial values for the link user variables
-  //this example only shows for links
-  //identified by "6" and "3" in the platform file
+  //set initial values for the link user variables this example only shows for links identified by "6" and "3" in the
+  //platform file
 
   //Set the Link_Capacity variable
   TRACE_link_variable_set("6", "Link_Capacity", 12.34);
@@ -45,7 +38,7 @@ int master(int argc, char *argv[])
   TRACE_link_variable_set("6", "Link_Utilization", 3.4);
 
   //run the simulation, update my variables accordingly
-  for (i = 0; i < 10; i++) {
+  for (int i = 0; i < 10; i++) {
     create_and_execute_task ();
 
     //Add to link user variables
@@ -53,7 +46,7 @@ int master(int argc, char *argv[])
     TRACE_link_variable_add ("6", "Link_Utilization", 7.8);
   }
 
-  for (i = 0; i < 10; i++) {
+  for (int i = 0; i < 10; i++) {
     create_and_execute_task ();
 
     //Subtract from link user variables
@@ -64,7 +57,6 @@ int master(int argc, char *argv[])
   return 0;
 }
 
-/** Main function */
 int main(int argc, char *argv[])
 {
   MSG_init(&argc, argv);
@@ -73,9 +65,7 @@ int main(int argc, char *argv[])
     exit(1);
   }
 
-  char *platform_file = argv[1];
-  char *deployment_file = argv[2];
-  MSG_create_environment(platform_file);
+  MSG_create_environment(argv[1]);
 
   //declaring link user variables (one without, another with a RGB color)
   TRACE_link_variable_declare("Link_Capacity");
@@ -84,7 +74,7 @@ int main(int argc, char *argv[])
   //register "master" and "slave" functions and launch deployment
   MSG_function_register("master", master);
   MSG_function_register("slave", master);
-  MSG_launch_application(deployment_file);
+  MSG_launch_application(argv[2]);
 
   MSG_main();
   return 0;
index 697a814..eb9deaf 100644 (file)
@@ -6,12 +6,10 @@
 
 /** @addtogroup MSG_examples
  * 
- * - <b>tracing/ms.c</b> This is a master/slave program where the master creates
- * tasks, send them to the slaves. For each task received, the slave executes
- * it and then destroys it. This program uses several tracing functions that
- * enable the tracing of categorized resource utilization, the use of trace marks,
- * and user variables associated to the hosts of the platform file.
- * You might want to run this program with the following parameters:
+ * - <b>tracing/ms.c</b> This is a master/slave program where the master creates tasks, send them to the slaves. For
+ * each task received, the slave executes it and then destroys it. This program uses several tracing functions that
+ * enable the tracing of categorized resource utilization, the use of trace marks, and user variables associated to the
+ * hosts of the platform file. You might want to run this program with the following parameters:
  * --cfg=tracing/categorized:yes
  * --cfg=tracing/uncategorized:yes
  * --cfg=viva/categorized:viva_cat.plist
  * (See \ref tracing_tracing_options for details)
  */
 
-#include <stdio.h>
 #include "simgrid/msg.h"
-#include "xbt/sysdep.h"         /* calloc, printf */
 
-/* Create a log channel to have nice outputs. */
-#include "xbt/log.h"
-#include "xbt/asserts.h"
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
-                             "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
-int master(int argc, char *argv[]);
-int slave(int argc, char *argv[]);
-
-/** sender function  */
-int master(int argc, char *argv[])
+static int master(int argc, char *argv[])
 {
   long number_of_tasks = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s");
   double task_comp_size = xbt_str_parse_double(argv[2], "Invalid computational size: %s");
@@ -68,15 +56,12 @@ int master(int argc, char *argv[])
   return 0;
 }
 
-/** Receiver function  */
-int slave(int argc, char *argv[])
+static int slave(int argc, char *argv[])
 {
   msg_task_t task = NULL;
 
   TRACE_host_variable_set(MSG_host_get_name(MSG_host_self()), "is_slave", 1);
-  TRACE_host_variable_set(MSG_host_get_name(MSG_host_self()),
-                          "task_computation",
-                          0);
+  TRACE_host_variable_set(MSG_host_get_name(MSG_host_self()), "task_computation", 0);
   while (1) {
     MSG_task_receive(&(task), "master_mailbox");
 
@@ -86,9 +71,7 @@ int slave(int argc, char *argv[])
     }
     //adding the value returned by MSG_task_get_compute_duration(task)
     //to the variable "task_computation"
-    TRACE_host_variable_add(MSG_host_get_name(MSG_host_self()),
-                            "task_computation",
-                            MSG_task_get_flops_amount(task));
+    TRACE_host_variable_add(MSG_host_get_name(MSG_host_self()), "task_computation", MSG_task_get_flops_amount(task));
     MSG_task_execute(task);
     MSG_task_destroy(task);
     task = NULL;
@@ -96,7 +79,6 @@ int slave(int argc, char *argv[])
   return 0;
 }
 
-/** Main function */
 int main(int argc, char *argv[])
 {
   MSG_init(&argc, argv);
@@ -105,9 +87,7 @@ int main(int argc, char *argv[])
     exit(1);
   }
 
-  char *platform_file = argv[1];
-  char *deployment_file = argv[2];
-  MSG_create_environment(platform_file);
+  MSG_create_environment(argv[1]);
 
   //declaring user variables
   TRACE_host_variable_declare("is_slave");
@@ -123,14 +103,13 @@ int main(int argc, char *argv[])
   //declaring user categories with RGB colors (values from 0 to 1)
   TRACE_category_with_color ("compute", "1 0 0");  //compute is red
   TRACE_category_with_color ("finalize", "0 1 0"); //finalize is green
-  //categories without user-defined colors receive
-  //random colors generated by the tracing system
+  //categories without user-defined colors receive random colors generated by the tracing system
   TRACE_category ("request");
   TRACE_category_with_color ("report", NULL);
 
   MSG_function_register("master", master);
   MSG_function_register("slave", slave);
-  MSG_launch_application(deployment_file);
+  MSG_launch_application(argv[2]);
 
   MSG_main();
 
@@ -156,4 +135,4 @@ int main(int argc, char *argv[])
   }
 
   return 0;
-}                               /* end_of_main */
+}
index 5be002b..a98786e 100644 (file)
@@ -6,23 +6,17 @@
 
 /** @addtogroup MSG_examples
  * 
- * - <b>tracing/procmig.c</b> This program shows a process migration. Tracing
- * this program with the options below enables a gantt-chart visualization
- * of where the process has been during its execution. Migrations are represented by
- * arrows from the origin to the destination host.
- * You might want to run this program with the following parameters:
+ * - <b>tracing/procmig.c</b> This program shows a process migration. Tracing this program with the options below
+ * enables a gantt-chart visualization of where the process has been during its execution. Migrations are represented by
+ * arrows from the origin to the destination host. You might want to run this program with the following parameters:
  * --cfg=tracing:yes
  * --cfg=tracing/msg/process:yes
  * (See \ref tracing_tracing_options for details)
  */
 
-#include "simgrid/msg.h"            /* core library */
-#include "xbt/sysdep.h"         /* calloc */
+#include "simgrid/msg.h"
 
-/* Create a log channel to have nice outputs. */
-#include "xbt/log.h"
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
-                             "Messages specific for this msg example");
+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[])
@@ -77,26 +71,22 @@ static int master(int argc, char *argv[])
   return 0;
 }
 
-/** Main function */
 int main(int argc, char *argv[])
 {
-  /* Argument checking */
   MSG_init(&argc, argv);
   if (argc < 3) {
     XBT_CRITICAL("Usage: %s platform_file deployment_file\n", argv[0]);
     exit(1);
   }
 
-  char *platform_file = argv[1];
-  char *deployment_file = argv[2];
-  MSG_create_environment(platform_file);
+  MSG_create_environment(argv[1]);
 
   TRACE_category ("migration_order");
 
   /* Application deployment */
   MSG_function_register("emigrant", emigrant);
   MSG_function_register("master", master);
-  MSG_launch_application(deployment_file);
+  MSG_launch_application(argv[2]);
 
   MSG_main();
   return 0;
index 774cdca..876828f 100644 (file)
 /* Create a log channel to have nice outputs. */
 #include "xbt/log.h"
 #include "xbt/asserts.h"
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
-                             "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
-int simple_func(int argc, char *argv[]);
-
-/** Emitter function  */
-int simple_func(int argc, char *argv[])
+static int simple_func(int argc, char *argv[])
 {
   msg_task_t task = MSG_task_create("task", 100, 0, NULL);
   MSG_task_execute (task);
@@ -35,7 +31,6 @@ int simple_func(int argc, char *argv[])
   return 0;
 }
 
-/** Main function */
 int main(int argc, char *argv[])
 {
   MSG_init(&argc, argv);
@@ -44,13 +39,11 @@ int main(int argc, char *argv[])
     exit(1);
   }
 
-  char *platform_file = argv[1];
-  char *deployment_file = argv[2];
-  MSG_create_environment(platform_file);
+  MSG_create_environment(argv[1]);
 
   MSG_function_register("master", simple_func);
   MSG_function_register("slave", simple_func);
-  MSG_launch_application(deployment_file);
+  MSG_launch_application(argv[2]);
 
   MSG_main();
   return 0;
index 9411bdf..9431a5f 100644 (file)
@@ -6,24 +6,17 @@
 
 /** @addtogroup MSG_examples
  * 
- * - <b>tracing/trace_platform.c</b>: This program demonstrates how a
- * platform file is traced to a Paje trace file format using the tracing
- * mechanism of Simgrid.
- * You might want to run this program with the following parameters:
+ * - <b>tracing/trace_platform.c</b>: This program demonstrates how a platform file is traced to a Paje trace file
+ * format using the tracing mechanism of Simgrid. You might want to run this program with the following parameters:
  * --cfg=tracing:yes
  * --cfg=tracing/categorized:yes
  * (See \ref tracing_tracing_options for details)
  */
 
-#include <stdio.h>
 #include "simgrid/msg.h"
-#include "xbt/sysdep.h"         /* calloc, printf */
 
-#include "xbt/log.h"
-#include "xbt/asserts.h"
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
-/** Main function */
 int main(int argc, char *argv[])
 {
   MSG_init(&argc, argv);
@@ -32,8 +25,7 @@ int main(int argc, char *argv[])
     exit(1);
   }
 
-  char *platform_file = argv[1];
-  MSG_create_environment(platform_file);
+  MSG_create_environment(argv[1]);
   MSG_main();
   return 0;
 }
index 5a3255b..b338130 100644 (file)
@@ -6,26 +6,18 @@
 
 /** @addtogroup MSG_examples
  * 
- * - <b>tracing/user_variables.c</b>: This program demonstrates how to
- * trace user variables associated to the hosts of the platform file.
- * You might want to run this program with the following parameters:
+ * - <b>tracing/user_variables.c</b>: This program demonstrates how to trace user variables associated to the hosts of
+ * the platform file. You might want to run this program with the following parameters:
  * --cfg=tracing:yes
  * --cfg=tracing/platform:yes
  * (See \ref tracing_tracing_options for details)
  */
 
-#include <stdio.h>
 #include "simgrid/msg.h"
-#include "xbt/sysdep.h"         /* calloc, printf */
 
-/* Create a log channel to have nice outputs. */
-#include "xbt/log.h"
-#include "xbt/asserts.h"
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
-int master(int argc, char *argv[]);
-
-int master(int argc, char *argv[])
+static int master(int argc, char *argv[])
 {
   const char *hostname = MSG_host_get_name(MSG_host_self());
   int i;
@@ -56,7 +48,6 @@ int master(int argc, char *argv[])
   return 0;
 }
 
-/** Main function */
 int main(int argc, char *argv[])
 {
   MSG_init(&argc, argv);
@@ -65,9 +56,7 @@ int main(int argc, char *argv[])
     exit(1);
   }
 
-  char *platform_file = argv[1];
-  char *deployment_file = argv[2];
-  MSG_create_environment(platform_file);
+  MSG_create_environment(argv[1]);
 
   //declaring user variables
   TRACE_host_variable_declare("HDD_capacity");
@@ -76,7 +65,7 @@ int main(int argc, char *argv[])
   //register functions and launch deployment
   MSG_function_register("master", master);
   MSG_function_register("slave", master);
-  MSG_launch_application(deployment_file);
+  MSG_launch_application(argv[2]);
 
   MSG_main();
 
index 50db16e..d9be7de 100644 (file)
@@ -126,17 +126,6 @@ IF(NOT enable_memcheck)
   ENDIF()
 
   ## INTERFACES ##
-  ### MSG ###
-  # BEGIN TESH TESTS
-  ADD_TESH(tracing-ms                          --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/ms.tesh)
-  ADD_TESH(tracing-trace-platform              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/trace_platform.tesh)
-  ADD_TESH(tracing-user-variables              --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/user_variables.tesh)
-  ADD_TESH(tracing-link-user-variables         --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/link_user_variables.tesh)
-  ADD_TESH(tracing-link-srcdst-user-variables  --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/link_srcdst_user_variables.tesh)
-  ADD_TESH(tracing-categories                  --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/categories.tesh)
-  ADD_TESH(tracing-process-migration           --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg --cd ${CMAKE_HOME_DIRECTORY}/examples/msg tracing/procmig.tesh)
-  # END TESH TESTS
-
   ### SIMDAG ###
   # BEGIN TESH TESTS
   # these tests need the assertion mechanism