which is full of all possible illnesses ...
###################################################
INPUT += @CMAKE_HOME_DIRECTORY@/examples/msg/sendrecv/sendrecv.c \
###################################################
INPUT += @CMAKE_HOME_DIRECTORY@/examples/msg/sendrecv/sendrecv.c \
- @CMAKE_HOME_DIRECTORY@/examples/msg/masterslave/masterslave_forwarder.c \
- @CMAKE_HOME_DIRECTORY@/examples/msg/migration \
- @CMAKE_HOME_DIRECTORY@/examples/msg/suspend \
+ @CMAKE_HOME_DIRECTORY@/examples/msg/app-masterworker/app-masterworker.c \
+ @CMAKE_HOME_DIRECTORY@/examples/msg/process-migration/process-migration.c \
+ @CMAKE_HOME_DIRECTORY@/examples/msg/process-suspend/process-suspend.c \
@CMAKE_HOME_DIRECTORY@/examples/msg/properties \
@CMAKE_HOME_DIRECTORY@/examples/msg/parallel_task \
@CMAKE_HOME_DIRECTORY@/examples/msg/priority \
@CMAKE_HOME_DIRECTORY@/examples/msg/properties \
@CMAKE_HOME_DIRECTORY@/examples/msg/parallel_task \
@CMAKE_HOME_DIRECTORY@/examples/msg/priority \
\skipline Receiver function
\until end_of_receiver
\skipline Receiver function
\until end_of_receiver
-\subsubsection MSG_ex_master_slave Basic Master/Slaves
+\subsubsection MSG_ex_master_worker Basic Master/Workers
-Simulation of a master-slave application using a realistic platform
-and an external description of the deployment.
+Simulation of a master-worker application using a realistic platform and an external description of the deployment.
-\paragraph MSG_ex_ms_TOC Table of contents:
+\paragraph MSG_ex_mw_TOC Table of contents:
- - \ref MSG_ext_ms_preliminary
+ - \ref MSG_ext_mw_preliminary
- \ref MSG_ext_ms_master
- \ref MSG_ext_ms_slave
- \ref MSG_ext_ms_forwarder
- \ref MSG_ext_ms_master
- \ref MSG_ext_ms_slave
- \ref MSG_ext_ms_forwarder
-\dontinclude msg/masterslave/masterslave_forwarder.c
+\dontinclude msg/app-masterworker/app-masterworker.c
-
-\paragraph MSG_ext_ms_preliminary Preliminary declarations
+\paragraph MSG_ext_mw_preliminary Preliminary declarations
\skip include
\until printf
\skip include
\until printf
typedef struct {
int last_Irecv_sender_id;
int bcast_counter;
typedef struct {
int last_Irecv_sender_id;
int bcast_counter;
- int reduce_counter;
- int allReduce_counter;
xbt_dynar_t isends; /* of msg_comm_t */
/* Used to implement irecv+wait */
xbt_dynar_t irecvs; /* of msg_comm_t */
xbt_dynar_t isends; /* of msg_comm_t */
/* Used to implement irecv+wait */
xbt_dynar_t irecvs; /* of msg_comm_t */
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");
+/** @addtogroup MSG_examples
+ *
+ * - <b>app-masterworker/app-masterworker.c: Master/workers example</b>. This good old example is also very simple. Its
+ * basic version is fully commented on this page: \ref MSG_ex_master_worker.
+ */
+
static int master(int argc, char *argv[])
{
long number_of_tasks = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s");
static int master(int argc, char *argv[])
{
long number_of_tasks = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s");
/** @addtogroup MSG_examples
*
/** @addtogroup MSG_examples
*
- * - <b>migration/migration.c</b> Demonstrates how to use the @ref MSG_process_migrate function to let processes
- * change the host they run on after their start.
+ * - <b>process-migration/process-migration.c: Process migration example</b>. Demonstrates how to use the
+ * @ref MSG_process_migrate function to let processes change the host they run on after their start.
*/
xbt_mutex_t mutex = NULL;
*/
xbt_mutex_t mutex = NULL;
/** @addtogroup MSG_examples
*
/** @addtogroup MSG_examples
*
- * - <b>suspend/suspend.c</b>: Demonstrates how to suspend and resume processes using
- * @ref MSG_process_suspend and @ref MSG_process_resume.
+ * - <b>process-suspend/process-suspend.c: Process Suspend/Resume example</b>. Demonstrates how to suspend and resume
+ * processes using the @ref MSG_process_suspend and @ref MSG_process_resume functions.
*/
/** Lazy guy function. This process suspends itself asap. */
*/
/** Lazy guy function. This process suspends itself asap. */
XBT_INFO("Mmmh, goodbye now.");
return 0;
XBT_INFO("Mmmh, goodbye now.");
return 0;
/** Dream master function. This process creates a lazy_guy process and resumes it 10 seconds later. */
static int dream_master(int argc, char *argv[])
/** Dream master function. This process creates a lazy_guy process and resumes it 10 seconds later. */
static int dream_master(int argc, char *argv[])