Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cleaned doc, re-included examples, should be better now.
authorlbobelin <lbobelin@mintcar.imag.fr>
Fri, 29 Jun 2012 14:36:27 +0000 (16:36 +0200)
committerlbobelin <lbobelin@mintcar.imag.fr>
Fri, 29 Jun 2012 14:36:57 +0000 (16:36 +0200)
17 files changed:
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/GenerateUserGuide.cmake
doc/Doxyfile.in
doc/FAQ.doc
doc/ref_guide/doxygen/modules.doc
doc/shared/doxygen/gras-examples.doc [deleted file]
doc/shared/doxygen/msg-examples.doc [deleted file]
doc/user_guide/doxygen/UserGuideDoxyfile.in
doc/user_guide/doxygen/bindings.doc
doc/user_guide/doxygen/index.doc
doc/user_guide/doxygen/install.doc
doc/user_guide/doxygen/modules.doc [deleted file]
doc/user_guide/doxygen/tracing.doc
doc/user_guide/doxygen/use.doc
examples/msg/chord/chord.c
examples/msg/pmm/msg_pmm.c
src/msg/msg_gos.c

index 2131344..ba76e58 100644 (file)
@@ -577,8 +577,6 @@ set(DOC_SOURCES
   doc/triva-graph_configuration.png
   doc/triva-graph_visualization.png
   doc/simgrid.css
   doc/triva-graph_configuration.png
   doc/triva-graph_visualization.png
   doc/simgrid.css
-  doc/shared/doxygen/gras-examples.doc
-  doc/shared/doxygen/msg-examples.doc
   tools/doxygen/index_create.pl
   tools/doxygen/fig2dev_postprocessor.pl
   tools/doxygen/xbt_log_extract_hierarchy.pl
   tools/doxygen/index_create.pl
   tools/doxygen/fig2dev_postprocessor.pl
   tools/doxygen/xbt_log_extract_hierarchy.pl
@@ -592,7 +590,6 @@ set(USER_GUIDE_SOURCES
   doc/user_guide/doxygen/tracing.doc
   doc/user_guide/doxygen/pls.doc
   doc/user_guide/doxygen/index.doc
   doc/user_guide/doxygen/tracing.doc
   doc/user_guide/doxygen/pls.doc
   doc/user_guide/doxygen/index.doc
-  doc/user_guide/doxygen/modules.doc
   doc/user_guide/doxygen/platform.doc
   doc/user_guide/doxygen/UserGuideDoxyfile.in
   doc/user_guide/doxygen/UserGuideDoxygenLayout.xml
   doc/user_guide/doxygen/platform.doc
   doc/user_guide/doxygen/UserGuideDoxyfile.in
   doc/user_guide/doxygen/UserGuideDoxygenLayout.xml
@@ -614,8 +611,6 @@ set(REF_GUIDE_SOURCES
   )
 
 set(SHARED_SOURCES
   )
 
 set(SHARED_SOURCES
-  doc/shared/doxygen/gras-examples.doc
-  doc/shared/doxygen/msg-examples.doc
   )
 
 set(DOC_FIGS
   )
 
 set(DOC_FIGS
index 91e69d6..124fdd2 100644 (file)
@@ -63,7 +63,6 @@ if(FIG2DEV_PATH)
     COMMAND ${FIG2DEV_PATH}/fig2dev -Lmap ${CMAKE_HOME_DIRECTORY}/doc/shared/fig/simgrid_modules.fig | perl -pe 's/imagemap/simgrid_modules/g'| perl -pe 's/<IMG/<IMG style=border:0px/g' | ${CMAKE_HOME_DIRECTORY}/tools/doxygen/fig2dev_postprocessor.pl > ${CMAKE_HOME_DIRECTORY}/doc/user_guide/doxygen/simgrid_modules.map
     COMMAND ${CMAKE_COMMAND} -E echo "XX First Doxygen pass"
     COMMAND ${DOXYGEN_PATH}/doxygen UserGuideDoxyfile
     COMMAND ${FIG2DEV_PATH}/fig2dev -Lmap ${CMAKE_HOME_DIRECTORY}/doc/shared/fig/simgrid_modules.fig | perl -pe 's/imagemap/simgrid_modules/g'| perl -pe 's/<IMG/<IMG style=border:0px/g' | ${CMAKE_HOME_DIRECTORY}/tools/doxygen/fig2dev_postprocessor.pl > ${CMAKE_HOME_DIRECTORY}/doc/user_guide/doxygen/simgrid_modules.map
     COMMAND ${CMAKE_COMMAND} -E echo "XX First Doxygen pass"
     COMMAND ${DOXYGEN_PATH}/doxygen UserGuideDoxyfile
-    COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/index_create.pl simgriduserguide.tag index-API.doc
 
     COMMAND ${CMAKE_COMMAND} -E echo "XX Second Doxygen pass"
     COMMAND ${DOXYGEN_PATH}/doxygen UserGuideDoxyfile
 
     COMMAND ${CMAKE_COMMAND} -E echo "XX Second Doxygen pass"
     COMMAND ${DOXYGEN_PATH}/doxygen UserGuideDoxyfile
index d6e5e13..83195ba 100644 (file)
@@ -1557,12 +1557,12 @@ SKIP_FUNCTION_MACROS   = YES
 # NOT include the path). If a tag file is not located in the directory in which
 # doxygen is run, you must also specify the path to the tagfile here.
 
 # NOT include the path). If a tag file is not located in the directory in which
 # doxygen is run, you must also specify the path to the tagfile here.
 
-TAGFILES               =
+TAGFILES               = shared/doxygen/simgridrefguide.tag=ref_guide/html/ shared/doxygen/simgriduserguide.tag=user_guide/html/
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create
 # a tag file that is based on the input files it reads.
 
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create
 # a tag file that is based on the input files it reads.
 
-GENERATE_TAGFILE       = simgrid.tag
+GENERATE_TAGFILE       = simgrid.tag 
 
 # If the ALLEXTERNALS tag is set to YES all external classes will be listed
 # in the class index. If set to NO only the inherited external classes
 
 # If the ALLEXTERNALS tag is set to YES all external classes will be listed
 # in the class index. If set to NO only the inherited external classes
index dc46ff1..e1653c9 100644 (file)
@@ -10,7 +10,7 @@ slides</a>, or to these
 <a href="http://graal.ens-lyon.fr/~alegrand/articles/Simgrid-Introduction.pdf">"obsolete" slides</a>)
 may give you some insights on what SimGrid can help you to do and what
 are its limitations. Then you definitely should read the \ref
 <a href="http://graal.ens-lyon.fr/~alegrand/articles/Simgrid-Introduction.pdf">"obsolete" slides</a>)
 may give you some insights on what SimGrid can help you to do and what
 are its limitations. Then you definitely should read the \ref
-MSG_examples. The \ref GRAS_tut can also help you.
+MSG_examples. 
 
 If you are stuck at any point and if this FAQ cannot help you, please drop us a
 mail to the user mailing list: <simgrid-user@lists.gforge.inria.fr>.
 
 If you are stuck at any point and if this FAQ cannot help you, please drop us a
 mail to the user mailing list: <simgrid-user@lists.gforge.inria.fr>.
index 76de6d6..1d6fbd5 100644 (file)
@@ -250,6 +250,6 @@ The API enables the declaration of categories and a function to
 associate them to the tasks (MSG and SD). The tasks that are not
 classified according to a category are not traced. If no categories
 are specified, simulations can still be traced using a special
 associate them to the tasks (MSG and SD). The tasks that are not
 classified according to a category are not traced. If no categories
 are specified, simulations can still be traced using a special
-parameter in the command line (see \ref tracing_tracing for details).
+parameter in the command line (see \ref tracing for details).
 */
 
 */
 
diff --git a/doc/shared/doxygen/gras-examples.doc b/doc/shared/doxygen/gras-examples.doc
deleted file mode 100644 (file)
index f00ab28..0000000
+++ /dev/null
@@ -1,473 +0,0 @@
-/**
-@defgroup GRAS_ex GRAS Examples
-@ingroup GRAS_User_Guide
-    
-
-*/
-
-/**
-\section GRAS_examples Examples
-
-    There is for now rather few examples of GRAS, but it's better than
-    nothing, isn't it?
-
-       - \ref GRAS_ex_ping
-       - \ref GRAS_ex_mmrpc
-       - \ref GRAS_ex_token
-       - \ref GRAS_ex_timer
-
-     The initiatic tour of the tutorial also contains several examples. The
-     most proeminent one is:
-
-       - \ref GRAS_tut_tour_explicitwait_use
-
-    \section GRAS_tut_presentation Tutorial
-
-    We even have a tutorial for the GRAS framework. It details in a
-    hopefully pedagogic order all the points of the API, along with example
-    of use for each of them. Unfortunately, it is not finished yet (the main
-    part missing is the one on how to describe data). Here is the table of
-    content:
-
-       - \ref GRAS_tut_intro
-         - \ref GRAS_tut_intro_what
-         - \ref GRAS_tut_intro_model
-       - \ref GRAS_tut_tour
-         - \ref GRAS_tut_tour_install
-         - \ref GRAS_tut_tour_setup
-         - \ref GRAS_tut_tour_simpleexchange
-        - \ref GRAS_tut_tour_args
-        - \ref GRAS_tut_tour_callbacks
-        - \ref GRAS_tut_tour_globals
-        - \ref GRAS_tut_tour_logs
-        - \ref GRAS_tut_tour_timers
-        - \ref GRAS_tut_tour_exceptions
-        - \ref GRAS_tut_tour_rpc
-        - \ref GRAS_tut_tour_explicitwait
-        - \ref GRAS_tut_tour_message_recaping
-
-    \section GRAS_howto_presentation HOWTOsbis
-
-    The tutorial and the API documentation present the framework little
-    piece by little piece and provide a lot of information on each of them.
-    Quite orthogonally to this, the HOWTOs try to present transversal
-    aspects of the framework to give you some broader point of view on it.
-    How infortunate it is that only one such HOWTO exist for now...
-
-       - \ref GRAS_howto
-         - \ref GRAS_howto_design
-
-   @{ */ 
-       /** @defgroup GRAS_ex      Examples */
-       /** @defgroup GRAS_tut     Tutorial */
-/** @} */
-
-
-#####################################################################
-/** @addtogroup GRAS_ex
-
-    There is for now rather few examples of GRAS, but it's better than
-    nothing, isn't it?
-
-       - \ref GRAS_ex_ping
-       - \ref GRAS_ex_mmrpc
-       - \ref GRAS_ex_token
-       - \ref GRAS_ex_timer
-
-     The initiatic tour of the tutorial also contains several examples. The
-     most proeminent one is:
-
-       - \ref GRAS_tut_tour_explicitwait_use
-
-  There is some more examples in the distribution, under the directory
-  <tt>examples/gras</tt>.
-*/
-
-#####################################################################
-#########################  EXAMPLES #################################
-#####################################################################
----------------------------------------------------------------------
-------------------------- Ping Pong ---------------------------------
----------------------------------------------------------------------
-/** @defgroup GRAS_ex_ping Ping-Pong
-    @ingroup GRAS_ex
-
-    This example implements the very classical ping-pong in GRAS. It
-    involves a client (initiating the ping-pong) and a server (answering to
-    client's requests).
-
-    It works the following way:
-     - Both the client and the server register all needed messages
-     - The server registers a callback to the ping message, which sends pong
-       to the expeditor
-     - The client sends the ping message to the server, and waits for the
-       pong message as an answer.
-
-    This example resides in the <b>examples/gras/ping/ping.c</b> file. Yes, both
-    the code of the client and of the server is placed in the same file. See
-    the \ref GRAS_tut_tour_setup of the tutorial if wondering.
-
-    \section GRAS_ex_ping_toc Table of contents of the ping example
-      - \ref GRAS_ex_ping_common
-        - \ref GRAS_ex_ping_initial
-        - \ref GRAS_ex_ping_register
-      - \ref GRAS_ex_ping_server
-        - \ref GRAS_ex_ping_serdata
-       - \ref GRAS_ex_ping_sercb
-       - \ref GRAS_ex_ping_sermain
-      - \ref GRAS_ex_ping_client
-       - \ref GRAS_ex_ping_climain
-
-    <hr>
-
-    \dontinclude gras/ping/ping_common.c
-
-    \section GRAS_ex_ping_common 1) Common code to the client and the server
-
-    \subsection GRAS_ex_ping_initial 1.a) Initial settings
-
-    Let's first load the module header and declare a logging category (see
-    \ref XBT_log for more info on logging).
-
-    \skip include
-    \until XBT_LOG
-
-    The module header <tt>ping.h</tt> reads:
-
-    \dontinclude gras/ping/ping.h
-    \skip include
-    \until argv
-    \until argv
-
-    \subsection GRAS_ex_ping_register 1.b) Register the messages
-
-    This function, called by both the client and the server is in charge of
-    declaring the existing messages to GRAS. Since the payload does not
-    involve any newly created types but only int, this is quite easy.
-    (to exchange more complicated types, see \ref GRAS_dd or
-    \ref GRAS_ex_mmrpc for an example).
-
-    \dontinclude gras/ping/ping_common.c
-    \skip register_messages
-    \until }
-
-    [Back to \ref GRAS_ex_ping_toc]
-
-    \section GRAS_ex_ping_server 2) Server's code
-
-    \subsection GRAS_ex_ping_serdata 2.a) The server's globals
-
-    In order to ensure the communication between the "main" and the callback
-    of the server, we need to declare some globals. We have to put them in a
-    struct definition so that they can be handled properly in GRAS (see the
-    \ref GRAS_tut_tour_globals for more info).
-
-    \dontinclude gras/ping/ping_server.c
-    \skip typedef struct
-    \until }
-
-    \subsection GRAS_ex_ping_sercb 2.b) The callback to the ping message
-
-    Here is the callback run when the server receives any ping message (this
-    will be registered later by the server).
-
-    \skip server_cb_ping_handler
-    \until end_of_server_cb_ping_handler
-
-    \subsection GRAS_ex_ping_sermain 2.c) The "main" of the server
-
-    This is the "main" of the server. As explained in the tutorial, \ref
-    GRAS_tut_tour_setup, you must not write any main()
-    function yourself. Instead, you just have to write a regular function
-    like this one which will act as a main.
-
-    \skip server
-    \until end_of_server
-
-    [Back to \ref GRAS_ex_ping_toc]
-
-    \section GRAS_ex_ping_client 3) Client's code
-
-    \subsection GRAS_ex_ping_climain 3.a) Client's "main" function
-
-    This function is quite straightforward, and the inlined comments should
-    be enough to understand it.
-
-    \dontinclude gras/ping/ping_client.c
-    \skip client
-    \until end_of_client
-
-    [Back to \ref GRAS_ex_ping_toc]
- */
-
----------------------------------------------------------------------
---------------------- Simple Token Ring -----------------------------
----------------------------------------------------------------------
-
-/** @defgroup GRAS_ex_token Token Ring example
-    @ingroup GRAS_ex
-
-   This example implements the token ring algorithm. It involves several
-   nodes arranged in a ring (each of them have a left and a right neighbour)
-   and exchanging a "token". This algorithm is one of the solution to ensure
-   the mutual exclusion between distributed processes. There is only one
-   token at any time, so the process in its possession is ensured to be the
-   only one having it. So, if there is an action you want all processes to
-   do alternativly, but you cannot afford to have two processes doing it at
-   the same time, let the process having the token doing it.
-
-   Actually, there is a lot of different token ring algorithms in the
-   litterature, so this example implements one of them: the simplest one.
-   The ring is static (no new node can join it, and you'll get trouble if
-   one node dies or leaves), and nothing is done for the case in which the
-   token is lost.
-
-   - \ref GRAS_ex_stoken_deploy
-   - \ref GRAS_ex_stoken_global
-   - \ref GRAS_ex_stoken_callback
-   - \ref GRAS_ex_stoken_main
-
-   \section GRAS_ex_stoken_deploy 1) Deployment file
-
-   Here is the deployment file:
-   \include examples/gras/mutual_exclusion/simple_token/simple_token.xml
-
-   The neighbour of each node is given at startup as command line argument.
-   Moreover, one of the nodes is instructed by a specific argument (the one
-   on Tremblay here) to create the token at the begining of the algorithm.
-
-   \section GRAS_ex_stoken_global 2) Global definition
-
-   The token is incarned by a specific message, which circulates from node
-   to node (the payload is an integer incremented at each hop). So, the most
-   important part of the code is the message callback, which forwards the
-   message to the next node. That is why we have to store all variable in a
-   global, as explained in the \ref GRAS_globals section.
-
-   \dontinclude examples/gras/mutual_exclusion/simple_token/simple_token.c
-   \skip typedef
-   \until }
-
-   \section GRAS_ex_stoken_callback 3) The callback
-
-   Even if this is the core of this algorithm, this function is quite
-   straightforward.
-
-   \skip node_cb_stoken_handler
-   \until end_of_node_cb_stoken_handler
-
-   \section GRAS_ex_stoken_main 4) The main function
-
-   This function is splited in two parts: The first one performs all the
-   needed initialisations (points 1-7) while the end (point 8. below) calls
-   gras_msg_handle() as long as the planned amount of ring loops are not
-   performed.
-
-   \skip node
-   \until end_of_node
-
-*/
-
----------------------------------------------------------------------
--------------------------- MM RPC -----------------------------------
----------------------------------------------------------------------
-
-/** @defgroup GRAS_ex_mmrpc A simple RPC for matrix multiplication
-    @ingroup GRAS_ex
-
-    This example implements a remote matrix multiplication. It involves a client
-    (creating the matrices and sending the multiplications requests) and a server
-    (computing the multiplication on client's behalf).
-
-    This example also constitutes a more advanced example of data description
-    mechanisms, since the message payload type is a bit more complicated than in
-    other examples such as the ping one (\ref GRAS_ex_ping).
-
-    It works the following way (not very different from the ping example):
-     - Both the client and the server register all needed messages and datatypes
-     - The server registers a callback to the "request" message, which computes
-       what needs to be and returns the result to the expeditor.
-     - The client creates two matrices, ask for their multiplication and check
-       the server's answer.
-
-    This example resides in the <b>examples/gras/mmrpc/mmrpc.c</b> file. (See
-    the \ref GRAS_tut_tour_setup of the tutorial if wondering why both the server
-    and the client live in the same source file)
-
-    \section GRAS_ex_mmrpc_toc Table of contents of the mmrpc example
-      - \ref GRAS_ex_mmrpc_common
-        - \ref GRAS_ex_mmrpc_header
-        - \ref GRAS_ex_mmrpc_dataregister
-        - \ref GRAS_ex_mmrpc_logdef
-        - \ref GRAS_ex_mmrpc_msgregister
-      - \ref GRAS_ex_mmrpc_server
-       - \ref GRAS_ex_mmrpc_serinc
-       - \ref GRAS_ex_mmrpc_sercb
-       - \ref GRAS_ex_mmrpc_sermain
-      - \ref GRAS_ex_mmrpc_client
-       - \ref GRAS_ex_mmrpc_cliinc
-       - \ref GRAS_ex_mmrpc_climain
-
-    <hr>
-
-
-    \section GRAS_ex_mmrpc_common 1) Common code to the client and the server (mmrpc_common.c and mmrpc.h)
-
-
-    \subsection GRAS_ex_mmrpc_header 1.a) Module header (mmrpc.h)
-
-    This loads the gras header and declare the function's prototypes as well
-    as the matrix size.
-
-    \dontinclude gras/mmrpc/mmrpc.h
-    \skip include
-    \until argv
-    \until argv
-
-    \subsection GRAS_ex_mmrpc_dataregister 1.b) Register the data types (mmrpc.h)
-
-    The messages involved in a matrix of double. This type is automatically
-    known by the GRAS mecanism, using the gras_datadesc_matrix() function of the
-    xbt/matrix module.
-
-    \subsection GRAS_ex_mmrpc_logdef 1.c) Logging category definition (mmrpc_common.c)
-
-    Let's first load the module header and declare a logging category (see
-    \ref XBT_log for more info on logging). This logging category does live
-    in this file (ie the required symbols are defined here and declared as
-    "extern" in any other file using them). That is why we use
-    \ref XBT_LOG_NEW_DEFAULT_CATEGORY here and
-    \ref XBT_LOG_EXTERNAL_DEFAULT_CATEGORY in mmrpc_client.c and mmrpc_server.c.
-
-    \dontinclude gras/mmrpc/mmrpc_common.c
-    \skip include
-    \until XBT_LOG
-
-    \subsection GRAS_ex_mmrpc_msgregister 1.d) Register the messages (mmrpc_common.c)
-
-    This function, called by both the client and the server is in charge of
-    declaring the existing messages to GRAS.
-
-    The datatype description builded that way can then be used to build an array datatype or
-    to declare messages.
-
-    \skip register_messages
-    \until }
-
-    [Back to \ref GRAS_ex_mmrpc_toc]
-
-    \section GRAS_ex_mmrpc_server 2) Server's code (mmrpc_server.c)
-
-    \subsection GRAS_ex_mmrpc_serinc 2.a) Server intial settings
-
-    All module symbols live in the mmrpc_common.c file. We thus have to
-    define \ref XBT_DEFINE_TYPE_EXTERN to the preprocessor so that the
-    \ref XBT_DEFINE_TYPE symbols don't get included here. Likewise, we use
-    \ref XBT_LOG_EXTERNAL_DEFAULT_CATEGORY to get the log category in here.
-
-    \dontinclude gras/mmrpc/mmrpc_server.c
-    \skip define
-    \until XBT_LOG
-
-    \subsection GRAS_ex_mmrpc_sercb 2.b) The callback to the mmrpc message
-
-    Here is the callback run when the server receives any mmrpc message (this
-    will be registered later by the server). Note the way we get the message
-    payload. In the ping example, there was one additional level of pointer
-    indirection (see \ref GRAS_ex_ping_sercb). This is because the payload is
-    an array here (ie a pointer) whereas it is a scalar in the ping example.
-
-    \skip server_cb_request_handler
-    \until end_of_server_cb_request_handler
-
-    \subsection GRAS_ex_mmrpc_sermain 2.c) The "main" of the server
-
-    This is the "main" of the server. As explained in the tutorial, \ref
-    GRAS_tut_tour_setup, you must not write any main()
-    function yourself. Instead, you just have to write a regular function
-    like this one which will act as a main.
-
-    \skip server
-    \until end_of_server
-
-    [Back to \ref GRAS_ex_mmrpc_toc]
-
-    \section GRAS_ex_mmrpc_client 3) Client's code (mmrpc_client.c)
-
-    \subsection GRAS_ex_mmrpc_cliinc 2.a) Server intial settings
-
-    As for the server, some extra love is needed to make sure that automatic
-    datatype parsing and log categories do work even if we are using several
-    files.
-
-    \dontinclude gras/mmrpc/mmrpc_client.c
-    \skip define
-    \until XBT_LOG
-
-    \subsection GRAS_ex_mmrpc_climain 3.b) Client's "main" function
-
-    This function is quite straightforward, and the inlined comments should
-    be enough to understand it.
-
-    \dontinclude gras/mmrpc/mmrpc_client.c
-    \skip argv
-    \until end_of_client
-
-    [Back to \ref GRAS_ex_mmrpc_toc]
-  */
-
----------------------------------------------------------------------
----------------------------- Timers ---------------------------------
----------------------------------------------------------------------
-
-/** @defgroup GRAS_ex_timer Some timer games
-    @ingroup GRAS_ex
-
-    This example fools around with the GRAS timers (\ref GRAS_timer). It is
-    mainly a regression test, since it uses almost all timer features.
-
-    The main program registers a repetititive task and a delayed one, and
-    then loops until the <tt>still_to_do</tt> variables of its globals reach
-    0. The delayed task set it to 5, and the repetititive one decrease it
-    each time. Here is an example of output:
-\verbatim Initialize GRAS
- Initialize XBT
- [1108335471] Programming the repetitive_action with a frequency of 1.000000 sec
- [1108335471] Programming the delayed_action for after 2.000000 sec
- [1108335471] Have a rest
- [1108335472] Canceling the delayed_action.
- [1108335472] Re-programming the delayed_action for after 2.000000 sec
- [1108335472] Repetitive_action has nothing to do yet
- [1108335473] Repetitive_action has nothing to do yet
- [1108335473] delayed_action setting globals->still_to_do to 5
- [1108335474] repetitive_action decrementing globals->still_to_do. New value: 4
- [1108335475] repetitive_action decrementing globals->still_to_do. New value: 3
- [1108335476] repetitive_action decrementing globals->still_to_do. New value: 2
- [1108335477] repetitive_action decrementing globals->still_to_do. New value: 1
- [1108335478] repetitive_action decrementing globals->still_to_do. New value: 0
- Exiting GRAS\endverbatim
-
-    Source code:
-     - \ref GRAS_ex_timer_decl
-     - \ref GRAS_ex_timer_delay
-     - \ref GRAS_ex_timer_repeat
-     - \ref GRAS_ex_timer_main
-
-    \dontinclude timer.c
-
-    \section GRAS_ex_timer_decl   1. Declarations and headers
-    \skip include
-    \until my_globals
-
-    \section GRAS_ex_timer_delay  2. Source code of the delayed action
-    \skip repetitive_action
-    \until end_of_repetitive_action
-
-    \section GRAS_ex_timer_repeat 3. Source code of the repetitive action
-    \skip delayed_action
-    \until end_of_delayed_action
-
-    \section GRAS_ex_timer_main   4. Source code of main function
-    \skip client
-    \until end_of_client
-*/
diff --git a/doc/shared/doxygen/msg-examples.doc b/doc/shared/doxygen/msg-examples.doc
deleted file mode 100644 (file)
index f6a0e6a..0000000
+++ /dev/null
@@ -1,339 +0,0 @@
-/**
-@defgroup MSG_examples MSG Examples
-@ingroup MSG_User_Guide
-
-
-MSG comes with an extensive set of examples. It is sometimes difficult
-to find the one you need. This list aims at helping you finding the
-example from which you can learn what you want to.
-
-@section MSG_ex_basics Basic examples and features
-
-*/
-
-/**
-@defgroup MSG_ex_asynchronous_communications Asynchronous communications
-@ingroup MSG_examples
-
-Simulation of asynchronous communications between a sender and a receiver using a realistic platform and
-an external description of the deployment.
-
-\section MSG_ex_ms_TOC Table of contents:
- - \ref MSG_ext_icomms_code
-   - \ref MSG_ext_icomms_preliminary
-   - \ref MSG_ext_icomms_Sender
-   - \ref MSG_ext_icomms_Receiver
-   - \ref MSG_ext_icomms_core
-   - \ref MSG_ext_icomms_Main
- - \ref MSG_ext_icomms_fct_Waitall
- - \ref MSG_ext_icomms_fct_Waitany
-
-<hr>
-
-\dontinclude msg/icomms/peer.c
-
-\section MSG_ext_icomms_code Code of the application
-
-\subsection MSG_ext_icomms_preliminary Preliminary declarations
-\skip include
-\until Sender function
-
-\subsection MSG_ext_icomms_Sender Sender function
-
-The sender send to a receiver an asynchronous message with the function "MSG_task_isend()". Cause this function is non-blocking
-we have to make "MSG_comm_test()" to know   if the communication is finished for finally destroy it with function "MSG_comm_destroy()".
-It also available to "make MSG_comm_wait()" which make both of them.
-
-  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
-   - a list of host that will accept those tasks.
-   - the time to sleep at the beginning of the function
-   - This time defined the process sleep time
-                       if time = 0 use of MSG_comm_wait()
-                       if time > 0 use of MSG_comm_test()
-
-
-\until Receiver function
-
-\subsection MSG_ext_icomms_Receiver Receiver function
-
-This function executes tasks when it receives them. As the receiving is asynchronous we have to test the communication to know
-if it is completed or not with "MSG_comm_test()" or wait for the completion "MSG_comm_wait()".
-
-  C style arguments (argc/argv) are interpreted as:
-   - the id to use for received the communication.
-   - the time to sleep at the beginning of the function
-   - This time defined the process sleep time
-                       if time = 0 use of MSG_comm_wait()
-                       if time > 0 use of MSG_comm_test()
-
-\until Test function
-
-\subsection MSG_ext_icomms_core Simulation core
-
-  This function is the core of the simulation and is divided only into 3 parts
-  thanks to MSG_create_environment() and MSG_launch_application().
-     -# Simulation settings : MSG_create_environment() creates a realistic
-        environment
-     -# Application deployment : create the processes on the right locations with
-        MSG_launch_application()
-     -# The simulation is run with #MSG_main()
-
-  Its arguments are:
-       - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.
-       - <i>application_file</i>: the name of a file containing a valid surfxml application description
-
-\until Main function
-
-\subsection MSG_ext_icomms_Main Main function
-
-This initializes MSG, runs a simulation, and free all data-structures created by MSG.
-
-\until end_of_main
-
-\dontinclude msg/icomms/peer2.c
-
-\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 sent 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 arrival of all messages.
-\dontinclude msg/icomms/peer3.c
-\skipline Receiver function
-\until end_of_receiver
-
-*/
-
-
-/**
-@defgroup MSG_ex_master_slave Basic Master/Slaves
-@ingroup MSG_examples
-
-Simulation of a master-slave application using a realistic platform
-and an external description of the deployment.
-
-\section MSG_ex_ms_TOC Table of contents:
-
- - \ref MSG_ext_ms_code
-   - \ref MSG_ext_ms_preliminary
-   - \ref MSG_ext_ms_master
-   - \ref MSG_ext_ms_slave
-   - \ref MSG_ext_ms_forwarder
-   - \ref MSG_ext_ms_core
-   - \ref MSG_ext_ms_main
- - \ref MSG_ext_ms_helping
-   - \ref MSG_ext_ms_application
-   - \ref MSG_ext_ms_platform
-
-<hr>
-
-\dontinclude msg/masterslave/masterslave_forwarder.c
-
-\section MSG_ext_ms_code Code of the application
-
-\subsection MSG_ext_ms_preliminary Preliminary declarations
-
-\skip include
-\until printf
-\until }
-
-\subsection MSG_ext_ms_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_launch_application().
-
-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
-   - a list of host that will accept those tasks.
-
-Tasks are dumbly sent in a round-robin style.
-
-\until end_of_master
-
-\subsection MSG_ext_ms_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_ms_forwarder Forwarder code
-
-This function has to be assigned to a #m_process_t that has to behave
-as a forwarder. Just like the master function (described in \ref
-MSG_ext_ms_master), it should not be called directly.
-
-C style arguments (argc/argv) are interpreted as a list of host that
-will accept those tasks.
-
-This function keeps waiting for tasks and dispathes them to its slaves.
-
-\until end_of_forwarder
-
-\subsection MSG_ext_ms_core Simulation core
-
-This function is the core of the simulation and is divided only into 3 parts
-thanks to MSG_create_environment() and MSG_launch_application().
-   -# Simulation settings : MSG_create_environment() creates a realistic
-      environment
-   -# Application deployment : create the processes on the right locations with
-      MSG_launch_application()
-   -# The simulation is run with #MSG_main()
-
-Its arguments are:
-       - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.
-       - <i>application_file</i>: the name of a file containing a valid surfxml application description
-
-\until end_of_test_all
-
-\subsection MSG_ext_ms_main Main() function
-
-This initializes MSG, runs a simulation, and free all data-structures created by MSG.
-
-\until end_of_main
-
-\section MSG_ext_ms_helping Helping files
-
-\subsection MSG_ext_ms_application Example of application file
-
-\include msg/masterslave/deployment_masterslave.xml
-
-\subsection MSG_ext_ms_platform Example of platform file
-
-\include msg/small_platform.xml
-
-*/
-
-/** \page MSG_ex_master_slave_lua Master/slave Lua application
-
-    Simulation of a master-slave application using lua bindings
-       - \ref MSG_ext_ms_code_lua
-       - \ref MSG_ext_ms_master_lua
-       - \ref MSG_ext_ms_slave_lua
-       - \ref MSG_ext_ms_core_lua
-
-     - \ref MSG_ext_ms_helping
-       - \ref MSG_ext_ms_application
-       - \ref MSG_ext_ms_platform
-
-
-      \dontinclude lua/masterslave/master_slave.lua
-
-      \section MSG_ext_ms_code_lua Code of the application
-
-      \subsection MSG_ext_ms_master_lua Master code
-
-            as described ine the C native master/Slave exmaple , this function has to be assigned to a m_process_t that will behave as the master.
-
-      Lua style arguments (...) in for the master are interpreted as:
-       - the number of tasks to distribute
-       - the computation size of each task
-       - the size of the files associated to each task
-       - a list of host that will accept those tasks.
-
-      Tasks are dumbly sent in a round-robin style.
-
-      \until end_of_master
-
-
-      \subsection MSG_ext_ms_slave_lua Slave code
-
-      This function has to be assigned to a #m_process_t that has to behave as a slave.
-      This function keeps waiting for tasks and executes them as it receives them.
-
-      \until end_of_slave
-         \subsection MSG_ext_ms_core_lua Simulation core
-
-      in this section the core of the simulation which start by including the simgrid lib for bindings
-      : <i>require "simgrid" </i>
-
-         -# Simulation settings : <i>simgrid.platform</i> creates a realistic
-            environment
-         -# Application deployment : create the processes on the right locations with
-            <i>simgrid.application</i>
-         -# The simulation is run with <i>simgrid.run</i>
-
-      Its arguments are:
-       - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.( first command line argument)
-       - <i>application_file</i>: the name of a file containing a valid surfxml application description ( second commande line argument )
-
-      \until simgrid.clean()
-
-*/
-
-/** \page MSG_ex_master_slave_lua_bypass Master/slave Bypass Lua application
-
-    Simulation of a master-slave application using lua bindings, Bypassing the XML parser
-       - \ref MSG_ext_ms_code_lua
-       - \ref MSG_ext_ms_master_lua
-       - \ref MSG_ext_ms_slave_lua
-       - \ref MSG_ext_ms_core_lua
-
-
-      \dontinclude lua/console/master_slave_bypass.lua
-
-      \section MSG_ext_ms_code_lua Code of the application
-
-      \subsection MSG_ext_ms_master_lua Master code
-
-            as described ine the C native master/Slave exmaple , this function has to be assigned to a m_process_t that will behave as the master.
-
-      Lua style arguments (...) in for the master are interpreted as:
-       - the number of tasks to distribute
-       - the computation size of each task
-       - the size of the files associated to each task
-       - a list of host that will accept those tasks.
-
-      Tasks are dumbly sent in a round-robin style.
-
-      \until end_of_master
-
-
-      \subsection MSG_ext_ms_slave_lua Slave code
-
-      This function has to be assigned to a #m_process_t that has to behave as a slave.
-      This function keeps waiting for tasks and executes them as it receives them.
-
-      \until end_of_slave
-         \subsection MSG_ext_ms_core_lua Simulation core
-
-      in this section the core of the simulation which start by including the simgrid lib for bindings, then create the resources we need to set up our environment bypassing the XML parser.
-      : <i>require "simgrid" </i>
-
-        -# Hosts : <i>simgrid.Host.new</i> instanciate a new host with an id, and power.
-        -# Links : <i>simgrid.Link.new</i> instanictae a new link that will require an id, bandwith and latency values.
-        -# Route : <i>simgrid.Route.new</i> define a route between two hosts specifying the links to use.
-         -# Simulation settings : <i>simgrid.register_platform();</i> register own platform without using the XML SURF parser.
-
-        we can also bypass the XML deployment file, and associate functions for each of defined hosts.
-       - <i>simgrid.Host.setFunction</i>: associate a function to a host, specifying arguments if needed.
-       - <i>simgrid.register_application()</i>: saving the deployment settings before running the simualtion.
-
-      \until simgrid.clean()
-
-*/
-
index ff35999..9051a4f 100644 (file)
@@ -660,14 +660,14 @@ WARN_LOGFILE           =
 
 INPUT                  = index.doc \
                          install.doc \
 
 INPUT                  = index.doc \
                          install.doc \
-                         use.doc \
-                         modules.doc \
+                         use.doc \            
                          options.doc \
                          platform.doc \
                          tracing.doc \
                          pls.doc \
                          bindings.doc \
                          @top_srcdir@/doc/user_guide/doxygen/logcategories.doc
                          options.doc \
                          platform.doc \
                          tracing.doc \
                          pls.doc \
                          bindings.doc \
                          @top_srcdir@/doc/user_guide/doxygen/logcategories.doc
+                        
 
 ###################################################
 ##  PLEASE DON'T MESS WITH THE ORDER OF EXAMPLES ## (unless you know what you are doing, of course)
 
 ###################################################
 ##  PLEASE DON'T MESS WITH THE ORDER OF EXAMPLES ## (unless you know what you are doing, of course)
index 59f7827..a5e5257 100644 (file)
@@ -152,4 +152,107 @@ Yes, Here too you have to register your application before running the simulatio
 
 the full example is distributed in the file examples/lua/master_slave_bypass.lua
 
 
 the full example is distributed in the file examples/lua/master_slave_bypass.lua
 
+\subsection MSG_ex_master_slave_lua Master/slave Lua application
+
+    Simulation of a master-slave application using lua bindings    
+       - \ref MSG_ext_ms_master_lua
+       - \ref MSG_ext_ms_slave_lua
+       - \ref MSG_ext_ms_core_lua
+
+     - \ref MSG_ext_ms_helping
+       - \ref MSG_ext_ms_application
+       - \ref MSG_ext_ms_platform
+
+
+      \dontinclude lua/masterslave/master_slave.lua
+     
+
+      \subsubsection MSG_ext_ms_master_lua Master code
+
+            as described ine the C native master/Slave exmaple , this function has to be assigned to a m_process_t that will behave as the master.
+
+      Lua style arguments (...) in for the master are interpreted as:
+       - the number of tasks to distribute
+       - the computation size of each task
+       - the size of the files associated to each task
+       - a list of host that will accept those tasks.
+
+      Tasks are dumbly sent in a round-robin style.
+
+      \until end_of_master
+
+
+      \subsubsection MSG_ext_ms_slave_lua Slave code
+
+      This function has to be assigned to a #m_process_t that has to behave as a slave.
+      This function keeps waiting for tasks and executes them as it receives them.
+
+      \until end_of_slave
+         \subsubsection MSG_ext_ms_core_lua Simulation core
+
+      in this section the core of the simulation which start by including the simgrid lib for bindings
+      : <i>require "simgrid" </i>
+
+         -# Simulation settings : <i>simgrid.platform</i> creates a realistic
+            environment
+         -# Application deployment : create the processes on the right locations with
+            <i>simgrid.application</i>
+         -# The simulation is run with <i>simgrid.run</i>
+
+      Its arguments are:
+       - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.( first command line argument)
+       - <i>application_file</i>: the name of a file containing a valid surfxml application description ( second commande line argument )
+
+      \until simgrid.clean()
+
+
+ \subsection MSG_ex_master_slave_lua_bypass Master/slave Bypass Lua application
+
+    Simulation of a master-slave application using lua bindings, Bypassing the XML parser
+       - \ref MSG_ext_ms_bp_master_lua
+       - \ref MSG_ext_ms_bp_slave_lua
+       - \ref MSG_ext_ms_bp_core_lua
+
+
+      \dontinclude lua/console/master_slave_bypass.lua
+      
+
+      \subsubsection MSG_ext_ms_bp_master_lua Master code
+
+            as described ine the C native master/Slave exmaple , this function has to be assigned to a m_process_t that will behave as the master.
+
+      Lua style arguments (...) in for the master are interpreted as:
+       - the number of tasks to distribute
+       - the computation size of each task
+       - the size of the files associated to each task
+       - a list of host that will accept those tasks.
+
+      Tasks are dumbly sent in a round-robin style.
+
+      \until end_of_master
+
+
+      \subsubsection MSG_ext_ms_bp_slave_lua Slave code
+
+      This function has to be assigned to a #m_process_t that has to behave as a slave.
+      This function keeps waiting for tasks and executes them as it receives them.
+
+      \until end_of_slave
+         \subsubsection MSG_ext_ms_bp_core_lua Simulation core
+
+      in this section the core of the simulation which start by including the simgrid lib for bindings, then create the resources we need to set up our environment bypassing the XML parser.
+      : <i>require "simgrid" </i>
+
+        -# Hosts : <i>simgrid.Host.new</i> instanciate a new host with an id, and power.
+        -# Links : <i>simgrid.Link.new</i> instanictae a new link that will require an id, bandwith and latency values.
+        -# Route : <i>simgrid.Route.new</i> define a route between two hosts specifying the links to use.
+         -# Simulation settings : <i>simgrid.register_platform();</i> register own platform without using the XML SURF parser.
+
+        we can also bypass the XML deployment file, and associate functions for each of defined hosts.
+       - <i>simgrid.Host.setFunction</i>: associate a function to a host, specifying arguments if needed.
+       - <i>simgrid.register_application()</i>: saving the deployment settings before running the simualtion.
+
+      \until simgrid.clean()
+
+
  */
  */
index 084e623..337b6b5 100644 (file)
@@ -36,7 +36,7 @@ Grids.
 
 <hr>
 
 
 <hr>
 
-\section overview Overview of the toolkit components
+\section ug_overview Overview of the toolkit components
 
 As depicted by the following diagram, the SimGrid toolkit is basically
 three-layered (click on the picture to jump to a specific component).
 
 As depicted by the following diagram, the SimGrid toolkit is basically
 three-layered (click on the picture to jump to a specific component).
@@ -52,7 +52,7 @@ three-layered (click on the picture to jump to a specific component).
 \endhtmlonly
 
 
 \endhtmlonly
 
 
-\subsection overview_envs Programmation environments layer
+\subsection ug_overview_envs Programmation environments layer
 
 SimGrid provides several programmation environments built on top of a unique
 simulation kernel. Each environment targets a specific audiance and
 
 SimGrid provides several programmation environments built on top of a unique
 simulation kernel. Each environment targets a specific audiance and
@@ -95,7 +95,7 @@ consider adding it. You should contact us first on the
 <a href=http://lists.gforge.inria.fr/mailman/listinfo/simgrid-devel>SimGrid
 developers mailing list</a>, though.
 
 <a href=http://lists.gforge.inria.fr/mailman/listinfo/simgrid-devel>SimGrid
 developers mailing list</a>, though.
 
-\subsection overview_kernel Simulation kernel layer
+\subsection ug_overview_kernel Simulation kernel layer
 
 The core functionnalities to simulate a virtual platform are provided by a
 module called <b>\ref SURF_API</b>.  It is
 
 The core functionnalities to simulate a virtual platform are provided by a
 module called <b>\ref SURF_API</b>.  It is
@@ -108,7 +108,7 @@ eases the comparison of the several models existing in the litterature.
 
 See the \ref SURF_API section for more details.
 
 
 See the \ref SURF_API section for more details.
 
-\subsection overview_fondation Base layer
+\subsection ug_overview_fondation Base layer
 
 The base of the whole toolkit is constituted by the <b>\ref XBT_API
 (eXtended Bundle of Tools)</b>.
 
 The base of the whole toolkit is constituted by the <b>\ref XBT_API
 (eXtended Bundle of Tools)</b>.
@@ -121,7 +121,7 @@ XBT_dict, \ref XBT_heap, \ref XBT_set and \ref XBT_swag.
 See the \ref XBT_API section for more details.
 
 
 See the \ref XBT_API section for more details.
 
 
-\subsection lucas_layer Tracing simulation
+\subsection ug_lucas_layer Tracing simulation
 Finally, a transversal module allows you to trace your simulation. More documentation in the section \ref TRACE_doc
 
 
 Finally, a transversal module allows you to trace your simulation. More documentation in the section \ref TRACE_doc
 
 
@@ -144,25 +144,5 @@ mailing list</a>.
 </center>
 \endhtmlonly
 
 </center>
 \endhtmlonly
 
-/**
-@defgroup SimGrid_User_Guide SimGrid User Guide
-   @{ */
-       /** @defgroup SimGrid_install   Install          */
-       /** @defgroup SimGrid_options   Options and configuration */
-       /** @defgroup SimGrid_pls   Packet-level simulation */
-       /** @defgroup SimGrid_pf   Platform description */
-       /** @defgroup SimGrid_tracing   Tracing */
-       /** @defgroup MSG_User_Guide MSG User Guide      */
-       /** @defgroup SIMDAG_User_Guide SIMDAG User Guide      */
-       /** @defgroup GRAS_User_Guide GRAS User Guide      */
-       /** @defgroup SMPI_User_Guide SMPI User Guide      */
-       /** @defgroup AMOK_User_Guide AMOK User Guide      */
-       /** @defgroup XBT_User_Guide XBT User Guide      */
-       /** @defgroup Advanced_User_Guide Advanced User Guide      */
-/**  @{ */
-       /** @defgroup SIMIX_User_Guide SIMIX User Guide: writing your own model      */
-
-/** @} */
-/** @} */
 
 */
 
 */
index 544faf3..5048ab0 100644 (file)
@@ -3,7 +3,7 @@
 
 \section install_cmake Installing the SimGrid library
 
 
 \section install_cmake Installing the SimGrid library
 
-\subsection install_intro Some generalitty
+\subsection install_intro Some generality
 
 \subsubsection install_intro1 What is Cmake?
 
 
 \subsubsection install_intro1 What is Cmake?
 
@@ -497,12 +497,6 @@ in a terminal : <tt>info make</tt> and read the introduction. The
 previous example should be enough for a first try but you may want to
 perform some more complex compilations...
 
 previous example should be enough for a first try but you may want to
 perform some more complex compilations...
 
-\section install_setting_GRAS Setting up your own GRAS code
-
-If you use the GRAS interface instead of the MSG one, then previous section
-is not the better source of information. Instead, you should check the GRAS
-tutorial in general, and the \ref GRAS_tut_tour_setup in particular.
-
 
 
 */
 
 
 */
diff --git a/doc/user_guide/doxygen/modules.doc b/doc/user_guide/doxygen/modules.doc
deleted file mode 100644 (file)
index 76de6d6..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
-  \defgroup SimGrid_API  SimGrid modules */
-
-/** \defgroup XBT_API      XBT
-    \ingroup SimGrid_API
-    \brief The core toolbox of SimGrid, containing usefull datatypes,
-           portability support and so on.
-
-*/
-
-/** \defgroup MSG_API      MSG
-    \ingroup SimGrid_API
-    \brief Simple programming environment
-
-      MSG was the first distributed programming environment provided within
-      SimGrid. While almost realistic, it remains quite simple (simplistic?).
-
-      \section MSG_who Who should use this (and who shouldn't)
-
-      You should use this module if you want to study some heuristics for a
-      given problem you don't really want to implement.
-      If you want to use DAGs, have a look at the \ref SD_API programming
-      environment.
-      If you want to get a real (but experimental) implementation of your solution, have a look
-      at the \ref GRAS_API one. If you want to study an existing MPI program,
-      have a look at the \ref SMPI_API one. If none of those programming
-      environments fits your needs, you may consider implementing your own
-      directly on top of \ref SURF_API (but you probably want to contact us
-      before).
-*/
-
-
-/** \defgroup SIMIX_API      SIMIX
-    \ingroup SimGrid_API
-    \brief POSIX-like interface for building simulation
-
-    This is a developer-level interface that should be useful only if you
-    plan to design a new interface for SimGrid.
-*/
-
-
-/** \defgroup GRAS_API      GRAS
-    \ingroup SimGrid_API
-    \brief Realistic programming environment (Grid Reality And Simulation)
-
-    GRAS provides a complete API to implement distributed application on top
-    of heterogeneous plateforms. In addition to the SimGrid implementation
-    of this interface (allowing you to work on your application within the
-    comfort of the simulator), an implementation suited to real platforms is
-    also provided (allowing you to really use your application once you're
-    done with developing it). It may still contain rought corners as
-    GRAS is not the most used part of SimGrid, however.
-
-    GRAS thus constitute a complete grid application developement framework,
-    encompassing both developer helping tools (the simulator and associated
-    tools) and an efficient while portable execution runtime.
-
-    \section GRAS_who Who should use this (and who shouldn't)
-
-    You should use this programming environment if you want to develop real
-    applications, ie if the final result of your work is a program which
-    may eventually be distributed. Rember however that GRAS is
-    considered as experimental at this point. Help would be welcomed
-    to improve this sorry situation...
-
-    If you just want to study some heuristics for a given problem you don't
-    want to implement really (ie, if your result would be a theorem), have a
-    look at the \ref MSG_API one, or the \ref SD_API one if you need to use DAGs.
-    If you want to study an existing MPI program, have a look at the
-    \ref SMPI_API one.
-    If none of those programming environments fits your needs, you may
-    consider implementing your own directly on top of \ref SURF_API (but you
-    probably want to contact us before).
-*/
-
-/** \defgroup AMOK_API AMOK
-    \ingroup SimGrid_API
-    \brief Distributed toolkit built over \ref GRAS_API (Advanced Metacomputing Overlay Kit)
-
-    AMOK provides several tools useful to most applications built on top of GRAS,
-    but yet not belonging to GRAS itself. It is planned that those modules will be
-    changed to real plugins one day, allowing users to load only the needed parts at
-    run time. For now, they live in another library against which you should link your
-    programs explicitly.
-*/
-
-/** \defgroup SMPI_API      SMPI
-    \ingroup SimGrid_API
-    \brief Programming environment for the simulation of MPI applications
-
-This programming environment permits to study existing MPI application
-by emulating them on top of the SimGrid simulator. In other words, it
-will constitute an emulation solution for parallel codes. You don't
-even have to modify your code for that, although that may help, as
-detailed below.
-
-\section SMPI_who Who should use SMPI (and who shouldn't)
-
-You should use this programming environment of the SimGrid suite if
-you want to study existing MPI applications. If you want to create a
-distributed application, you may be interested in the \ref GRAS_API
-environment instead (but note that GRAS is not very actively
-maintained nowadays). If you want to study some heuristics for a given
-problem (and if your goal is to produce theorems and publications, not
-code), have a look at the \ref MSG_API environment, or the \ref SD_API
-one if you need to use DAGs. If none of those programming environments
-fits your needs, you may consider implementing your own directly on
-top of \ref SURF_API (but you probably want to contact us before).
-
-\section SMPI_what What can run within SMPI?
-
-You can run unmodified MPI applications (both C and Fortran) within
-SMPI, provided you only use MPI calls that we implemented in MPI. Our
-coverage of the interface is not bad, but will probably never be
-complete. One sided communications and I/O primitives are not targeted
-for now. The full list of not yet implemented functions is available
-in file <tt>include/smpi/smpi.h</tt> of the archive, between two lines
-containing the <tt>FIXME</tt> marker. If you really need a missing
-feature, please get in touch with us: we can guide you though the
-SimGrid code to help you implementing it, and we'd glad to integrate
-it in the main project afterward if you contribute them back.
-
-\section SMPI_adapting Adapting your MPI code to the use of SMPI
-
-As detailed in the reference article (available at
-http://hal.inria.fr/inria-00527150), you may want to adapt your code
-to improve the simulation performance. But these tricks may seriously
-hinder the result qualtity (or even prevent the app to run) if used
-wrongly. We assume that if you want to simulate an HPC application,
-you know what you are doing. Don't prove us wrong!
-
-If you get short on memory (the whole app is executed on a single node
-when simulated), you should have a look at the SMPI_SHARED_MALLOC and
-SMPI_SHARED_FREE macros. It allows to share memory areas between
-processes. For example, matrix multiplication code may want to store
-the blocks on the same area. Of course, the resulting computations
-will useless, but you can still study the application behavior this
-way. Of course, if your code is data-dependent, this won't work.
-
-If your application is too slow, try using SMPI_SAMPLE_LOCAL,
-SMPI_SAMPLE_GLOBAL and friends to indicate which computation loops can
-be sampled. Some of the loop iterations will be executed to measure
-their duration, and this duration will be used for the subsequent
-iterations. These samples are done per processor with
-SMPI_SAMPLE_LOCAL, and shared between all processors with
-SMPI_SAMPLE_GLOBAL. Of course, none of this will work if the execution
-time of your loop iteration are not stable.
-
-Yes, that's right, these macros are not documented yet, but we'll fix
-it as soon as time permits. Sorry about that -- patch welcomed!
-Meanwhile, grep for them on the examples for more information.
-
-\section SMPI_compiling Compiling your code
-
-This is very simply done with the <tt>smpicc</tt> script. If you
-already compiled any MPI code before, you already know how to use it.
-If not, you should try to get your MPI code running on top of MPI
-before giving SMPI a spin. Actually, that's very simple even if it's
-the first time you use MPI code: just use smpicc as a compiler (in
-replacement of gcc or your usual compiler), and you're set.
-
-\section SMPI_executing Executing your code on top of the simulator
-
-This is done though the <tt>smpirun</tt> script as follows.
-<tt>my_hostfile.txt</tt> is a classical MPI hostfile (that is, this
-file lists the machines on which the processes must be dispatched, one
-per line)  <tt>my_platform.xml</tt> is a classical SimGrid platform
-file. Of course, the hosts of the hostfile must exist in the provided
-platform. <tt>./program</tt> is the MPI program that you want to
-simulate (must be compiled by <tt>smpicc</tt>) while <tt>-arg</tt> is
-a command-line parameter passed to this program.
-
-\verbatim
-smpirun -hostfile my_hostfile.txt -platform my_platform.xml ./program -arg
-\endverbatim
-
-smpirun accepts other parameters, such as <tt>-np</tt> if you don't
-want to use all the hosts defined in the hostfile, <tt>-map</tt> to
-display on which host each rank gets mapped of <tt>-trace</tt> to
-activate the tracing during the simulation. You can get the full list
-by running
-\verbatim
-smpirun -help
-\endverbatim
-
-
-*/
-
-
-/** \defgroup SD_API      SimDag
-    \ingroup SimGrid_API
-    \brief Programming environment for DAG applications
-
-    SimDag provides some functionnalities to simulate parallel task scheduling
-    with DAGs models (Direct Acyclic Graphs).
-    The old versions of SimGrid were based on DAGs. But the DAG part (named SG)
-    was removed in SimGrid 3 because the new kernel (\ref SURF_API) was implemented. \ref SURF_API
-    was much faster and more flexible than SG and did not use DAGs.
-    SimDag is a new implementation of DAGs handling and it is built on top of \ref SURF_API.
-
-    \section SD_who Who should use this (and who shouldn't)
-
-    You should use this programming environment of the SimGrid suite if you want
-    to study algorithms and heuristics with DAGs of parallel tasks.
-    If you don't need to use DAGs for your simulation, have a look at the
-    \ref MSG_API programming environment.
-    If you want to implement a real distributed application, have a look at the
-    \ref GRAS_API programming environment.
-    If you want to study an existing MPI program, have a look at the
-    \ref SMPI_API one.
-    If none of those programming environments fits your needs, you may
-    consider implementing your own directly on top of \ref SURF_API (but you
-    probably want to contact us before).
-
-*/
-
-/**
-@defgroup SURF_API SURF
-@ingroup SimGrid_API
-@brief Internal kernel of all the simulators used in SimGrid, and associated models.
-
-SURF provides the core functionnalities to simulate a virtual
-platform. It is very low-level and is not intended to be used by end
-users, but rather to serve as a basis for higher-level simulators. Its
-interface are not frozen (and will probably never be), and the
-structure emphasis on performance over ease of use. This module
-contains the platform models. If you need a model that is not encoded
-yet, please come to the devel mailing list so that we can discuss on
-the feasibility of your idea.
-
-Please note that as it is not really intended for public use, this
-module is only partially documented.
-*/
-
-
-/**
-@defgroup TRACE_API TRACE
-@ingroup SimGrid_API
-@brief Tracing mechanism and its functions.
-
-SimGrid can trace the resource (of hosts and links) utilization using
-any of its programming interfaces (MSG, SimDAG and SMPI). This means
-that the tracing will register how much power is used for each host
-and how much bandwidth is used for each link of the platform.
-
-The idea of the tracing facilities is to give SimGrid users to
-possibility to classify MSG and SimDAG tasks by category, tracing the
-platform utilization (hosts and links) for each of the categories.
-The API enables the declaration of categories and a function to
-associate them to the tasks (MSG and SD). The tasks that are not
-classified according to a category are not traced. If no categories
-are specified, simulations can still be traced using a special
-parameter in the command line (see \ref tracing_tracing for details).
-*/
-
index fb616d5..ad936ed 100644 (file)
@@ -1,6 +1,5 @@
 /*! \page tracing Tracing Simulations for Visualization
 
 /*! \page tracing Tracing Simulations for Visualization
 
-\section tracing_tracing Tracing Simulations for Visualization
 
 The trace visualization is widely used to observe and understand the behavior
 of parallel applications and distributed algorithms. Usually, this is done in a
 
 The trace visualization is widely used to observe and understand the behavior
 of parallel applications and distributed algorithms. Usually, this is done in a
@@ -12,7 +11,7 @@ in order to let users trace their simulations and analyze them. This part of the
 user manual explains how the tracing-related features can be enabled and used
 during the development of simulators using the SimGrid library.
 
 user manual explains how the tracing-related features can be enabled and used
 during the development of simulators using the SimGrid library.
 
-\subsection tracing_tracing_howitworks How it works
+\section tracing_tracing_howitworks How it works
 
 For now, the SimGrid library is instrumented so users can trace the <b>platform
 utilization</b> using the MSG, SimDAG and SMPI interface. This means that the tracing will
 
 For now, the SimGrid library is instrumented so users can trace the <b>platform
 utilization</b> using the MSG, SimDAG and SMPI interface. This means that the tracing will
@@ -30,7 +29,7 @@ classified according to a category are not traced</em>. Even if the user
 does not specify any category, the simulations can still be traced in terms
 of resource utilization by using a special parameter that is detailed below.
 
 does not specify any category, the simulations can still be traced in terms
 of resource utilization by using a special parameter that is detailed below.
 
-\subsection tracing_tracing_enabling Enabling using CMake
+\section tracing_tracing_enabling Enabling using CMake
 
 With the sources of SimGrid, it is possible to enable the tracing
 using the parameter <b>-Denable_tracing=ON</b> when the cmake is
 
 With the sources of SimGrid, it is possible to enable the tracing
 using the parameter <b>-Denable_tracing=ON</b> when the cmake is
@@ -46,7 +45,7 @@ $ cmake -Denable_tracing=ON .
 $ make
 \endverbatim
 
 $ make
 \endverbatim
 
-\subsection instr_category_functions Tracing categories functions
+\section instr_category_functions Tracing categories functions
 \li \c TRACE_category(const char *category)
 \li \c TRACE_category_with_color(const char *category, const char *color)
 \li \c MSG_task_set_category(m_task_t task, const char *category)
 \li \c TRACE_category(const char *category)
 \li \c TRACE_category_with_color(const char *category, const char *color)
 \li \c MSG_task_set_category(m_task_t task, const char *category)
@@ -54,11 +53,11 @@ $ make
 \li \c SD_task_set_category(SD_task_t task, const char *category)
 \li \c SD_task_get_category(SD_task_t task)
 
 \li \c SD_task_set_category(SD_task_t task, const char *category)
 \li \c SD_task_get_category(SD_task_t task)
 
-\subsection instr_mark_functions Tracing marks functions
+\section instr_mark_functions Tracing marks functions
 \li \c TRACE_declare_mark(const char *mark_type)
 \li \c TRACE_mark(const char *mark_type, const char *mark_value)
 
 \li \c TRACE_declare_mark(const char *mark_type)
 \li \c TRACE_mark(const char *mark_type, const char *mark_value)
 
-\subsection instr_uservariables_functions Tracing user variables functions
+\section instr_uservariables_functions Tracing user variables functions
 
 For hosts:
 
 
 For hosts:
 
@@ -91,7 +90,7 @@ For links, but use source and destination to get route:
 \li \c TRACE_link_srcdst_variable_add_with_time(double time, const char *src, const char *dst, const char *variable, double value)
 \li \c TRACE_link_srcdst_variable_sub_with_time(double time, const char *src, const char *dst, const char *variable, double value)
 
 \li \c TRACE_link_srcdst_variable_add_with_time(double time, const char *src, const char *dst, const char *variable, double value)
 \li \c TRACE_link_srcdst_variable_sub_with_time(double time, const char *src, const char *dst, const char *variable, double value)
 
-\subsection tracing_tracing_options Tracing configuration Options
+\section tracing_tracing_options Tracing configuration Options
 
 To check which tracing options are available for your simulator, you
 can just run it with the option <b>--help-tracing</b>. These are the
 
 To check which tracing options are available for your simulator, you
 can just run it with the option <b>--help-tracing</b>. These are the
@@ -234,7 +233,7 @@ triva/uncategorized
 --cfg=triva/uncategorized:graph_uncategorized.plist
 \endverbatim
 
 --cfg=triva/uncategorized:graph_uncategorized.plist
 \endverbatim
 
-\subsection tracing_tracing_example_parameters Case studies
+\section tracing_tracing_example_parameters Case studies
 
 Some scenarios that might help you decide which tracing options
 you should use to analyze your simulator.
 
 Some scenarios that might help you decide which tracing options
 you should use to analyze your simulator.
@@ -268,7 +267,7 @@ recompiling, run your simulator with the following parameters:
 \endverbatim
 
 
 \endverbatim
 
 
-\subsection tracing_tracing_example Example of Instrumentation
+\section tracing_tracing_example Example of Instrumentation
 
 A simplified example using the tracing mandatory functions.
 
 
 A simplified example using the tracing mandatory functions.
 
@@ -306,7 +305,7 @@ int main (int argc, char **argv)
 }
 \endverbatim
 
 }
 \endverbatim
 
-\subsection tracing_tracing_analyzing Analyzing the SimGrid Traces
+\section tracing_tracing_analyzing Analyzing the SimGrid Traces
 
 The SimGrid library, during an instrumented simulation, creates a trace file in
 the Paje file format that contains the platform utilization for the simulation
 
 The SimGrid library, during an instrumented simulation, creates a trace file in
 the Paje file format that contains the platform utilization for the simulation
index 3933f92..b612461 100644 (file)
 /*! \page use Using SimGrid
 
 /*! \page use Using SimGrid
 
-\section use_welcome Welcome to SimGrid!
-
-If you don't know were to look to start with, you should probably have
-a look at the following presentation first to get the basic concepts.
-Afterward, you probably want to proceed to the \ref MSG_API. Of
-course, if you're curious or if you know what you want, you may prefer
-to go to \ref SMPI_API, or even \ref GRAS_API.
-
-The scientific bases of the SimGrid project are presented in a 3 ou 4
-hours-long tutorial. It can be found at the following locations.
- - https://gforge.inria.fr/plugins/scmgit/cgi-bin/gitweb.cgi?p=simgrid/propaganda.git;a=blob_plain;f=tutorial/simgrid-tutorial.pdf;hb=HEAD
- - http://webloria.loria.fr/~quinson/blog/2010/0628/Tutorial_at_HPCS/
-
-\latexonly
-\includepdf[nup=2x4,pages=1-]{../webcruft/simgrid-101.pdf}
-\endlatexonly
-
-\htmlonly
-<script language="javascript">
-var base="simgrid-101",max=30,cur=1;
-function pad(){ return cur < 10 ? '00' + cur : cur < 100 ? '0' + cur : '' + cur; }
-function slidemove(dir) {
-        var nums=document.getElementById('nums'), display=document.getElementById('display');
-        if (cur+dir>0 && cur+dir<=max)  cur+=dir;
-       display.src=base+'_'+pad()+'.png';
-       nums.innerHTML=(cur)+'/'+max;
-}
-</script>
-
-<div id='blah' style='text-align:center;'>
-  <div id='practical-simgrid' >
-    <img src='simgrid-101_001.png' id="display" onclick='slidemove(1)'/>
-    <br/>
-    <form>
-      <input type='button' value='&laquo; Previous' onclick="slidemove(-1)"/>
-      &nbsp;&nbsp;
-      <span id="nums">1/30</span>&nbsp;&nbsp
-      <input type='button' value='Next &raquo;' onclick="slidemove(1)"/>
-      <br/>
-      <a href='simgrid-101.pdf'>Download PDF version</a>
-    </form>
-  </div>
-</div>
-\endhtmlonly
-
-
-*/
\ No newline at end of file
+\section using_msg Using MSG
+
+Here are some examples on how to use MSG, the most used API.
+
+
+MSG comes with an extensive set of examples. It is sometimes difficult
+to find the one you need. This list aims at helping you finding the
+example from which you can learn what you want to.
+
+\subsection MSG_ex_basics Basic examples and features
+
+\subsubsection MSG_ex_asynchronous_communications Asynchronous communications
+
+
+Simulation of asynchronous communications between a sender and a receiver using a realistic platform and
+an external description of the deployment.
+
+ - \ref MSG_ext_icomms_code
+   - \ref MSG_ext_icomms_preliminary
+   - \ref MSG_ext_icomms_Sender
+   - \ref MSG_ext_icomms_Receiver
+   - \ref MSG_ext_icomms_core
+   - \ref MSG_ext_icomms_Main
+ - \ref MSG_ext_icomms_fct_Waitall
+ - \ref MSG_ext_icomms_fct_Waitany
+
+<hr>
+
+\dontinclude msg/icomms/peer.c
+
+\paragraph MSG_ext_icomms_code Code of the application
+
+\paragraph MSG_ext_icomms_preliminary Preliminary declarations
+\skip include
+\until Sender function
+
+\paragraph MSG_ext_icomms_Sender Sender function
+
+The sender send to a receiver an asynchronous message with the function "MSG_task_isend()". Cause this function is non-blocking
+we have to make "MSG_comm_test()" to know   if the communication is finished for finally destroy it with function "MSG_comm_destroy()".
+It also available to "make MSG_comm_wait()" which make both of them.
+
+  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
+   - a list of host that will accept those tasks.
+   - the time to sleep at the beginning of the function
+   - This time defined the process sleep time
+                       if time = 0 use of MSG_comm_wait()
+                       if time > 0 use of MSG_comm_test()
+
+
+\until Receiver function
+
+\paragraph MSG_ext_icomms_Receiver Receiver function
+
+This function executes tasks when it receives them. As the receiving is asynchronous we have to test the communication to know
+if it is completed or not with "MSG_comm_test()" or wait for the completion "MSG_comm_wait()".
+
+  C style arguments (argc/argv) are interpreted as:
+   - the id to use for received the communication.
+   - the time to sleep at the beginning of the function
+   - This time defined the process sleep time
+                       if time = 0 use of MSG_comm_wait()
+                       if time > 0 use of MSG_comm_test()
+
+\until Test function
+
+\paragraph MSG_ext_icomms_core Simulation core
+
+  This function is the core of the simulation and is divided only into 3 parts
+  thanks to MSG_create_environment() and MSG_launch_application().
+     -# Simulation settings : MSG_create_environment() creates a realistic
+        environment
+     -# Application deployment : create the processes on the right locations with
+        MSG_launch_application()
+     -# The simulation is run with #MSG_main()
+
+  Its arguments are:
+       - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.
+       - <i>application_file</i>: the name of a file containing a valid surfxml application description
+
+\until Main function
+
+\paragraph MSG_ext_icomms_Main Main function
+
+This initializes MSG, runs a simulation, and free all data-structures created by MSG.
+
+\until end_of_main
+
+\dontinclude msg/icomms/peer2.c
+
+\paragraph 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
+
+\paragraph 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.
+
+\paragraph MSG_ext_icomms_fct_Waitany_sender From a sender
+We can use this function to wait all sent messages.
+\dontinclude msg/icomms/peer3.c
+\skipline Sender function
+\until end_of_sender
+
+\paragraph MSG_ext_icomms_fct_Waitany_receiver From a receiver
+We can also wait for the arrival of all messages.
+\dontinclude msg/icomms/peer3.c
+\skipline Receiver function
+\until end_of_receiver
+
+\subsubsection MSG_ex_master_slave Basic Master/Slaves
+
+Simulation of a master-slave application using a realistic platform
+and an external description of the deployment.
+
+\paragraph MSG_ex_ms_TOC Table of contents:
+
+   - \ref MSG_ext_ms_preliminary
+   - \ref MSG_ext_ms_master
+   - \ref MSG_ext_ms_slave
+   - \ref MSG_ext_ms_forwarder
+   - \ref MSG_ext_ms_core
+   - \ref MSG_ext_ms_main
+   - \ref MSG_ext_ms_helping
+   - \ref MSG_ext_ms_application
+   - \ref MSG_ext_ms_platform
+
+<hr>
+
+\dontinclude msg/masterslave/masterslave_forwarder.c
+
+
+\paragraph MSG_ext_ms_preliminary Preliminary declarations
+
+\skip include
+\until printf
+\until }
+
+\paragraph MSG_ext_ms_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_launch_application().
+
+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
+   - a list of host that will accept those tasks.
+
+Tasks are dumbly sent in a round-robin style.
+
+\until end_of_master
+
+\paragraph MSG_ext_ms_slave Slave code
+
+This function has to be assigned to a #msg_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
+
+\paragraph MSG_ext_ms_forwarder Forwarder code
+
+This function has to be assigned to a #msg_process_t that has to behave
+as a forwarder. Just like the master function (described in \ref
+MSG_ext_ms_master), it should not be called directly.
+
+C style arguments (argc/argv) are interpreted as a list of host that
+will accept those tasks.
+
+This function keeps waiting for tasks and dispathes them to its slaves.
+
+\until end_of_forwarder
+
+\paragraph MSG_ext_ms_core Simulation core
+
+This function is the core of the simulation and is divided only into 3 parts
+thanks to MSG_create_environment() and MSG_launch_application().
+   -# Simulation settings : MSG_create_environment() creates a realistic
+      environment
+   -# Application deployment : create the processes on the right locations with
+      MSG_launch_application()
+   -# The simulation is run with #MSG_main()
+
+Its arguments are:
+       - <i>platform_file</i>: the name of a file containing an valid surfxml platform description.
+       - <i>application_file</i>: the name of a file containing a valid surfxml application description
+
+\until end_of_test_all
+
+\paragraph MSG_ext_ms_main Main() function
+
+This initializes MSG, runs a simulation, and free all data-structures created by MSG.
+
+\until end_of_main
+
+\subsubsection MSG_ext_ms_helping Helping files
+
+\paragraph MSG_ext_ms_application Example of application file
+
+\include msg/masterslave/deployment_masterslave.xml
+
+\paragraph MSG_ext_ms_platform Example of platform file
+
+\include msg/small_platform.xml
+
+
+
+\section using_gras Using GRAS
+
+Here are some examples on how to use GRAS.
+
+
+    There is for now rather few examples of GRAS, but it's better than
+    nothing, isn't it?
+
+       - \ref GRAS_ex_ping
+       - \ref GRAS_ex_mmrpc
+       - \ref GRAS_ex_token
+       - \ref GRAS_ex_timer
+
+
+\subsection GRAS_ex_ping Ping-Pong
+
+    This example implements the very classical ping-pong in GRAS. It
+    involves a client (initiating the ping-pong) and a server (answering to
+    client's requests).
+
+    It works the following way:
+     - Both the client and the server register all needed messages
+     - The server registers a callback to the ping message, which sends pong
+       to the expeditor
+     - The client sends the ping message to the server, and waits for the
+       pong message as an answer.
+
+    This example resides in the <b>examples/gras/ping/ping.c</b> file. Yes, both
+    the code of the client and of the server is placed in the same file. 
+
+    \subsubsection GRAS_ex_ping_toc Table of contents of the ping example
+      - \ref GRAS_ex_ping_common
+        - \ref GRAS_ex_ping_initial
+        - \ref GRAS_ex_ping_register
+      - \ref GRAS_ex_ping_server
+        - \ref GRAS_ex_ping_serdata
+       - \ref GRAS_ex_ping_sercb
+       - \ref GRAS_ex_ping_sermain
+      - \ref GRAS_ex_ping_client
+       - \ref GRAS_ex_ping_climain
+
+    <hr>
+
+    \dontinclude gras/ping/ping_common.c
+
+    \subsubsection GRAS_ex_ping_common 1) Common code to the client and the server
+
+    \paragraph GRAS_ex_ping_initial 1.a) Initial settings
+
+    Let's first load the module header and declare a logging category (see
+    \ref XBT_log for more info on logging).
+
+    \skip include
+    \until XBT_LOG
+
+    The module header <tt>ping.h</tt> reads:
+
+    \dontinclude gras/ping/ping.h
+    \skip include
+    \until argv
+    \until argv
+
+    \paragraph GRAS_ex_ping_register 1.b) Register the messages
+
+    This function, called by both the client and the server is in charge of
+    declaring the existing messages to GRAS. Since the payload does not
+    involve any newly created types but only int, this is quite easy.
+    (to exchange more complicated types, see \ref GRAS_dd or
+    \ref GRAS_ex_mmrpc for an example).
+
+    \dontinclude gras/ping/ping_common.c
+    \skip register_messages
+    \until }
+
+    [Back to \ref GRAS_ex_ping_toc]
+
+    \subsubsection GRAS_ex_ping_server 2) Server's code
+
+    \paragraph GRAS_ex_ping_serdata 2.a) The server's globals
+
+    In order to ensure the communication between the "main" and the callback
+    of the server, we need to declare some globals. We have to put them in a
+    struct definition so that they can be handled properly in GRAS.
+
+    \dontinclude gras/ping/ping_server.c
+    \skip typedef struct
+    \until }
+
+    \paragraph GRAS_ex_ping_sercb 2.b) The callback to the ping message
+
+    Here is the callback run when the server receives any ping message (this
+    will be registered later by the server).
+
+    \skip server_cb_ping_handler
+    \until end_of_server_cb_ping_handler
+
+    \paragraph GRAS_ex_ping_sermain 2.c) The "main" of the server
+
+    This is the "main" of the server. You must not write any main()
+    function yourself. Instead, you just have to write a regular function
+    like this one which will act as a main.
+
+    \skip server
+    \until end_of_server
+
+    [Back to \ref GRAS_ex_ping_toc]
+
+    \subsubsection GRAS_ex_ping_client 3) Client's code
+
+    \paragraph GRAS_ex_ping_climain 3.a) Client's "main" function
+
+    This function is quite straightforward, and the inlined comments should
+    be enough to understand it.
+
+    \dontinclude gras/ping/ping_client.c
+    \skip client
+    \until end_of_client
+
+    [Back to \ref GRAS_ex_ping_toc]
+
+\subsection GRAS_ex_token Token Ring example
+
+   This example implements the token ring algorithm. It involves several
+   nodes arranged in a ring (each of them have a left and a right neighbour)
+   and exchanging a "token". This algorithm is one of the solution to ensure
+   the mutual exclusion between distributed processes. There is only one
+   token at any time, so the process in its possession is ensured to be the
+   only one having it. So, if there is an action you want all processes to
+   do alternativly, but you cannot afford to have two processes doing it at
+   the same time, let the process having the token doing it.
+
+   Actually, there is a lot of different token ring algorithms in the
+   litterature, so this example implements one of them: the simplest one.
+   The ring is static (no new node can join it, and you'll get trouble if
+   one node dies or leaves), and nothing is done for the case in which the
+   token is lost.
+
+   - \ref GRAS_ex_stoken_deploy
+   - \ref GRAS_ex_stoken_global
+   - \ref GRAS_ex_stoken_callback
+   - \ref GRAS_ex_stoken_main
+
+   \subsection GRAS_ex_stoken_deploy 1) Deployment file
+
+   Here is the deployment file:
+   \include examples/gras/mutual_exclusion/simple_token/simple_token.xml
+
+   The neighbour of each node is given at startup as command line argument.
+   Moreover, one of the nodes is instructed by a specific argument (the one
+   on Tremblay here) to create the token at the begining of the algorithm.
+
+   \subsection GRAS_ex_stoken_global 2) Global definition
+
+   The token is incarned by a specific message, which circulates from node
+   to node (the payload is an integer incremented at each hop). So, the most
+   important part of the code is the message callback, which forwards the
+   message to the next node. That is why we have to store all variable in a
+   global, as explained in the \ref GRAS_globals section.
+
+   \dontinclude examples/gras/mutual_exclusion/simple_token/simple_token.c
+   \skip typedef
+   \until }
+
+   \subsection GRAS_ex_stoken_callback 3) The callback
+
+   Even if this is the core of this algorithm, this function is quite
+   straightforward.
+
+   \skip node_cb_stoken_handler
+   \until end_of_node_cb_stoken_handler
+
+   \subsection GRAS_ex_stoken_main 4) The main function
+
+   This function is splited in two parts: The first one performs all the
+   needed initialisations (points 1-7) while the end (point 8. below) calls
+   gras_msg_handle() as long as the planned amount of ring loops are not
+   performed.
+
+   \skip node
+   \until end_of_node
+
+\subsection GRAS_ex_mmrpc A simple RPC for matrix multiplication
+
+    This example implements a remote matrix multiplication. It involves a client
+    (creating the matrices and sending the multiplications requests) and a server
+    (computing the multiplication on client's behalf).
+
+    This example also constitutes a more advanced example of data description
+    mechanisms, since the message payload type is a bit more complicated than in
+    other examples such as the ping one (\ref GRAS_ex_ping).
+
+    It works the following way (not very different from the ping example):
+     - Both the client and the server register all needed messages and datatypes
+     - The server registers a callback to the "request" message, which computes
+       what needs to be and returns the result to the expeditor.
+     - The client creates two matrices, ask for their multiplication and check
+       the server's answer.
+
+    This example resides in the <b>examples/gras/mmrpc/mmrpc.c</b> file. 
+
+    \subsubsection GRAS_ex_mmrpc_toc Table of contents of the mmrpc example
+      - \ref GRAS_ex_mmrpc_common
+        - \ref GRAS_ex_mmrpc_header
+        - \ref GRAS_ex_mmrpc_dataregister
+        - \ref GRAS_ex_mmrpc_logdef
+        - \ref GRAS_ex_mmrpc_msgregister
+      - \ref GRAS_ex_mmrpc_server
+       - \ref GRAS_ex_mmrpc_serinc
+       - \ref GRAS_ex_mmrpc_sercb
+       - \ref GRAS_ex_mmrpc_sermain
+      - \ref GRAS_ex_mmrpc_client
+       - \ref GRAS_ex_mmrpc_cliinc
+       - \ref GRAS_ex_mmrpc_climain
+
+    <hr>
+
+
+    \subsubsection GRAS_ex_mmrpc_common 1) Common code to the client and the server (mmrpc_common.c and mmrpc.h)
+
+
+    \paragraph GRAS_ex_mmrpc_header 1.a) Module header (mmrpc.h)
+
+    This loads the gras header and declare the function's prototypes as well
+    as the matrix size.
+
+    \dontinclude gras/mmrpc/mmrpc.h
+    \skip include
+    \until argv
+    \until argv
+
+    \paragraph GRAS_ex_mmrpc_dataregister 1.b) Register the data types (mmrpc.h)
+
+    The messages involved in a matrix of double. This type is automatically
+    known by the GRAS mecanism, using the gras_datadesc_matrix() function of the
+    xbt/matrix module.
+
+    \paragraph GRAS_ex_mmrpc_logdef 1.c) Logging category definition (mmrpc_common.c)
+
+    Let's first load the module header and declare a logging category (see
+    \ref XBT_log for more info on logging). This logging category does live
+    in this file (ie the required symbols are defined here and declared as
+    "extern" in any other file using them). That is why we use
+    \ref XBT_LOG_NEW_DEFAULT_CATEGORY here and
+    \ref XBT_LOG_EXTERNAL_DEFAULT_CATEGORY in mmrpc_client.c and mmrpc_server.c.
+
+    \dontinclude gras/mmrpc/mmrpc_common.c
+    \skip include
+    \until XBT_LOG
+
+    \paragraph GRAS_ex_mmrpc_msgregister 1.d) Register the messages (mmrpc_common.c)
+
+    This function, called by both the client and the server is in charge of
+    declaring the existing messages to GRAS.
+
+    The datatype description builded that way can then be used to build an array datatype or
+    to declare messages.
+
+    \skip register_messages
+    \until }
+
+    [Back to \ref GRAS_ex_mmrpc_toc]
+
+    \subsubsection GRAS_ex_mmrpc_server 2) Server's code (mmrpc_server.c)
+
+    \paragraph GRAS_ex_mmrpc_serinc 2.a) Server intial settings
+
+    All module symbols live in the mmrpc_common.c file. We thus have to
+    define \ref XBT_DEFINE_TYPE_EXTERN to the preprocessor so that the
+    \ref XBT_DEFINE_TYPE symbols don't get included here. Likewise, we use
+    \ref XBT_LOG_EXTERNAL_DEFAULT_CATEGORY to get the log category in here.
+
+    \dontinclude gras/mmrpc/mmrpc_server.c
+    \skip define
+    \until XBT_LOG
+
+    \paragraph GRAS_ex_mmrpc_sercb 2.b) The callback to the mmrpc message
+
+    Here is the callback run when the server receives any mmrpc message (this
+    will be registered later by the server). Note the way we get the message
+    payload. In the ping example, there was one additional level of pointer
+    indirection (see \ref GRAS_ex_ping_sercb). This is because the payload is
+    an array here (ie a pointer) whereas it is a scalar in the ping example.
+
+    \skip server_cb_request_handler
+    \until end_of_server_cb_request_handler
+
+    \paragraph GRAS_ex_mmrpc_sermain 2.c) The "main" of the server
+
+    This is the "main" of the server. You must not write any main()
+    function yourself. Instead, you just have to write a regular function
+    like this one which will act as a main.
+
+    \skip server
+    \until end_of_server
+
+    [Back to \ref GRAS_ex_mmrpc_toc]
+
+    \subsubsection GRAS_ex_mmrpc_client 3) Client's code (mmrpc_client.c)
+
+    \paragraph GRAS_ex_mmrpc_cliinc 2.a) Server intial settings
+
+    As for the server, some extra love is needed to make sure that automatic
+    datatype parsing and log categories do work even if we are using several
+    files.
+
+    \dontinclude gras/mmrpc/mmrpc_client.c
+    \skip define
+    \until XBT_LOG
+
+    \paragraph GRAS_ex_mmrpc_climain 3.b) Client's "main" function
+
+    This function is quite straightforward, and the inlined comments should
+    be enough to understand it.
+
+    \dontinclude gras/mmrpc/mmrpc_client.c
+    \skip argv
+    \until end_of_client
+
+    [Back to \ref GRAS_ex_mmrpc_toc]
+
+\subsection GRAS_ex_timer Some timer games
+
+    This example fools around with the GRAS timers (\ref GRAS_timer). It is
+    mainly a regression test, since it uses almost all timer features.
+
+    The main program registers a repetititive task and a delayed one, and
+    then loops until the <tt>still_to_do</tt> variables of its globals reach
+    0. The delayed task set it to 5, and the repetititive one decrease it
+    each time. Here is an example of output:
+\verbatim Initialize GRAS
+ Initialize XBT
+ [1108335471] Programming the repetitive_action with a frequency of 1.000000 sec
+ [1108335471] Programming the delayed_action for after 2.000000 sec
+ [1108335471] Have a rest
+ [1108335472] Canceling the delayed_action.
+ [1108335472] Re-programming the delayed_action for after 2.000000 sec
+ [1108335472] Repetitive_action has nothing to do yet
+ [1108335473] Repetitive_action has nothing to do yet
+ [1108335473] delayed_action setting globals->still_to_do to 5
+ [1108335474] repetitive_action decrementing globals->still_to_do. New value: 4
+ [1108335475] repetitive_action decrementing globals->still_to_do. New value: 3
+ [1108335476] repetitive_action decrementing globals->still_to_do. New value: 2
+ [1108335477] repetitive_action decrementing globals->still_to_do. New value: 1
+ [1108335478] repetitive_action decrementing globals->still_to_do. New value: 0
+ Exiting GRAS\endverbatim
+
+    Source code:
+     - \ref GRAS_ex_timer_decl
+     - \ref GRAS_ex_timer_delay
+     - \ref GRAS_ex_timer_repeat
+     - \ref GRAS_ex_timer_main
+
+    \dontinclude timer.c
+
+    \subsubsection GRAS_ex_timer_decl   1. Declarations and headers
+    \skip include
+    \until my_globals
+
+    \subsubsection GRAS_ex_timer_delay  2. Source code of the delayed action
+    \skip repetitive_action
+    \until end_of_repetitive_action
+
+    \subsubsection GRAS_ex_timer_repeat 3. Source code of the repetitive action
+    \skip delayed_action
+    \until end_of_delayed_action
+
+    \subsubsection GRAS_ex_timer_main   4. Source code of main function
+    \skip client
+    \until end_of_client
+
+
+*/
+
+
index 8ee9d55..2014f2c 100644 (file)
@@ -39,7 +39,7 @@ static int periodic_lookup_delay = 10;
 
 extern long int smx_total_comms;
 
 
 extern long int smx_total_comms;
 
-/**
+/*
  * Finger element.
  */
 typedef struct s_finger {
  * Finger element.
  */
 typedef struct s_finger {
@@ -47,7 +47,7 @@ typedef struct s_finger {
   char mailbox[MAILBOX_NAME_SIZE]; // string representation of the id
 } s_finger_t, *finger_t;
 
   char mailbox[MAILBOX_NAME_SIZE]; // string representation of the id
 } s_finger_t, *finger_t;
 
-/**
+/*
  * Node data.
  */
 typedef struct s_node {
  * Node data.
  */
 typedef struct s_node {
@@ -74,7 +74,7 @@ typedef enum {
   TASK_PREDECESSOR_LEAVING
 } e_task_type_t;
 
   TASK_PREDECESSOR_LEAVING
 } e_task_type_t;
 
-/**
+/*
  * Data attached with the tasks sent and received
  */
 typedef struct s_task_data {
  * Data attached with the tasks sent and received
  */
 typedef struct s_task_data {
index 058b525..4e2157e 100644 (file)
@@ -47,7 +47,7 @@ typedef struct s_node_job{
   xbt_matrix_t B;
 } s_node_job_t, *node_job_t;
 
   xbt_matrix_t B;
 } s_node_job_t, *node_job_t;
 
-/**
+/*
  * Structure for recovering results
  */
 typedef struct s_result {
  * Structure for recovering results
  */
 typedef struct s_result {
index c8d56be..338e793 100644 (file)
@@ -779,7 +779,7 @@ int MSG_task_listen_from(const char *alias)
  * previously declared with the function #TRACE_category
  * (or with #TRACE_category_with_color).
  *
  * previously declared with the function #TRACE_category
  * (or with #TRACE_category_with_color).
  *
- * See \ref tracing_tracing for details on how to trace
+ * See \ref tracing for details on how to trace
  * the (categorized) resource utilization.
  *
  * \param task the task that is going to be categorized
  * the (categorized) resource utilization.
  *
  * \param task the task that is going to be categorized