Logo AND Algorithmique Numérique Distribuée

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