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
47 \section MSG_funct Offered functionnalities
48 - \ref m_process_management
49 - \ref m_datatypes_management
50 - \ref m_host_management
51 - \ref m_task_management
52 - \ref msg_gos_functions
53 - \ref m_channel_management
54 - \ref msg_easier_life
57 \section MSG_examples Examples of MSG
59 - \ref MSG_ex_master_slave
62 /** @defgroup m_datatypes_management MSG Data Types
64 @brief This section describes the different datatypes provided by MSG.
66 \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Data types" --> \endhtmlonly
68 /** \addtogroup m_process_management
70 /** \addtogroup m_host_management
72 /** \addtogroup m_task_management
74 /** \addtogroup msg_gos_functions
76 /** \addtogroup m_channel_management
78 /** \addtogroup msg_easier_life
80 /** \addtogroup msg_simulation
83 /** \page MSG_ex_master_slave Master/slave application
85 Simulation of a master-slave application using a realistic platform and
86 an external description of the deployment.
88 \section MSG_ex_ms_TOC Table of contents:
90 - \ref MSG_ext_ms_code
91 - \ref MSG_ext_ms_preliminary
92 - \ref MSG_ext_ms_master
93 - \ref MSG_ext_ms_slave
94 - \ref MSG_ext_ms_forwarder
95 - \ref MSG_ext_ms_core
96 - \ref MSG_ext_ms_main
97 - \ref MSG_ext_ms_helping
98 - \ref MSG_ext_ms_application
99 - \ref MSG_ext_ms_platform
103 \dontinclude msg/masterslave/masterslave_forwarder.c
105 \section MSG_ext_ms_code Code of the application
107 \subsection MSG_ext_ms_preliminary Preliminary declarations
113 \subsection MSG_ext_ms_master Master code
115 This function has to be assigned to a m_process_t that will behave as the master.
116 It should not be called directly but either given as a parameter to
117 #MSG_process_create() or registered as a public function through
118 #MSG_function_register() and then automatically assigned to a process through
119 #MSG_launch_application().
121 C style arguments (argc/argv) are interpreted as:
122 - the number of tasks to distribute
123 - the computation size of each task
124 - the size of the files associated to each task
125 - a list of host that will accept those tasks.
127 Tasks are dumbly sent in a round-robin style.
131 \subsection MSG_ext_ms_slave Slave code
133 This function has to be assigned to a #m_process_t that has to behave as a slave.
134 Just like the master fuction (described in \ref MSG_ext_ms_master), it should not be called directly.
136 This function keeps waiting for tasks and executes them as it receives them.
140 \subsection MSG_ext_ms_forwarder Forwarder code
142 This function has to be assigned to a #m_process_t that has to behave as a forwarder.
143 Just like the master fuction (described in \ref MSG_ext_ms_master), it should not be called directly.
145 C style arguments (argc/argv) are interpreted as a list of host
146 that will accept those tasks.
148 This function keeps waiting for tasks and dispathes them to its slaves.
150 \until end_of_forwarder
152 \subsection MSG_ext_ms_core Simulation core
154 This function is the core of the simulation and is divided only into 3 parts
155 thanks to MSG_create_environment() and MSG_launch_application().
156 -# Simulation settings : MSG_create_environment() creates a realistic
158 -# Application deployment : create the agents on the right locations with
159 MSG_launch_application()
160 -# The simulation is run with #MSG_main()
163 - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.
164 - <i>application_file</i>: the name of a file containing a valid surfxml application description
166 \until end_of_test_all
168 \subsection MSG_ext_ms_main Main() function
170 This initializes MSG, runs a simulation, and free all data-structures created by MSG.
174 \section MSG_ext_ms_helping Helping files
176 \subsection MSG_ext_ms_application Example of application file
178 \include msg/masterslave/deployment_masterslave.xml
180 \subsection MSG_ext_ms_platform Example of platform file
182 \include msg/small_platform.xml