Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 15 Apr 2016 19:13:18 +0000 (21:13 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Fri, 15 Apr 2016 19:13:18 +0000 (21:13 +0200)
doc/Doxyfile.in
doc/doxygen/examples.doc
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

index 982db2c..12601ad 100644 (file)
@@ -704,9 +704,7 @@ INPUT +=                 @CMAKE_HOME_DIRECTORY@/examples/msg/app-pingpong/app-pi
                          @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 \
@@ -720,7 +718,10 @@ INPUT +=                 @CMAKE_HOME_DIRECTORY@/examples/msg/app-pingpong/app-pi
                          @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 ed6c622..e345301 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.
  */
 
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.
  */