Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 15 Apr 2016 20:58:02 +0000 (22:58 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 15 Apr 2016 20:58:02 +0000 (22:58 +0200)
21 files changed:
doc/Doxyfile.in
doc/doxygen/examples.doc
examples/msg/app-pingpong/app-pingpong.c
examples/msg/app-token-ring/app-token-ring.c
examples/msg/async-wait/async-wait.c
examples/msg/async-waitall/async-waitall.c
examples/msg/async-waitany/async-waitany.c
examples/msg/process-kill/process-kill.c
examples/msg/process-migration/process-migration.c
examples/msg/process-startkilltime/process-startkilltime.c
examples/msg/process-suspend/process-suspend.c
examples/msg/trace-categories/trace-categories.c
examples/msg/trace-link-srcdst-user-variables/trace-link-srcdst-user-variables.c
examples/msg/trace-link-user-variables/trace-link-user-variables.c
examples/msg/trace-masterworker/trace-masterworker.c
examples/msg/trace-masterworker/trace-masterworker.tesh
examples/msg/trace-platform/trace-platform.c
examples/msg/trace-process-migration/trace-process-migration.c
examples/msg/trace-simple/trace-simple.c
examples/msg/trace-user-variables/trace-user-variables.c
teshsuite/smpi/coll-allreduce/coll-allreduce-automatic.tesh

index 982db2c..5800be4 100644 (file)
@@ -699,28 +699,29 @@ INPUT +=                 @CMAKE_HOME_DIRECTORY@/examples/msg/app-pingpong/app-pi
                          @CMAKE_HOME_DIRECTORY@/examples/msg/app-token-ring/app-token-ring.c \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/app-masterworker/app-masterworker.c \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/async-wait/async-wait.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/icomms/peer2.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/icomms/peer3.c \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/async-waitall/async-waitall.c \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/async-waitany/async-waitany.c \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/process-suspend/process-suspend.c \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/process-kill/process-kill.c \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/process-migration/process-migration.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/task-priority/task-priority.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/properties \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/parallel_task \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/process-startkilltime/process-startkilltime.c \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/trace-simple/trace-simple.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/tracing/ms.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/tracing/categories.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/tracing/procmig.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/tracing/trace_platform.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/tracing/user_variables.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/tracing/link_user_variables.c \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/tracing/link_srcdst_user_variables.c \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/trace-platform/trace-platform.c \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/trace-categories/trace-categories.c \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/trace-masterworker/trace-masterworker.c \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/trace-process-migration/trace-process-migration.c \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/trace-user-variables/trace-user-variables.c \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/trace-link-user-variables/trace-link-user-variables.c \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/trace-link-srcdst-user-variables/trace-link-srcdst-user-variables.c \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/ns3 \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/io \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/gpu \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/actions \
                          @CMAKE_HOME_DIRECTORY@/examples/msg/pmm \
-                         @CMAKE_HOME_DIRECTORY@/examples/msg/chord
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/chord\
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/task-priority/task-priority.c \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/properties \
+                         @CMAKE_HOME_DIRECTORY@/examples/msg/parallel_task
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
index dbce8e5..7e188ad 100644 (file)
@@ -143,14 +143,11 @@ Simulation of a master-worker application using a realistic platform and an exte
 \paragraph MSG_ex_mw_TOC Table of contents:
 
    - \ref MSG_ext_mw_preliminary
-   - \ref MSG_ext_ms_master
-   - \ref MSG_ext_ms_slave
-   - \ref MSG_ext_ms_forwarder
-   - \ref MSG_ext_ms_core
-   - \ref MSG_ext_ms_main
-   - \ref MSG_ext_ms_helping
-   - \ref MSG_ext_ms_application
-   - \ref MSG_ext_ms_platform
+   - \ref MSG_ext_mw_master
+   - \ref MSG_ext_mw_worker
+   - \ref MSG_ext_mw_core
+   - \ref MSG_ext_mw_platform
+   - \ref MSG_ext_mw_application
 
 <hr>
 
@@ -159,83 +156,67 @@ Simulation of a master-worker application using a realistic platform and an exte
 \paragraph MSG_ext_mw_preliminary Preliminary declarations
 
 \skip include
-\until printf
-\until }
+\until example");
+\skipline Master expects
 
-\paragraph MSG_ext_ms_master Master code
+\paragraph MSG_ext_mw_master Master code
 
-This function has to be assigned to a #msg_process_t that will behave as
-the master. It should not be called directly but either given as a
-parameter to #MSG_process_create() or registered as a public function
-through #MSG_function_register() and then automatically assigned to a
-process through #MSG_launch_application().
+This function has to be assigned to a #msg_process_t that will behave as the master. It should not be called directly 
+but either given as a parameter to #MSG_process_create() or registered as a public function through 
+#MSG_function_register() and then automatically assigned to a process through #MSG_launch_application().
 
 C style arguments (argc/argv) are interpreted as:
    - the number of tasks to distribute
-   - the computation size of each task
-   - the size of the files associated to each task
-   - a list of host that will accept those tasks.
-
-Tasks are dumbly sent in a round-robin style.
-
-\until end_of_master
+   - the computational size of each task
+   - the communication size of each task
+   - the number of workers managed by the master.
 
-\paragraph MSG_ext_ms_slave Slave code
+Tasks are evenly sent in a round-robin style.
 
-This function has to be assigned to a #msg_process_t that has to behave
-as a slave. Just like the master function (described in \ref
-MSG_ext_ms_master), it should not be called directly.
-
-This function keeps waiting for tasks and executes them as it receives them.
-
-\until end_of_slave
+\until return 0;
+\until }
+\skipline Worker expects
 
-\paragraph MSG_ext_ms_forwarder Forwarder code
+\paragraph MSG_ext_mw_worker Worker code
 
-This function has to be assigned to a #msg_process_t that has to behave
-as a forwarder. Just like the master function (described in \ref
-MSG_ext_ms_master), it should not be called directly.
+This function has to be assigned to a #msg_process_t that has to behave as a worker. Just like the master function 
+(described in \ref MSG_ext_mw_master), it should not be called directly.
 
-C style arguments (argc/argv) are interpreted as a list of hosts that
-will accept those tasks.
+C style arguments (argc/argv) are interpreted as:
+   - a unique id used to build the mailbox name of the worker
 
-This function keeps waiting for tasks and dispatches them to its slaves.
+This function keeps waiting for tasks and executes them as it receives them. When a special task named 'finalize' is
+received from the master, the process ends its execution.
 
-\until end_of_forwarder
+\until return 0;
+\until }
 
-\paragraph MSG_ext_ms_core Simulation core
+\paragraph MSG_ext_mw_core Main function
 
-This function is the core of the simulation and is divided only into 3 parts
-thanks to MSG_create_environment() and MSG_launch_application().
-   -# Simulation settings : MSG_create_environment() creates a realistic
+This function is the core of the simulation and is divided only into 3 parts:
+   -# Simulation settings : #MSG_create_environment() creates a realistic
       environment
    -# Application deployment : create the processes on the right locations with
-      MSG_launch_application()
+      #MSG_launch_application()
    -# The simulation is run with #MSG_main()
 
 Its arguments are:
-       - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.
-       - <i>application_file</i>: the name of a file containing a valid surfxml application description
-
-\until end_of_test_all
-
-\paragraph MSG_ext_ms_main Main() function
-
-This initializes MSG, runs a simulation, and free all data-structures created by MSG.
-
-\until end_of_main
-
-\subsubsection MSG_ext_ms_helping Helping files
+   - <i>platform_file</i>: the name of a file containing an valid platform description.
+   - <i>deployment_file</i>: the name of a file containing a valid application description
+\line main
+\until OK;
+\until }
 
-\paragraph MSG_ext_ms_application Example of a deployment file
+\subsubsection MSG_ext_mw_platform Example of a platform file
 
-The following listing can be found in \c examples/msg/masterslave/deployment_masterslave_forwarder.xml:
+The following platform description can be found in \c examples/msg/platforms/small_platform.xml
+\include platforms/small_platform.xml
 
-\include msg/masterslave/deployment_masterslave_forwarder.xml
+\subsubsection MSG_ext_mw_application Example of a deployment file
 
-\paragraph MSG_ext_ms_platform Example of a platform file
+The following application description can be found in \c examples/msg/app-masterworker/app-masterworker_d.xml:
 
-\include platforms/small_platform.xml
+\include msg/app-masterworker/app-masterworker_d.xml
 
 */
 
index 59b3b74..8caacc6 100644 (file)
@@ -8,7 +8,7 @@
 
 /** @addtogroup MSG_examples
  *
- *  - <b>Ping-Pong: app-pingpong/app-pingpong.c </b>. It's hard to think of a simpler example. The tesh file
+ *  - <b>Ping-Pong: app-pingpong/app-pingpong.c</b>. It's hard to think of a simpler example. The tesh file
  *    laying in the directory is instructive concerning the way to pass options to the simulators (see \ref options).
  */
 
index b73ad92..de7e757 100644 (file)
@@ -6,11 +6,11 @@
 
 #include "simgrid/msg.h"
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(ring, "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_app_token_ring, "Messages specific for this msg example");
 
 /** @addtogroup MSG_examples
  * 
- * - <b>Token Ring: app-token-ring/app-token-ring.c</b>: Classical token ring communication, where a token is exchanged
+ * - <b>Token Ring: app-token-ring/app-token-ring.c</b>. Classical token ring communication, where a token is exchanged
  *   along a ring to reach every participant. The tesh file laying in the directory shows how to run the same example on
  *   different platforms.
  */
@@ -55,7 +55,6 @@ int main(int argc, char *argv[])
   MSG_create_environment(argv[1]);       /** - Load the platform description */
   xbt_dynar_t hosts = MSG_hosts_as_dynar();
   msg_host_t h;
-  MSG_function_register("foo", foo);
 
   XBT_INFO("Number of host '%d'",MSG_get_host_number());
   xbt_dynar_foreach (hosts, i, h){      /** - Give a unique rank to each host and create a @ref foo process on each */
index 089cf09..1071d85 100644 (file)
@@ -6,26 +6,28 @@
 
 #include "simgrid/msg.h"
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_wait, "Messages specific for this msg example");
 
 /** @addtogroup MSG_examples
  * 
  * @section MSG_ex_icomms Asynchronous communications
  * 
- * There is several examples of asynchronous communications coming in the archive. In addition to the fully documented
- * example \ref MSG_ex_asynchronous_communications, there is several other examples in the archive:
+ * In addition to the fully documented example of \ref MSG_ex_asynchronous_communications, there are several othe
+ * examples shipped in the archive:
  * 
- * - <b>msg/icomms/peer.c</b>: basic example of async functions (@ref MSG_task_isend, @ref MSG_task_irecv, @ref MSG_comm_wait)
+ * - <b>Basic example: async-wait/async-wait.c</b>. Illustrates the use of asynchronous functions (@ref MSG_task_isend,
+ *    @ref MSG_task_irecv, and @ref MSG_comm_wait).
  */
 
+/** Sender process expects 6 arguments: */
 static int sender(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");
-  double task_comm_size = xbt_str_parse_double(argv[3], "Invalid communication size: %s");
-  long receivers_count = xbt_str_parse_int(argv[4], "Invalid amount of receivers: %s");
-  double sleep_start_time = xbt_str_parse_double(argv[5], "Invalid sleep start time: %s");
-  double sleep_test_time = xbt_str_parse_double(argv[6], "Invalid test time: %s");
+  long number_of_tasks = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s");        /** - number of tasks */
+  double task_comp_size = xbt_str_parse_double(argv[2], "Invalid computational size: %s"); /** - computational cost */
+  double task_comm_size = xbt_str_parse_double(argv[3], "Invalid communication size: %s"); /** - communication cost */
+  long receivers_count = xbt_str_parse_int(argv[4], "Invalid amount of receivers: %s");    /** - number of receivers */
+  double sleep_start_time = xbt_str_parse_double(argv[5], "Invalid sleep start time: %s"); /** - start time */
+  double sleep_test_time = xbt_str_parse_double(argv[6], "Invalid test time: %s");         /** - test time */
 
   XBT_INFO("sleep_start_time : %f , sleep_test_time : %f", sleep_start_time, sleep_test_time);
 
@@ -40,14 +42,15 @@ static int sender(int argc, char *argv[])
     sprintf(mailbox, "receiver-%ld", i % receivers_count);
     sprintf(sprintf_buffer, "Task_%d", i);
 
+    /** This process first creates a task and send it asynchronously with @ref MSG_task_isend. Then, if: */
     task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL);
     comm = MSG_task_isend(task, mailbox);
     XBT_INFO("Send to receiver-%ld Task_%d", i % receivers_count, i);
 
-    if (sleep_test_time == 0) {
+    if (sleep_test_time == 0) { /** - "test_time" is set to 0, wait on @ref MSG_comm_wait */
       MSG_comm_wait(comm, -1);
     } else {
-      while (MSG_comm_test(comm) == 0) {
+      while (MSG_comm_test(comm) == 0) { /** - Call @ref MSG_comm_test every "test_time" otherwise */
         MSG_process_sleep(sleep_test_time);
       };
     }
@@ -74,45 +77,42 @@ static int sender(int argc, char *argv[])
   return 0;
 }
 
+/** Receiver process expects 3 arguments: */
 static int receiver(int argc, char *argv[])
 {
   msg_task_t task = NULL;
   XBT_ATTRIB_UNUSED msg_error_t res;
-  int id = -1;
   char mailbox[80];
   msg_comm_t res_irecv;
-  double sleep_start_time = xbt_str_parse_double(argv[2], "Invalid sleep start parameter: %s");
-  double sleep_test_time = xbt_str_parse_double(argv[3], "Invalid sleep test parameter: %s");
+  int id = xbt_str_parse_int(argv[1], "Invalid id: %s");                                        /** - unique id */
+  double sleep_start_time = xbt_str_parse_double(argv[2], "Invalid sleep start parameter: %s"); /** - start time */
+  double sleep_test_time = xbt_str_parse_double(argv[3], "Invalid sleep test parameter: %s");   /** - test time */
   XBT_INFO("sleep_start_time : %f , sleep_test_time : %f", sleep_start_time, sleep_test_time);
 
-  XBT_ATTRIB_UNUSED int read;
-  read = sscanf(argv[1], "%d", &id);
-  xbt_assert(read, "Invalid argument %s\n", argv[1]);
-
-  MSG_process_sleep(sleep_start_time);
+  MSG_process_sleep(sleep_start_time); /** This process first sleeps for "start time" seconds.  */
 
   sprintf(mailbox, "receiver-%d", id);
   while (1) {
-    res_irecv = MSG_task_irecv(&(task), mailbox);
+    res_irecv = MSG_task_irecv(&(task), mailbox); /** Then it posts asynchronous receives (@ref MSG_task_irecv) and*/
     XBT_INFO("Wait to receive a task");
 
-    if (sleep_test_time == 0) {
+    if (sleep_test_time == 0) {               /** - if "test_time" is set to 0, wait on @ref MSG_comm_wait */
       res = MSG_comm_wait(res_irecv, -1);
       xbt_assert(res == MSG_OK, "MSG_task_get failed");
     } else {
-      while (MSG_comm_test(res_irecv) == 0) {
+      while (MSG_comm_test(res_irecv) == 0) { /** - Call @ref MSG_comm_test every "test_time" otherwise */
         MSG_process_sleep(sleep_test_time);
       };
     }
     MSG_comm_destroy(res_irecv);
 
     XBT_INFO("Received \"%s\"", MSG_task_get_name(task));
-    if (!strcmp(MSG_task_get_name(task), "finalize")) {
+    if (!strcmp(MSG_task_get_name(task), "finalize")) { /** If the received task is "finalize", the process ends */
       MSG_task_destroy(task);
       break;
     }
 
-    XBT_INFO("Processing \"%s\"", MSG_task_get_name(task));
+    XBT_INFO("Processing \"%s\"", MSG_task_get_name(task)); /** Otherwise, the task is processed */
     MSG_task_execute(task);
     XBT_INFO("\"%s\" done", MSG_task_get_name(task));
     MSG_task_destroy(task);
@@ -130,13 +130,13 @@ int main(int argc, char *argv[])
   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]);
+  MSG_create_environment(argv[1]);/** - Load the platform description */
 
   MSG_function_register("sender", sender);
   MSG_function_register("receiver", receiver);
-  MSG_launch_application(argv[2]);
+  MSG_launch_application(argv[2]);/** - Deploy the @ref sender and @ref receiver processes */
 
-  res = MSG_main();
+  res = MSG_main();  /** - Run the simulation */
 
   XBT_INFO("Simulation time %g", MSG_get_clock());
 
index 8a0759e..bc3db3b 100644 (file)
@@ -6,11 +6,11 @@
 
 #include "simgrid/msg.h"
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_waitall, "Messages specific for this msg example");
 
 /** @addtogroup MSG_examples
  * 
- * - <b>msg/icomms/peer2.c</b>: demonstrates the @ref MSG_comm_waitall function
+ * - <b>Wait all: async-waitall/async-waitall.c</b>. Illustrates the use of the @ref MSG_comm_waitall function.
  */
 
 static int sender(int argc, char *argv[])
index db2d0f7..4e053e4 100644 (file)
@@ -6,7 +6,12 @@
 
 #include "simgrid/msg.h"
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_waitany, "Messages specific for this msg example");
+
+/** @addtogroup MSG_examples
+ *
+ * - <b>Wait any: async-waitany/async-waitany.c</b>. Illustrates the use of the @ref MSG_comm_waitany function.
+ */
 
 static int sender(int argc, char *argv[])
 {
index ed6c622..a716d9e 100644 (file)
@@ -9,7 +9,7 @@
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_process_kill, "Messages specific for this msg example");
 /** @addtogroup MSG_examples
  *
- *  - <b>Process Killing: process-kill/process-kill.c</b>. Processes can also be killed by another if needed thanks to
+ *  - <b>Killing: process-kill/process-kill.c</b>. Processes can also be killed by another if needed thanks to
  *    the @ref MSG_process_kill function.
  */
 
@@ -49,8 +49,6 @@ int main(int argc, char *argv[])
 
   MSG_create_environment(argv[1]);   /** - Load the platform description */
   /** - Create and deploy @ref killer process */
-  MSG_function_register("killer", killer);
-  MSG_function_register("victim", victim);
   MSG_process_create("killer", killer, NULL, MSG_host_by_name("Tremblay"));
 
   res = MSG_main();                 /** - Run the simulation */
index 7728ac9..bb37b97 100644 (file)
@@ -11,8 +11,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_process_migration, "Messages specific for this
 
 /** @addtogroup MSG_examples
  *
- *  - <b>Process Migration: process-migration/process-migration.c</b>. Processes can move or be moved from a host to
- *    another  while they are running thanks to the @ref MSG_process_migrate function.
+ *  - <b>Migration: process-migration/process-migration.c</b>. Processes can move or be moved from a host to another
+ *    while they are running thanks to the @ref MSG_process_migrate function.
  */
 
 xbt_mutex_t checkpoint = NULL;
index 0de9b4a..a738bac 100644 (file)
@@ -8,11 +8,19 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
+/** @addtogroup MSG_examples
+ *
+ *  - <b>Life-Cycle: process-startkilltime/process-startkilltime.c</b>. The <i>creation</i> and  <i>termination</i>
+ *    times of processes can be explicitly given in the deployment file (see *_d.xml files in example directory).
+ */
+
+/** Executed on process termination*/
 static int my_onexit(void* ignored1, void *ignored2) {
-  XBT_INFO("Exiting now (done sleeping or got killed).");
+  XBT_INFO("Exiting now (done sleeping or got killed)."); /** - Just display an informative message (see tesh file) */
   return 0;
 }
 
+/** Just sleep until termination */
 static int sleeper(int argc, char *argv[])
 {
   XBT_INFO("Hello! I go to sleep.");
@@ -31,11 +39,11 @@ int main(int argc, char *argv[])
   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]);
+  MSG_create_environment(argv[1]);   /** - Load the platform description */
   MSG_function_register("sleeper", sleeper);
-  MSG_launch_application(argv[2]);
+  MSG_launch_application(argv[2]);   /** - Deploy the @ref sleeper processes with explicit start/kill times */
 
-  res = MSG_main();
+  res = MSG_main();                  /** - Run the simulation */
   XBT_INFO("Simulation time %g", MSG_get_clock());
   return res != MSG_OK;
 }
index 3f60281..cdafaf1 100644 (file)
@@ -15,7 +15,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_process_suspend, "Messages specific for this ms
 /** @addtogroup MSG_examples
  *  @section MSG_ex_process Acting on Processes
  * 
- * - <b>Process Suspend/Resume: process-suspend/process-suspend.c</b>. Processes can be suspended and resumed during
+ * - <b>Suspend/Resume: process-suspend/process-suspend.c</b>. Processes can be suspended and resumed during
  *   their executions thanks to the @ref MSG_process_suspend and @ref MSG_process_resume functions.
  */
 
index 704ddc1..7f639f2 100644 (file)
@@ -6,17 +6,11 @@
 
 /** @addtogroup MSG_examples
  * 
- * - <b>tracing/categories.c</b> This is a master/worker program. The master creates tasks and send them to workers.
- * For each task received, the worker executes it and then destroys it. This program declares several tracing categories
+ * - <b>Setting Categories: trace-categories/trace-categories.c</b>. This example 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
- * --cfg=viva/categorized:viva_cat.plist
- * --cfg=viva/uncategorized:viva_uncat.plist
- * (See \ref tracing_tracing_options for details)
+ * options: <i>--cfg=tracing:yes</i>, <i>--cfg=tracing/categorized:yes</i>, <i>--cfg=tracing/uncategorized:yes</i>,
+ * <i>--cfg=viva/categorized:viva_cat.plist</i>, and <i>--cfg=viva/uncategorized:viva_uncat.plist</i>.
  */
 
 #include "simgrid/msg.h"
index c9c4503..198f153 100644 (file)
@@ -8,15 +8,10 @@
 
 /** @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.
- * 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)
+ * - <b>Routes: trace-link-srcdst-user-variables/trace-link-srcdst-user-variables.c</b>. 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, as defined in the platform file). The tracing mechanism will get the route between these two hosts, if
+ *   it is defined in the platform file, and update the variable of all the links of that route to the value provided.
  */
 
 //dump function to create and execute a task
index 5c97ac6..90d43b6 100644 (file)
@@ -8,12 +8,8 @@
 
 /** @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:
- * --cfg=tracing:yes
- * --cfg=tracing/platform:yes
- * (See \ref tracing_tracing_options for details)
+ * - <b>Links: trace-link-user-variables/trace-link-user-variables.c</b>. You need to provide the name of the link to
+ *   update the value of the variable associated to that link.
  */
 
 //dump function to create and execute a task
index 335dd09..ee5ffca 100644 (file)
@@ -6,20 +6,17 @@
 
 /** @addtogroup MSG_examples
  * 
- * - <b>tracing/ms.c</b> This is a master/worker program where the master creates tasks, send them to the workers. For
- * each task received, the worker 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
- * --cfg=viva/uncategorized:viva_uncat.plist
- * (See \ref tracing_tracing_options for details)
+ * - <b>Master/Worker: trace-masterworker/trace-masterworker.c</b> This is an augmented version of our basic
+ *   master/worker example. It 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 configuration options:
+ *   <i>--cfg=tracing/categorized:yes</i>, <i>--cfg=tracing/uncategorized:yes</i>,
+ *   <i>--cfg=viva/categorized:viva_cat.plist</i>, and <i>--cfg=viva/uncategorized:viva_uncat.plist</i>.
  */
 
 #include "simgrid/msg.h"
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(msg_trace_masterworker, "Messages specific for this msg example");
 
 static int master(int argc, char *argv[])
 {
index f5cc167..5e639c6 100644 (file)
@@ -9,13 +9,13 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace-masterworker$EXEEXT --cfg=tracing:yes --cfg=
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/uncategorized' to 'yes'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'viva/categorized' to 'trace-masterworker.cat.plist'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'viva/uncategorized' to 'trace-masterworker.uncat.plist'
-> [4.214821] [msg_test/INFO] Declared tracing categories:
-> [4.214821] [msg_test/INFO] request
-> [4.214821] [msg_test/INFO] finalize
-> [4.214821] [msg_test/INFO] report
-> [4.214821] [msg_test/INFO] compute
-> [4.214821] [msg_test/INFO] Declared marks:
-> [4.214821] [msg_test/INFO] msmark
+> [4.214821] [msg_trace_masterworker/INFO] Declared tracing categories:
+> [4.214821] [msg_trace_masterworker/INFO] request
+> [4.214821] [msg_trace_masterworker/INFO] finalize
+> [4.214821] [msg_trace_masterworker/INFO] report
+> [4.214821] [msg_trace_masterworker/INFO] compute
+> [4.214821] [msg_trace_masterworker/INFO] Declared marks:
+> [4.214821] [msg_trace_masterworker/INFO] msmark
 
 p Tracing master/worker application with xml config
 $ $SG_TEST_EXENV ${bindir:=.}/trace-masterworker$EXEEXT ${srcdir:=.}/config_tracing.xml ${srcdir:=.}/../msg/app-masterworker/app-masterworker_d.xml
@@ -26,13 +26,13 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace-masterworker$EXEEXT ${srcdir:=.}/config_trac
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'trace-masterworker.trace'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'viva/uncategorized' to 'trace-masterworker.uncat.plist'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes'
-> [4.214821] [msg_test/INFO] Declared tracing categories:
-> [4.214821] [msg_test/INFO] request
-> [4.214821] [msg_test/INFO] finalize
-> [4.214821] [msg_test/INFO] report
-> [4.214821] [msg_test/INFO] compute
-> [4.214821] [msg_test/INFO] Declared marks:
-> [4.214821] [msg_test/INFO] msmark
+> [4.214821] [msg_trace_masterworker/INFO] Declared tracing categories:
+> [4.214821] [msg_trace_masterworker/INFO] request
+> [4.214821] [msg_trace_masterworker/INFO] finalize
+> [4.214821] [msg_trace_masterworker/INFO] report
+> [4.214821] [msg_trace_masterworker/INFO] compute
+> [4.214821] [msg_trace_masterworker/INFO] Declared marks:
+> [4.214821] [msg_trace_masterworker/INFO] msmark
 
 p Not tracing master/worker application
 $ $SG_TEST_EXENV ${bindir:=.}/trace-masterworker$EXEEXT ${srcdir:=.}/small_platform.xml ${srcdir:=.}/../msg/app-masterworker/app-masterworker_d.xml
@@ -47,13 +47,13 @@ $ $SG_TEST_EXENV ${bindir:=.}/trace-masterworker$EXEEXT --cfg=tracing:yes --cfg=
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/uncategorized' to 'yes'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'viva/categorized' to 'trace-masterworker.cat.plist'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'viva/uncategorized' to 'trace-masterworker.uncat.plist'
-> [4.214821] [msg_test/INFO] Declared tracing categories:
-> [4.214821] [msg_test/INFO] request
-> [4.214821] [msg_test/INFO] finalize
-> [4.214821] [msg_test/INFO] report
-> [4.214821] [msg_test/INFO] compute
-> [4.214821] [msg_test/INFO] Declared marks:
-> [4.214821] [msg_test/INFO] msmark
+> [4.214821] [msg_trace_masterworker/INFO] Declared tracing categories:
+> [4.214821] [msg_trace_masterworker/INFO] request
+> [4.214821] [msg_trace_masterworker/INFO] finalize
+> [4.214821] [msg_trace_masterworker/INFO] report
+> [4.214821] [msg_trace_masterworker/INFO] compute
+> [4.214821] [msg_trace_masterworker/INFO] Declared marks:
+> [4.214821] [msg_trace_masterworker/INFO] msmark
 
 $ $SG_TEST_EXENV cat trace-masterworker.uncat.plist
 >   node = ("HOST","LINK");
index 6cb9d80..0ca692d 100644 (file)
@@ -6,11 +6,9 @@
 
 /** @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:
- * --cfg=tracing:yes
- * --cfg=tracing/categorized:yes
- * (See \ref tracing_tracing_options for details)
+ * - <b>Tracing the platform: trace-platform/trace-platform.c</b>. This example just loads a platform file to
+ *  demonstrate how it can be traced into the Paje trace file format. You might want to run this program with the
+ *  following options: <i>--cfg=tracing:yes</i> and <i>--cfg=tracing/categorized:yes</i>.
  */
 
 #include "simgrid/msg.h"
index 13f3955..bcf83c2 100644 (file)
@@ -6,12 +6,10 @@
 
 /** @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:
- * --cfg=tracing:yes
- * --cfg=tracing/msg/process:yes
- * (See \ref tracing_tracing_options for details)
+ * - <b>Process migration: trace-process-migration/trace-process-migration.c</b>. Running this program with the
+ *   <i>--cfg=tracing:yes</i> and <i>--cfg=tracing/msg/process:yes</i> options  enables a Gantt-chart visualization of
+ *   where the process has been hosted during its execution. Migrations are represented by arrows from the origin to
+ *   the destination host.
  */
 
 #include "simgrid/msg.h"
index 27a08aa..20b1395 100644 (file)
@@ -8,12 +8,11 @@
 
 /** @addtogroup MSG_examples
  * 
- * @section MSG_ex_tracing Tracing and vizualisation features
- * 
- * - <b>tracing/simple.c</b> very simple program where each process creates, executes and destroy a task. You might want
- *  to run this program with the following parameters:
- *   --cfg=tracing/uncategorized:yes
- *   (See \ref tracing_tracing_options for details)
+ * @section MSG_ex_tracing Tracing and visualization features
+ * Tracing can be activated by various configuration options which are illustrated in these example.
+ * See \ref tracing_tracing_options for details.
+ * - <b>Basic example: trace-simple/trace-simple.c</b>. In this very simple program, each process creates, executes,
+ *   and destroy a task. You might want to run it with the <i>--cfg=tracing/uncategorized:yes</i> option.
  */
 
 static int simple_func(int argc, char *argv[])
index 3510047..31b32a6 100644 (file)
@@ -5,12 +5,14 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /** @addtogroup MSG_examples
+ *
+ * @section MSG_ex_tracing_user_variables Tracing user variables
+ * The tracing mechanism of SimGrid also allows to associate user variables to resources described in the platform file.
+ * The following examples illustrate this feature. They have to be run with the <i>--cfg=tracing:yes</i> and
+ * <i>--cfg=tracing/platform:yes</i> options.
  * 
- * - <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)
+ * - <b>Hosts: trace-user-variables/trace-user-variables.c</b>. This example shows how user defined variables can be
+ *   associated to an host and how to manage the tracing of their evolution.
  */
 #include <stdio.h>
 #include "simgrid/msg.h"
index eb5a4ed..9631147 100644 (file)
@@ -2,7 +2,7 @@
 ! setenv LD_LIBRARY_PATH=../../lib
 
 p Test allreduce
-$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error --cfg=smpi/allreduce:automatic --cfg=smpi/async_small_thresh:65536 --cfg=smpi/send_is_detached_thresh:128000 --cfg=smpi/running_power:-1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error --cfg=smpi/allreduce:automatic --cfg=smpi/async_small_thresh:65536 --cfg=smpi/send_is_detached_thresh:128000 --cfg=smpi/cpu_threshold:-1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
 > [rank 0] -> Tremblay
 > [rank 1] -> Tremblay
 > [rank 2] -> Tremblay
@@ -19,22 +19,22 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ..
 > [rank 13] -> Ginette
 > [rank 14] -> Ginette
 > [rank 15] -> Ginette
-> [  0.420156] (8:7@Jupiter) The quickest allreduce was redbcast on rank 7 and took 0.007545
-> [  0.420156] (5:4@Jupiter) The quickest allreduce was redbcast on rank 4 and took 0.007484
-> [  0.420156] (7:6@Jupiter) The quickest allreduce was redbcast on rank 6 and took 0.007514
-> [  0.420156] (6:5@Jupiter) The quickest allreduce was redbcast on rank 5 and took 0.007514
-> [  0.420368] (14:13@Ginette) The quickest allreduce was mvapich2_two_level on rank 13 and took 0.007278
-> [  0.420368] (13:12@Ginette) The quickest allreduce was mvapich2_two_level on rank 12 and took 0.007247
-> [  0.420368] (16:15@Ginette) The quickest allreduce was ompi on rank 15 and took 0.007263
-> [  0.420368] (15:14@Ginette) The quickest allreduce was mvapich2_two_level on rank 14 and took 0.007278
-> [  0.421760] (2:1@Tremblay) The quickest allreduce was redbcast on rank 1 and took 0.006005
-> [  0.421760] (3:2@Tremblay) The quickest allreduce was redbcast on rank 2 and took 0.006005
-> [  0.421760] (4:3@Tremblay) The quickest allreduce was redbcast on rank 3 and took 0.006036
-> [  0.422911] (12:11@Fafard) The quickest allreduce was mvapich2_two_level on rank 11 and took 0.006523
-> [  0.422911] (10:9@Fafard) The quickest allreduce was mvapich2_two_level on rank 9 and took 0.006492
-> [  0.422911] (9:8@Fafard) The quickest allreduce was mvapich2_two_level on rank 8 and took 0.006462
-> [  0.422911] (11:10@Fafard) The quickest allreduce was mvapich2_two_level on rank 10 and took 0.006492
-> [  0.426896] (1:0@Tremblay) For rank 0, the quickest was redbcast : 0.005990 , but global was mvapich2_two_level : 0.008672 at max
+> [  0.420171] (8:7@Jupiter) The quickest allreduce was redbcast on rank 7 and took 0.007545
+> [  0.420171] (5:4@Jupiter) The quickest allreduce was redbcast on rank 4 and took 0.007484
+> [  0.420171] (7:6@Jupiter) The quickest allreduce was redbcast on rank 6 and took 0.007514
+> [  0.420171] (6:5@Jupiter) The quickest allreduce was redbcast on rank 5 and took 0.007514
+> [  0.420383] (14:13@Ginette) The quickest allreduce was mvapich2_two_level on rank 13 and took 0.007278
+> [  0.420383] (13:12@Ginette) The quickest allreduce was mvapich2_two_level on rank 12 and took 0.007247
+> [  0.420383] (16:15@Ginette) The quickest allreduce was ompi on rank 15 and took 0.007263
+> [  0.420383] (15:14@Ginette) The quickest allreduce was mvapich2_two_level on rank 14 and took 0.007278
+> [  0.421775] (2:1@Tremblay) The quickest allreduce was redbcast on rank 1 and took 0.006005
+> [  0.421775] (3:2@Tremblay) The quickest allreduce was redbcast on rank 2 and took 0.006005
+> [  0.421775] (4:3@Tremblay) The quickest allreduce was redbcast on rank 3 and took 0.006036
+> [  0.422926] (12:11@Fafard) The quickest allreduce was mvapich2_two_level on rank 11 and took 0.006523
+> [  0.422926] (10:9@Fafard) The quickest allreduce was mvapich2_two_level on rank 9 and took 0.006492
+> [  0.422926] (9:8@Fafard) The quickest allreduce was mvapich2_two_level on rank 8 and took 0.006462
+> [  0.422926] (11:10@Fafard) The quickest allreduce was mvapich2_two_level on rank 10 and took 0.006492
+> [  0.426911] (1:0@Tremblay) For rank 0, the quickest was redbcast : 0.005990 , but global was mvapich2_two_level : 0.008672 at max
 > [0] sndbuf=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
 > [1] sndbuf=[16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ]
 > [2] sndbuf=[32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 ]