X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7d8d2388509cb9a579d70b91b9a512e882132558..51c662a52164350714ff979ff89de9f9ea25410d:/doc/module-msg.doc diff --git a/doc/module-msg.doc b/doc/module-msg.doc index 48e199228c..7c7eec6508 100644 --- a/doc/module-msg.doc +++ b/doc/module-msg.doc @@ -82,6 +82,7 @@ - \ref MSG_ex_master_slave - \ref MSG_ex_asynchronous_communications + - \ref MSG_ex_master_slave_scrip_lua */ /** @addtogroup MSG_LUA @@ -118,6 +119,7 @@ /** \addtogroup msg_simulation \ingroup MSG_C */ + /** \page MSG_ex_asynchronous_communications Asynchronous communication applications Simulation of asynchronous communications between a sender and a receiver using a realistic platform and @@ -130,7 +132,8 @@ - \ref MSG_ext_icomms_Receiver - \ref MSG_ext_icomms_core - \ref MSG_ext_icomms_Main - - \ref MSG_ext_icomms_fct + - \ref MSG_ext_icomms_fct_Waitall + - \ref MSG_ext_icomms_fct_Waitany
@@ -199,13 +202,111 @@ \dontinclude msg/icomms/peer2.c - \section MSG_ext_icomms_fct Waitall function for sender + \section MSG_ext_icomms_fct_Waitall Waitall function for sender The use of this function permit to send all messages and wait for the completion of all in one time. \skipline Sender function \until end_of_sender + \section MSG_ext_icomms_fct_Waitany Waitany function + + The MSG_comm_waitany() function return the place of the first message send or receive from a xbt_dynar_t table. + + \subsection MSG_ext_icomms_fct_Waitany_sender From a sender + We can use this function to wait all sended messages. + \dontinclude msg/icomms/peer3.c + \skipline Sender function + \until end_of_sender + + \subsection MSG_ext_icomms_fct_Waitany_receiver From a receiver + We can also wait for the receiving of all messages. + \dontinclude msg/icomms/peer3.c + \skipline Receiver function + \until end_of_receiver + +*/ + +/** \page MSG_ex_master_slave_scrip_lua Master/slave application using lua console + + Simulation of a master-slave application using a realistic platform and + an external description of the deployment via a lua script. + + \section MSG_ex_msl_TOC Table of contents: + + - \ref MSG_ext_msl_code + - \ref MSG_ext_msl_preliminary + - \ref MSG_ext_msl_master + - \ref MSG_ext_msl_slave + - \ref MSG_ext_msl_core + - \ref MSG_ext_msl_main + - \ref MSG_ext_msl_helping + - \ref MSG_ext_msl_platform + +
+ + \dontinclude msg/masterslave/masterslave_console.c + + \section MSG_ext_msl_code Code of the application + + \subsection MSG_ext_msl_preliminary Preliminary declarations + + \skip include + \until } channel_t; + + \subsection MSG_ext_msl_master Master code + + This function has to be assigned to a m_process_t that will behave as the master. + It should not be called directly but either given as a parameter to + #MSG_process_create() or registered as a public function through + #MSG_function_register() and then automatically assigned to a process through + #MSG_load_platform_script(). + + C style arguments (argc/argv) are interpreted as: + - the number of tasks to distribute + - the computation size of each task + - the size of the files associated to each task + - number of hosts that will accept those tasks. + + Tasks are dumbly sent in a round-robin style. + + \until end_of_master +\subsection MSG_ext_msl_slave Slave code + + This function has to be assigned to a #m_process_t that has to behave as a slave. + Just like the master fuction (described in \ref MSG_ext_ms_master), it should not be called directly. + + This function keeps waiting for tasks and executes them as it receives them. + + \until end_of_slave + +\subsection MSG_ext_msl_core Simulation core + + This function is the core of the simulation and is divided now only into 2 parts + thanks to MSG_load_platform_script(). + -# Simulation settings and application deployment : MSG_load_platform_script() loads and creates a realistic + environment and the agents on the right locations, described in the lua script file (see example below). + Note that the use of this function require a lua installation on your machine. + -# The simulation is run with #MSG_main(). + + Its arguments are: + - platform_script_file: the name of the script file containing a valid platform and application description, using bound lua methods to bypass the surfxml parser. + + \until end_of_test_all + +\subsection MSG_ext_msl_main Main() function + + This initializes MSG, runs a simulation, and free all data-structures created by MSG. + + \until end_of_main + + \section MSG_ext_msl_helping Helping files + + \subsection MSG_ext_msl_platform Example of platform script file + + \include msg/masterslave/platform_script.lua + + */ /** \page MSG_ex_master_slave Master/slave application @@ -324,7 +425,7 @@ - \ref MSG_ext_ms_platform - \dontinclude lua/master_slave.lua + \dontinclude lua/masterslave/master_slave.lua \section MSG_ext_ms_code_lua Code of the application @@ -377,7 +478,7 @@ - \ref MSG_ext_ms_core_lua - \dontinclude lua/master_slave_bypass.lua + \dontinclude lua/console/master_slave_bypass.lua \section MSG_ext_ms_code_lua Code of the application