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 use
15 - \ref MSG_ex_master_slave
18 /** @defgroup m_datatypes_management MSG Data Types
19 @brief This section describes the different datatypes provided by MSG.
21 /** \addtogroup m_process_management
23 /** \addtogroup m_host_management
25 /** \addtogroup m_task_management
27 /** \addtogroup msg_gos_functions
29 /** \addtogroup m_channel_management
31 /** \addtogroup msg_easier_life
33 /** \addtogroup msg_simulation
36 /** \page MSG_ex_master_slave Master/slave application
38 <center>[\ref MSG_API]</center>
40 Simulation of a master-slave application using a realistic platform and
41 an external description of the deployment.
43 \section MSG_ex_ms_TOC Table of contents:
45 - \ref MSG_ext_ms_code
46 - \ref MSG_ext_ms_preliminary
47 - \ref MSG_ext_ms_master
48 - \ref MSG_ext_ms_slave
49 - \ref MSG_ext_ms_forwarder
50 - \ref MSG_ext_ms_core
51 - \ref MSG_ext_ms_main
52 - \ref MSG_ext_ms_helping
53 - \ref MSG_ext_ms_application
54 - \ref MSG_ext_ms_platform
58 \dontinclude msg/msg_test.c
60 \section MSG_ext_ms_code Code of the application
62 \subsection MSG_ext_ms_preliminary Preliminary declarations
68 \subsection MSG_ext_ms_master Master code
70 This function has to be assigned to a m_process_t that will behave as the master.
71 It should not be called directly but either given as a parameter to
72 #MSG_process_create() or registered as a public function through
73 #MSG_function_register() and then automatically assigned to a process through
74 #MSG_launch_application().
76 C style arguments (argc/argv) are interpreted as:
77 - the number of tasks to distribute
78 - the computation size of each task
79 - the size of the files associated to each task
80 - a list of host that will accept those tasks.
82 Tasks are dumbly sent in a round-robin style.
86 \subsection MSG_ext_ms_slave Slave code
88 This function has to be assigned to a #m_process_t that has to behave as a slave.
89 Just like #master(), it should not be called directly.
91 This function keeps waiting for tasks and executes them as it receives them.
95 \subsection MSG_ext_ms_forwarder Forwarder code
97 This function has to be assigned to a #m_process_t that has to behave as a forwarder.
98 Just like #master(), it should not be called directly.
100 C style arguments (argc/argv) are interpreted as a list of host
101 that will accept those tasks.
103 This function keeps waiting for tasks and dispathes them to its slaves.
105 \subsection MSG_ext_ms_core Simulation core
107 This function is the core of the simulation and is divided only into 3 parts
108 thanks to MSG_create_environment() and MSG_launch_application().
109 -# Simulation settings : MSG_create_environment() creates a realistic
111 -# Application deployment : create the agents on the right locations with
112 MSG_launch_application()
113 -# The simulation is run with #MSG_main()
116 - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.
117 - <i>application_file</i>: the name of a file containing a valid surfxml application description
119 \until end_of_test_all
121 \subsection MSG_ext_ms_main Main() function
123 This initializes MSG, runs a simulation, and free all data-structures created by MSG.
127 \section MSG_ext_ms_helping Helping files
129 \subsection MSG_ext_ms_application Example of application file
131 \include msg/small_deployment.xml
133 \subsection MSG_ext_ms_platform Example of platform file
135 \include msg/small_platform.xml