From: paul bedaride Date: Fri, 19 Oct 2012 12:12:45 +0000 (+0200) Subject: clean user guide X-Git-Tag: v3_8~27^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4cc3a40d551a1480c31732dcc91adefc127801aa clean user guide --- diff --git a/buildtools/Cmake/GenerateUserGuide.cmake b/buildtools/Cmake/GenerateUserGuide.cmake index 1a8f4e14ba..9014e95186 100644 --- a/buildtools/Cmake/GenerateUserGuide.cmake +++ b/buildtools/Cmake/GenerateUserGuide.cmake @@ -204,11 +204,11 @@ ADD_CUSTOM_TARGET(user_guide_pdf COMMAND make clean COMMAND make pdf || true COMMAND ${CMAKE_COMMAND} -E echo "XX Second pass simgrid_user_guide.pdf" - COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/latex/refman.pdf + COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/user_guide/latex/refman.pdf COMMAND make pdf || true COMMAND ${CMAKE_COMMAND} -E echo "XX Write Simgrid_documentation.pdf" - COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_HOME_DIRECTORY}/doc/latex/refman.pdf ${CMAKE_HOME_DIRECTORY}/doc/latex/simgrid_documentation.pdf + COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_HOME_DIRECTORY}/doc/user_guide/latex/refman.pdf ${CMAKE_HOME_DIRECTORY}/doc/latex/simgrid_documentation.pdf - WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/latex/ + WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/user_guide/latex/ ) add_dependencies(user_guide_pdf user_guide) diff --git a/doc/user_guide/doxygen/UserGuideDoxyfile.in b/doc/user_guide/doxygen/UserGuideDoxyfile.in index 1bf013f09a..189a612296 100644 --- a/doc/user_guide/doxygen/UserGuideDoxyfile.in +++ b/doc/user_guide/doxygen/UserGuideDoxyfile.in @@ -934,13 +934,13 @@ HTML_FILE_EXTENSION = .html # have to redo this when upgrading to a newer version of doxygen or when # changing the value of configuration settings such as GENERATE_TREEVIEW! -HTML_HEADER = +HTML_HEADER = header.html # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to @@ -949,7 +949,7 @@ HTML_FOOTER = # the style sheet file to the HTML output directory, so don't put your own # style sheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = stylesheet.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1343,7 +1343,7 @@ LATEX_BATCHMODE = NO # include the index chapters (such as File Index, Compound Index, etc.) # in the output. -LATEX_HIDE_INDICES = NO +LATEX_HIDE_INDICES = YES # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. diff --git a/doc/user_guide/doxygen/UserGuideDoxygenLayout.xml b/doc/user_guide/doxygen/UserGuideDoxygenLayout.xml index 0dafdbcb34..db4ab88f75 100644 --- a/doc/user_guide/doxygen/UserGuideDoxygenLayout.xml +++ b/doc/user_guide/doxygen/UserGuideDoxygenLayout.xml @@ -21,13 +21,6 @@ - - - - - - - diff --git a/doc/user_guide/doxygen/bindings.doc b/doc/user_guide/doxygen/bindings.doc index 97ffbfa701..720640256e 100644 --- a/doc/user_guide/doxygen/bindings.doc +++ b/doc/user_guide/doxygen/bindings.doc @@ -48,7 +48,7 @@ this function return directly the task recevied. \dontinclude lua/masterslave/master_slave.lua \li Set Environmenet and run application -\until simgrid.clean() +\until end-of-master-slave \subsection bindings_binding_lua_example_data Exchanging Data You can also exchange data between Process using lua. for that, you have to deal with lua task as a table, @@ -154,105 +154,105 @@ 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 +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 - - \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 - \subsubsection MSG_ext_ms_master_lua Master code - - as described in the C native master/Slave example, this function has to be assigned to a msg_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 - +as described in the C native master/Slave example, this function has to be assigned to a msg_process_t that will behave as the master. - \subsubsection MSG_ext_ms_slave_lua Slave code +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. - This function has to be assigned to a #msg_process_t that has to behave as a slave. - This function keeps waiting for tasks and executes them as it receives them. +Tasks are dumbly sent in a round-robin style. +\dontinclude lua/masterslave/master.lua +\skip Dispatch the tasks +\until Done sending +\until end - \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 - : require "simgrid" +\subsubsection MSG_ext_ms_slave_lua Slave code - -# Simulation settings : simgrid.platform creates a realistic - environment - -# Application deployment : create the processes on the right locations with - simgrid.application - -# The simulation is run with simgrid.run +This function has to be assigned to a #msg_process_t that has to behave as a slave. +This function keeps waiting for tasks and executes them as it receives them. +\dontinclude lua/masterslave/slave.lua +\until end_of_slave +\subsubsection MSG_ext_ms_core_lua Simulation core - Its arguments are: - - platform_file: the name of a file containing an valid surfxml platform description.( first command line argument) - - application_file: the name of a file containing a valid surfxml application description ( second commande line argument ) +in this section the core of the simulation which start by including the simgrid lib for bindings +: require "simgrid" - \until simgrid.clean() +-# Simulation settings : simgrid.platform creates a realistic + environment +-# Application deployment : create the processes on the right locations with + simgrid.application +-# The simulation is run with simgrid.run +Its arguments are: +- platform_file: the name of a file containing an valid surfxml platform description.( first command line argument) +- application_file: the name of a file containing a valid surfxml application description ( second commande line argument ) +\dontinclude lua/masterslave/master_slave.lua +\skip platform +\until run - \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 +\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 +\subsubsection MSG_ext_ms_bp_master_lua Master code - as described in the C native master/Slave example, this function has to be assigned to a msg_process_t that will behave as the master. +as described in the C native master/Slave example, this function has to be assigned to a msg_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. +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. +Tasks are dumbly sent in a round-robin style. - \until end_of_master +\dontinclude lua/console/master.lua +\until end_of_master +\subsubsection MSG_ext_ms_bp_slave_lua Slave code - \subsubsection MSG_ext_ms_bp_slave_lua Slave code +This function has to be assigned to a #msg_process_t that has to behave as a slave. +This function keeps waiting for tasks and executes them as it receives them. - This function has to be assigned to a #msg_process_t that has to behave as a slave. - This function keeps waiting for tasks and executes them as it receives them. +\dontinclude lua/console/slave.lua +\until end_of_slave - \until end_of_slave - \subsubsection MSG_ext_ms_bp_core_lua Simulation core +\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. - : require "simgrid" +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. +: require "simgrid" - -# Hosts : simgrid.Host.new instanciate a new host with an id, and power. - -# Links : simgrid.Link.new instanictae a new link that will require an id, bandwith and latency values. - -# Route : simgrid.Route.new define a route between two hosts specifying the links to use. - -# Simulation settings : simgrid.register_platform(); register own platform without using the XML SURF parser. +-# Hosts : simgrid.Host.new instanciate a new host with an id, and power. +-# Links : simgrid.Link.new instanictae a new link that will require an id, bandwith and latency values. +-# Route : simgrid.Route.new define a route between two hosts specifying the links to use. +-# Simulation settings : simgrid.register_platform(); 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. - - simgrid.Host.setFunction: associate a function to a host, specifying arguments if needed. - - simgrid.register_application(): saving the deployment settings before running the simualtion. +we can also bypass the XML deployment file, and associate functions for each of defined hosts. +- simgrid.Host.setFunction: associate a function to a host, specifying arguments if needed. +- simgrid.register_application(): saving the deployment settings before running the simualtion. - \until simgrid.clean() +\include lua/console/master_slave_bypass.lua */ diff --git a/doc/user_guide/doxygen/install.doc b/doc/user_guide/doxygen/install.doc index 9f34aba73b..9269988742 100644 --- a/doc/user_guide/doxygen/install.doc +++ b/doc/user_guide/doxygen/install.doc @@ -273,10 +273,12 @@ cmake_minimum_required(VERSION 2.6) set(EXECUTABLE_OUTPUT_PATH "./") set(LIBRARY_OUTPUT_PATH "${CMAKE_HOME_DIRECTORY}/lib") -add_executable(get_sender get_sender.c) #add_executable( ) +#add_executable( ) +add_executable(get_sender get_sender.c) ### Add definitions for compile -target_link_libraries(get_sender simgrid m pthread) #target_link_libraries( ) +#target_link_libraries( ) +target_link_libraries(get_sender simgrid m pthread) \endverbatim Then you have to modified /buildtools/Cmake/MakeExeLib.cmake and add @@ -362,7 +364,8 @@ compiling a source file. There are: \verbatim - HelloWorld.c The example source file. - CMakeLists.txt It allows to configure the project. -- FindPCRE.cmake This finds and links to the pcre library (Normally included into Simgrid directory "GnuWin32"). +- FindPCRE.cmake This finds and links to the pcre library (Normally included + into Simgrid directory "GnuWin32"). - README This explaination. \endverbatim @@ -385,8 +388,10 @@ create a target with the same name of the source. ################ # FIND TARGETS # ################ -add_executable(TARGET_NAME SOURCES) #It creates a target called 'TARGET_NAME.exe' with the sources 'SOURCES' -target_link_libraries(TARGET_NAME simgrid pcre) #Links TARGET_NAME with simgrid and pcre +#It creates a target called 'TARGET_NAME.exe' with the sources 'SOURCES' +add_executable(TARGET_NAME SOURCES) +#Links TARGET_NAME with simgrid and pcre +target_link_libraries(TARGET_NAME simgrid pcre) \endverbatim \li To initialize and build your project, you'll need to run \verbatim @@ -428,22 +433,19 @@ Suppose your simulation has the following structure (remember it is just an example to illustrate a possible way to compile everything; feel free to organize it as you want). - \li sched.h: a description of the core of the - scheduler (i.e. which functions are can be used by the - agents). For example we could find the following functions - (master, forwarder, slave). - - \li sched.c: a C file including sched.h and - implementing the core of the scheduler. Most of these - functions use the MSG functions defined in section \ref - msg_task_usage. - - \li masterslave.c: a C file with the main function, i.e. - the MSG initialization (MSG_init()), the platform - creation (e.g. with MSG_create_environment()), the - deployment phase (e.g. with MSG_function_register() and - MSG_launch_application()) and the call to - MSG_main()). +\li sched.h: a description of the core of the + scheduler (i.e. which functions are can be used by the + agents). For example we could find the following functions + (master, forwarder, slave). +\li sched.c: a C file including sched.h and + implementing the core of the scheduler. Most of these + functions use the MSG functions defined in section \ref + msg_task_usage. +\li masterslave.c: a C file with the main function, i.e. + the MSG initialization (MSG_init()), the platform + creation (e.g. with MSG_create_environment()), the + deployment phase (e.g. with MSG_function_register() and + MSG_launch_application()) and the call to MSG_main()). To compile such a program, we suggest to use the following Makefile. It is a generic Makefile that we have used many times with diff --git a/doc/user_guide/doxygen/use.doc b/doc/user_guide/doxygen/use.doc index fecf76e66f..c7455fe80e 100644 --- a/doc/user_guide/doxygen/use.doc +++ b/doc/user_guide/doxygen/use.doc @@ -236,34 +236,32 @@ Here are some examples on how to use GRAS. You should also check our online tutorial section that contains a dedicated tutorial. \endhtmlonly +There is for now rather few examples of GRAS, but it's better than +nothing, isn't it? - - 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 +- \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). +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. +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 examples/gras/ping/ping.c file. Yes, both - the code of the client and of the server is placed in the same file. +This example resides in the examples/gras/ping/ping.c 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 +\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 @@ -416,24 +414,24 @@ You should also check our online examples/gras/mmrpc/mmrpc.c file. +This example resides in the examples/gras/mmrpc/mmrpc.c file. - \subsubsection GRAS_ex_mmrpc_toc Table of contents of the mmrpc example +\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 @@ -555,13 +553,13 @@ You should also check our online tutorial section that contains a dedicated tutorial. -\endhtmlonly \section using_MC Using Model Checking -\htmlonly You should check our online tutorial section that contains a dedicated tutorial. -\endhtmlonly \section using_trace Using Trace Check out the \ref tracing section. -\htmlonly + You should check our online tutorial section that contains a dedicated tutorial. -\endhtmlonly \section using_simdag Using SimDag -\htmlonly You should check our online tutorial section that contains a dedicated tutorial. -\endhtmlonly \section using_simix Using SIMIX -\htmlonly You should check our online tutorial section that contains a dedicated tutorial. -\endhtmlonly - */ diff --git a/examples/lua/masterslave/master.lua b/examples/lua/masterslave/master.lua index f4094d03a5..2ee7f419df 100644 --- a/examples/lua/masterslave/master.lua +++ b/examples/lua/masterslave/master.lua @@ -30,5 +30,5 @@ function Master(...) finalize:send(alias) end simgrid.info("Everything's done.") -end -- Master +end -- end_of_master diff --git a/examples/lua/masterslave/master_slave.lua b/examples/lua/masterslave/master_slave.lua index 6fe6850ff5..984dba7344 100644 --- a/examples/lua/masterslave/master_slave.lua +++ b/examples/lua/masterslave/master_slave.lua @@ -8,4 +8,4 @@ simgrid.platform(arg[1] or "../../msg/small_platform.xml") simgrid.application(arg[2] or "../deploy.xml") simgrid.run() simgrid.info("Simulation's over. See you.") - +-- end-of-master-slave diff --git a/examples/lua/masterslave/slave.lua b/examples/lua/masterslave/slave.lua index f2b8a1274f..875698362a 100644 --- a/examples/lua/masterslave/slave.lua +++ b/examples/lua/masterslave/slave.lua @@ -21,5 +21,5 @@ function Slave(...) end simgrid.info("I'm done. See you!") -end -- Slave +end -- end_of_slave