Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This file was recently added and is missing from the tarballs
[simgrid.git] / doc / module-msg.doc
1 /** @addtogroup MSG_API 
2
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
11    - \ref msg_simulation
12
13   \section MSG_examples Examples of use
14  
15    - \ref MSG_ex_master_slave
16 */
17
18 /** @defgroup m_datatypes_management MSG Data Types 
19     @ingroup MSG_API
20     @brief This section describes the different datatypes provided by MSG.
21     \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Data types" --> \endhtmlonly
22 */
23 /**     \addtogroup m_process_management
24         \ingroup MSG_API  */
25 /**     \addtogroup m_host_management
26         \ingroup MSG_API  */
27 /**     \addtogroup m_task_management
28         \ingroup MSG_API  */
29 /**     \addtogroup msg_gos_functions
30         \ingroup MSG_API  */
31 /**     \addtogroup m_channel_management
32         \ingroup MSG_API  */
33 /**     \addtogroup msg_easier_life
34         \ingroup MSG_API  */
35 /**     \addtogroup msg_simulation
36         \ingroup MSG_API  */
37
38 /** \page MSG_ex_master_slave Master/slave application
39
40     <center>[\ref MSG_API]</center>
41     
42     Simulation of a master-slave application using a realistic platform and
43     an external description of the deployment. 
44
45     \section MSG_ex_ms_TOC Table of contents:
46     
47      - \ref MSG_ext_ms_code
48        - \ref MSG_ext_ms_preliminary
49        - \ref MSG_ext_ms_master
50        - \ref MSG_ext_ms_slave
51        - \ref MSG_ext_ms_forwarder
52        - \ref MSG_ext_ms_core
53        - \ref MSG_ext_ms_main
54      - \ref MSG_ext_ms_helping
55        - \ref MSG_ext_ms_application 
56        - \ref MSG_ext_ms_platform
57      
58     <hr> 
59     
60     \dontinclude msg/msg_test.c
61     
62     \section MSG_ext_ms_code Code of the application
63     
64     \subsection MSG_ext_ms_preliminary Preliminary declarations
65     
66     \skip include
67     \until printf
68     \until }
69     
70     \subsection MSG_ext_ms_master Master code
71     
72       This function has to be assigned to a m_process_t that will behave as the master.
73       It should not be called directly but either given as a parameter to
74       #MSG_process_create() or registered as a public function through 
75       #MSG_function_register() and then automatically assigned to a process through
76       #MSG_launch_application().
77  
78       C style arguments (argc/argv) are interpreted as:
79        - the number of tasks to distribute
80        - the computation size of each task
81        - the size of the files associated to each task
82        - a list of host that will accept those tasks.
83
84       Tasks are dumbly sent in a round-robin style.
85       
86       \until end_of_master
87     
88     \subsection MSG_ext_ms_slave Slave code
89     
90       This function has to be assigned to a #m_process_t that has to behave as a slave.
91       Just like the master fuction (described in \ref MSG_ext_ms_master), it should not be called directly.
92
93       This function keeps waiting for tasks and executes them as it receives them.
94       
95       \until end_of_slave
96
97    \subsection MSG_ext_ms_forwarder Forwarder code
98    
99       This function has to be assigned to a #m_process_t that has to behave as a forwarder.
100       Just like the master fuction (described in \ref MSG_ext_ms_master), it should not be called directly.
101
102       C style arguments (argc/argv) are interpreted as a list of host
103       that will accept those tasks.
104
105       This function keeps waiting for tasks and dispathes them to its slaves.
106
107    \subsection MSG_ext_ms_core Simulation core
108
109       This function is the core of the simulation and is divided only into 3 parts
110       thanks to MSG_create_environment() and MSG_launch_application().
111          -# Simulation settings : MSG_create_environment() creates a realistic 
112             environment
113          -# Application deployment : create the agents on the right locations with  
114             MSG_launch_application()
115          -# The simulation is run with #MSG_main()
116          
117       Its arguments are:
118         - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.
119         - <i>application_file</i>: the name of a file containing a valid surfxml application description
120         
121       \until end_of_test_all
122       
123    \subsection MSG_ext_ms_main Main() function
124    
125       This initializes MSG, runs a simulation, and free all data-structures created by MSG.
126       
127       \until end_of_main
128
129    \section MSG_ext_ms_helping Helping files
130
131    \subsection MSG_ext_ms_application Example of application file
132
133    \include msg/small_deployment.xml
134
135    \subsection MSG_ext_ms_platform Example of platform file
136    
137    \include msg/small_platform.xml
138    
139 */