1 /** @addtogroup MSG_API
3 \section MSG_funct Offered functionnalities
4 - \ref m_process_management
5 - \ref m_datatypes_management
6 - \ref m_host_management
7 - \ref m_task_management
8 - \ref msg_gos_functions
9 - \ref m_channel_management
10 - \ref msg_easier_life
13 \section MSG_examples Examples of MSG
15 - \ref MSG_ex_master_slave
18 /** @defgroup m_datatypes_management MSG Data Types
20 @brief This section describes the different datatypes provided by MSG.
22 \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Data types" --> \endhtmlonly
24 /** \addtogroup m_process_management
26 /** \addtogroup m_host_management
28 /** \addtogroup m_task_management
30 /** \addtogroup msg_gos_functions
32 /** \addtogroup m_channel_management
34 /** \addtogroup msg_easier_life
36 /** \addtogroup msg_simulation
39 /** \page MSG_ex_master_slave Master/slave application
41 <center>[\ref MSG_API]</center>
43 Simulation of a master-slave application using a realistic platform and
44 an external description of the deployment.
46 \section MSG_ex_ms_TOC Table of contents:
48 - \ref MSG_ext_ms_code
49 - \ref MSG_ext_ms_preliminary
50 - \ref MSG_ext_ms_master
51 - \ref MSG_ext_ms_slave
52 - \ref MSG_ext_ms_forwarder
53 - \ref MSG_ext_ms_core
54 - \ref MSG_ext_ms_main
55 - \ref MSG_ext_ms_helping
56 - \ref MSG_ext_ms_application
57 - \ref MSG_ext_ms_platform
61 \dontinclude msg/masterslave/masterslave_forwarder.c
63 \section MSG_ext_ms_code Code of the application
65 \subsection MSG_ext_ms_preliminary Preliminary declarations
71 \subsection MSG_ext_ms_master Master code
73 This function has to be assigned to a m_process_t that will behave as the master.
74 It should not be called directly but either given as a parameter to
75 #MSG_process_create() or registered as a public function through
76 #MSG_function_register() and then automatically assigned to a process through
77 #MSG_launch_application().
79 C style arguments (argc/argv) are interpreted as:
80 - the number of tasks to distribute
81 - the computation size of each task
82 - the size of the files associated to each task
83 - a list of host that will accept those tasks.
85 Tasks are dumbly sent in a round-robin style.
89 \subsection MSG_ext_ms_slave Slave code
91 This function has to be assigned to a #m_process_t that has to behave as a slave.
92 Just like the master fuction (described in \ref MSG_ext_ms_master), it should not be called directly.
94 This function keeps waiting for tasks and executes them as it receives them.
98 \subsection MSG_ext_ms_forwarder Forwarder code
100 This function has to be assigned to a #m_process_t that has to behave as a forwarder.
101 Just like the master fuction (described in \ref MSG_ext_ms_master), it should not be called directly.
103 C style arguments (argc/argv) are interpreted as a list of host
104 that will accept those tasks.
106 This function keeps waiting for tasks and dispathes them to its slaves.
108 \until end_of_forwarder
110 \subsection MSG_ext_ms_core Simulation core
112 This function is the core of the simulation and is divided only into 3 parts
113 thanks to MSG_create_environment() and MSG_launch_application().
114 -# Simulation settings : MSG_create_environment() creates a realistic
116 -# Application deployment : create the agents on the right locations with
117 MSG_launch_application()
118 -# The simulation is run with #MSG_main()
121 - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.
122 - <i>application_file</i>: the name of a file containing a valid surfxml application description
124 \until end_of_test_all
126 \subsection MSG_ext_ms_main Main() function
128 This initializes MSG, runs a simulation, and free all data-structures created by MSG.
132 \section MSG_ext_ms_helping Helping files
134 \subsection MSG_ext_ms_application Example of application file
136 \include msg/masterslave/deployment_masterslave.xml
138 \subsection MSG_ext_ms_platform Example of platform file
140 \include msg/small_platform.xml