1 /** \defgroup MSG_JAVA jMSG
3 \brief Java bindings to MSG (\ref MSG_API)
6 DOXYGEN_NAVBAR_LABEL="JAVA bindings"
7 DOXYGEN_NAVBAR_CHILD "Simulation functions"=classsimgrid_1_1msg_1_1Msg.html
8 DOXYGEN_NAVBAR_CHILD "Host"=classsimgrid_1_1msg_1_1Host.html
9 DOXYGEN_NAVBAR_CHILD "Process"=classsimgrid_1_1msg_1_1Process.html
10 DOXYGEN_NAVBAR_CHILD "Task"=classsimgrid_1_1msg_1_1Task.html
11 DOXYGEN_NAVBAR_CHILD "MsgException"=classsimgrid_1_1msg_1_1MsgException.html
14 MSG was the first distributed programming environment provided within
15 SimGrid. While almost realistic, it remains quite simple (simplistic?).
16 This describes the Java bindings to this interface.
18 \section jMSG_who Who should use this (and who shouldn't)
20 You should use MSG if you want to study some heuristics for a
21 given problem you don't really want to implement. If you want to
22 use the Java programming language, your are in the right
23 section. To use the C interface, please refer to \ref MSG_C.
26 /** \defgroup MSG_C MSG native
28 \brief Native interface to MSG (\ref MSG_API)
30 \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Native interface" --> \endhtmlonly
32 MSG was the first distributed programming environment provided within
33 SimGrid. While almost realistic, it remains quite simple (simplistic?).
34 This describes the native to MSG.
36 \section jMSG_who Who should use this (and who shouldn't)
38 You should use MSG if you want to study some heuristics for a
39 given problem you don't really want to implement. If you want to
40 use the C programming language, your are in the right
41 section. To use the Java programming interface, please refer to
48 \defgroup MSG_LUA lMSG
50 \brief Lua bindings to MSG (\ref MSG_API)
53 DOXYGEN_NAVBAR_LABEL="LUA bindings"
56 MSG was the first distributed programming environment provided within
57 SimGrid. While almost realistic, it remains quite simple (simplistic?).
58 This describes the Lua bindings to this interface.
60 \section lMSG_who Who should use this (and who shouldn't)
62 You should use MSG if you want to study some heuristics for a
63 given problem you don't really want to implement. If you want to
64 use the Lua script language, your are in the right
65 section. To use the C interface, please refer to \ref MSG_C.
71 \section MSG_funct Offered functionnalities
72 - \ref m_process_management
73 - \ref m_datatypes_management
74 - \ref m_host_management
75 - \ref m_task_management
76 - \ref msg_gos_functions
77 - \ref m_channel_management
78 - \ref msg_easier_life
81 \section MSG_examples Examples of MSG
83 - \ref MSG_ex_master_slave
86 /** @addtogroup MSG_LUA
88 \section MSG_Lua_funct Lua offered functionnalities in MSG
89 - \ref host_management
90 - \ref tasks_management
91 - \ref environment_management
92 \section Lua_examples Examples of lua MSG
94 - \ref MSG_ex_master_slave_lua
98 /** @defgroup m_datatypes_management MSG Data Types
100 @brief This section describes the different datatypes provided by MSG.
102 \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Data types" --> \endhtmlonly
104 /** \addtogroup m_process_management
106 /** \addtogroup m_host_management
108 /** \addtogroup m_task_management
110 /** \addtogroup msg_gos_functions
112 /** \addtogroup m_channel_management
114 /** \addtogroup msg_easier_life
116 /** \addtogroup msg_simulation
119 /** \page MSG_ex_master_slave Master/slave application
121 Simulation of a master-slave application using a realistic platform and
122 an external description of the deployment.
124 \section MSG_ex_ms_TOC Table of contents:
126 - \ref MSG_ext_ms_code
127 - \ref MSG_ext_ms_preliminary
128 - \ref MSG_ext_ms_master
129 - \ref MSG_ext_ms_slave
130 - \ref MSG_ext_ms_forwarder
131 - \ref MSG_ext_ms_core
132 - \ref MSG_ext_ms_main
133 - \ref MSG_ext_ms_helping
134 - \ref MSG_ext_ms_application
135 - \ref MSG_ext_ms_platform
139 \dontinclude msg/masterslave/masterslave_forwarder.c
141 \section MSG_ext_ms_code Code of the application
143 \subsection MSG_ext_ms_preliminary Preliminary declarations
149 \subsection MSG_ext_ms_master Master code
151 This function has to be assigned to a m_process_t that will behave as the master.
152 It should not be called directly but either given as a parameter to
153 #MSG_process_create() or registered as a public function through
154 #MSG_function_register() and then automatically assigned to a process through
155 #MSG_launch_application().
157 C style arguments (argc/argv) are interpreted as:
158 - the number of tasks to distribute
159 - the computation size of each task
160 - the size of the files associated to each task
161 - a list of host that will accept those tasks.
163 Tasks are dumbly sent in a round-robin style.
167 \subsection MSG_ext_ms_slave Slave code
169 This function has to be assigned to a #m_process_t that has to behave as a slave.
170 Just like the master fuction (described in \ref MSG_ext_ms_master), it should not be called directly.
172 This function keeps waiting for tasks and executes them as it receives them.
176 \subsection MSG_ext_ms_forwarder Forwarder code
178 This function has to be assigned to a #m_process_t that has to behave as a forwarder.
179 Just like the master function (described in \ref MSG_ext_ms_master), it should not be called directly.
181 C style arguments (argc/argv) are interpreted as a list of host
182 that will accept those tasks.
184 This function keeps waiting for tasks and dispathes them to its slaves.
186 \until end_of_forwarder
188 \subsection MSG_ext_ms_core Simulation core
190 This function is the core of the simulation and is divided only into 3 parts
191 thanks to MSG_create_environment() and MSG_launch_application().
192 -# Simulation settings : MSG_create_environment() creates a realistic
194 -# Application deployment : create the agents on the right locations with
195 MSG_launch_application()
196 -# The simulation is run with #MSG_main()
199 - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.
200 - <i>application_file</i>: the name of a file containing a valid surfxml application description
202 \until end_of_test_all
204 \subsection MSG_ext_ms_main Main() function
206 This initializes MSG, runs a simulation, and free all data-structures created by MSG.
210 \section MSG_ext_ms_helping Helping files
212 \subsection MSG_ext_ms_application Example of application file
214 \include msg/masterslave/deployment_masterslave.xml
216 \subsection MSG_ext_ms_platform Example of platform file
218 \include msg/small_platform.xml
222 /** \page MSG_ex_master_slave_lua Master/slave Lua application
224 Simulation of a master-slave application using lua bindings
225 - \ref MSG_ext_ms_code_lua
226 - \ref MSG_ext_ms_master_lua
227 - \ref MSG_ext_ms_slave_lua
228 - \ref MSG_ext_ms_core_lua
230 - \ref MSG_ext_ms_helping
231 - \ref MSG_ext_ms_application
232 - \ref MSG_ext_ms_platform
235 \dontinclude lua/master_slave.lua
237 \section MSG_ext_ms_code_lua Code of the application
239 \subsection MSG_ext_ms_master_lua Master code
241 as described ine the C native master/Slave exmaple , this function has to be assigned to a m_process_t that will behave as the master.
243 Lua style arguments (...) in for the master are interpreted as:
244 - the number of tasks to distribute
245 - the computation size of each task
246 - the size of the files associated to each task
247 - a list of host that will accept those tasks.
249 Tasks are dumbly sent in a round-robin style.
254 \subsection MSG_ext_ms_slave_lua Slave code
256 This function has to be assigned to a #m_process_t that has to behave as a slave.
257 This function keeps waiting for tasks and executes them as it receives them.
260 \subsection MSG_ext_ms_core_lua Simulation core
262 in this section the core of the simulation which start by including the simgrid lib for bindings
263 : <i>require "simgrid" </i>
265 -# Simulation settings : <i>simgrid.platform</i> creates a realistic
267 -# Application deployment : create the agents on the right locations with
268 <i>simgrid.application</i>
269 -# The simulation is run with <i>simgrid.run</i>
272 - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.( first command line argument)
273 - <i>application_file</i>: the name of a file containing a valid surfxml application description ( second commande line argument )
275 \until simgrid.clean()