Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Biggest commit ever (SIMIX2): the user processes can now run in parallel
[simgrid.git] / doc / FAQ.doc
index ee25a43..b87c56b 100644 (file)
@@ -465,7 +465,7 @@ You must specified where to create the executable, source list, dependencies and
 cmake_minimum_required(VERSION 2.6)
 
 set(EXECUTABLE_OUTPUT_PATH "./")                       
 cmake_minimum_required(VERSION 2.6)
 
 set(EXECUTABLE_OUTPUT_PATH "./")                       
-set(LIBRARY_OUTPUT_PATH "${PROJECT_DIRECTORY}/lib")
+set(LIBRARY_OUTPUT_PATH "${CMAKE_HOME_DIRECTORY}/lib")
 
 add_executable(get_sender get_sender.c)                                        #add_executable(<name_of_target> <src list>)
 
 
 add_executable(get_sender get_sender.c)                                        #add_executable(<name_of_target> <src list>)
 
@@ -476,7 +476,7 @@ target_link_libraries(get_sender simgrid m pthread -fprofile-arcs)  #target_link
 Then you have to modified <project/directory>/buildtools/Cmake/MakeExeLib.cmake and add 
 this line :
 \verbatim
 Then you have to modified <project/directory>/buildtools/Cmake/MakeExeLib.cmake and add 
 this line :
 \verbatim
-add_subdirectory(${PROJECT_DIRECTORY}/<path_where_is_CMakeList.txt>)
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/<path_where_is_CMakeList.txt>)
 \endverbatim
 
 \subsubsection faq_cmakehowto2 Delete/add sources to lib.
 \endverbatim
 
 \subsubsection faq_cmakehowto2 Delete/add sources to lib.
@@ -485,18 +485,18 @@ If you want modified, add or delete source files from a library you have to edit
 
 \verbatim
 set(JMSG_JAVA_SRC
 
 \verbatim
 set(JMSG_JAVA_SRC
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/MsgException.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/JniException.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/NativeException.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/HostNotFoundException.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/ProcessNotFoundException.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/Msg.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/Process.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/Host.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/Task.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/MsgNative.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/ApplicationHandler.java
-       ${PROJECT_DIRECTORY}/src/java/simgrid/msg/Sem.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/MsgException.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/JniException.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/NativeException.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/HostNotFoundException.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/ProcessNotFoundException.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Msg.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Process.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Host.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Task.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/MsgNative.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/ApplicationHandler.java
+       ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Sem.java
 )
 \endverbatim
 
 )
 \endverbatim
 
@@ -506,7 +506,7 @@ If you want modified, add or delete tests you have to edit <project/directory>/b
 with this function : ADD_TEST(<name> <bin> <ARGS>)
 
 \verbatim
 with this function : ADD_TEST(<name> <bin> <ARGS>)
 
 \verbatim
-add_test(test-simdag-1 ${PROJECT_DIRECTORY}/testsuite/simdag/sd_test --cfg=path:${PROJECT_DIRECTORY}/testsuite/simdag small_platform_variable.xml)
+add_test(test-simdag-1 ${CMAKE_HOME_DIRECTORY}/testsuite/simdag/sd_test --cfg=path:${CMAKE_HOME_DIRECTORY}/testsuite/simdag small_platform_variable.xml)
 \endverbatim
 
 \subsection faq_PIPOL Pipol-remote
 \endverbatim
 
 \subsection faq_PIPOL Pipol-remote
@@ -2246,30 +2246,27 @@ void MC_assert(int prop);
 \endverbatim
 
 \subsection faq_binding_lua Lua Binding
 \endverbatim
 
 \subsection faq_binding_lua Lua Binding
-Most of Simgrid modules require a  good level in C programming ,
- since simgrid is used to be as standard C library .
- Sometime ( for some reason or another ) developers prefer using some kind of « easy scripts »
- (something like … lua ? Ruby ? ...?) or a language easier to code with ( Java ? ) for their works,
- which avoid dealing with C errors , and sometime an important  gain of time (coding-time?) .
-Besides Java Binding, Lua  and Ruby bindings are available now( since version 3.4 of Simgrid )
-for MSG Module, and we are currenlty working on bindings for other modules .
+Most of Simgrid modules require a  good level in C programming, since simgrid is used to be as standard C library.
+ Sometime users prefer using some kind of « easy scripts » or a language easier to code with, for their works,
+ which avoid dealing with C errors, and sometime an important  gain of time.
+Besides Java Binding, Lua  and Ruby bindings are available since version 3.4 of Simgrid
+for MSG Module, and we are currenlty working on bindings for other modules.
 
 
 \subsubsection faq_binding_lua_about What is lua ?
 
 
 \subsubsection faq_binding_lua_about What is lua ?
-Lua (Moon for portuguese !) is a lightweight, reflective, imperative and functional programming language,
- designed as a scripting language with extensible semantics as a primary goal.(see official web site <a href="http://www.lua.org">here</a>)
+Lua is a lightweight, reflective, imperative and functional programming language,
+ designed as a scripting language with extensible semantics as a primary goal (see official web site <a href="http://www.lua.org">here</a>).
 \subsubsection faq_binding_lua_why Why lua ?
 \subsubsection faq_binding_lua_why Why lua ?
-Lua is a fast,portable and powerful script language, quite simple to use for developpers .
+Lua is a fast, portable and powerful script language, quite simple to use for developpers.
 it combines procedural features with powerful data description facilities,
  by using a simple, yet powerful, mechanism of tables.
 Lua has a relatively simple C API compared to other scripting languages,
 and accordingly it provides a robust, easy to use it.
 \subsubsection faq_binding_lua_simgrid How to use lua in Simgrid ?
 it combines procedural features with powerful data description facilities,
  by using a simple, yet powerful, mechanism of tables.
 Lua has a relatively simple C API compared to other scripting languages,
 and accordingly it provides a robust, easy to use it.
 \subsubsection faq_binding_lua_simgrid How to use lua in Simgrid ?
-Actually , the use of lua in Simgrid is quite simple, you have just to follow the same steps as coding with C in Simgird,
- but this time, code with Lua ;) :
+Actually, the use of lua in Simgrid is quite simple, you have just to follow the same steps as coding with C in Simgird :
   - Coding functions coresponding to each process
   - loading the platforme/deployment XML file that describe the environment of simulation
   - Coding functions coresponding to each process
   - loading the platforme/deployment XML file that describe the environment of simulation
-  - and … Running the Simulation !!!
+  - and … Running the Simulation.
   
 \dontinclude lua/master_slave.lua
 \subsubsection faq_binding_lua_example_master_slave Master/Slave Example
   
 \dontinclude lua/master_slave.lua
 \subsubsection faq_binding_lua_example_master_slave Master/Slave Example
@@ -2278,12 +2275,12 @@ Actually , the use of lua in Simgrid is quite simple, you have just to follow th
  \until end_of_master
 we mainly  use   simgrid.Task.new(task_name,computation_size,communication_size) to create our MSG Task, 
         then simgrid.Task.send(task,alias) to send it.
  \until end_of_master
 we mainly  use   simgrid.Task.new(task_name,computation_size,communication_size) to create our MSG Task, 
         then simgrid.Task.send(task,alias) to send it.
-we  use also simgrid.Task.name(task), to get the task's name 
+we use also simgrid.Task.name(task), to get the task's name
 
 \li Slave Code
 \until end_of_slave
 
 \li Slave Code
 \until end_of_slave
-Here, we could see how we use  simgrid.Task.recv(alias) to receive a task with a specific alias,
-this function return directly the task recevied .
+Here, we see the use of simgrid.Task.recv(alias) to receive a task with a specific alias,
+this function return directly the task recevied.
 
 \li Set Environmenet and run application
 \until simgrid.clean()
 
 \li Set Environmenet and run application
 \until simgrid.clean()
@@ -2291,7 +2288,7 @@ this function return directly the task recevied .
 \subsubsection faq_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,
 since lua is based itself on a mechanism of tables,
 \subsubsection faq_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,
 since lua is based itself on a mechanism of tables,
-so  you can exchange any kind of data ( tables, matrix, strings … ) between process via tasks.
+so you can exchange any kind of data (tables, matrix, strings,…) between process via tasks.
 
 \li Sender process
 \verbatim 
 
 \li Sender process
 \verbatim 
@@ -2302,8 +2299,8 @@ so  you can exchange any kind of data ( tables, matrix, strings … ) between pr
   …
   simgrid.Task.send(task,alias)
 \endverbatim
   …
   simgrid.Task.send(task,alias)
 \endverbatim
-       After creating task, we associate to it  various kind of data with a specific key,( string in this case)
-       to distinguish between data variables. Via this key the receiver could access easily to  datas.
+       After creating task, we associate to it various kind of data with a specific key (string in this case)
+       to distinguish between data variables. The receiver will use this key to access easily to datas.
 
 
 \li Receiver processe
 
 
 \li Receiver processe
@@ -2314,9 +2311,9 @@ so  you can exchange any kind of data ( tables, matrix, strings … ) between pr
   sender_message = task['message']
   ...
 \endverbatim
   sender_message = task['message']
   ...
 \endverbatim
-       Note that in lua, both sender and receiver share the same lua task
+       Note that in lua, both sender and receiver share the same lua task.
        So that the receiver could joint data directly on the received task without sending it back.
        So that the receiver could joint data directly on the received task without sending it back.
-       You can find  a complet example ( matrix multiplication case ) in the file example/lua/mult_matrix.lua 
+       You can find  a complet example (matrix multiplication case) in the file example/lua/mult_matrix.lua. 
 
 
 \subsubsection faq_binding_lua_example_bypass Bypass XML
 
 
 \subsubsection faq_binding_lua_example_bypass Bypass XML
@@ -2326,6 +2323,11 @@ so  you can exchange any kind of data ( tables, matrix, strings … ) between pr
      ( this can be useful for large platforms, so a simple for loop will avoid you to deal with an annoying XML File ;) )
      
 
      ( this can be useful for large platforms, so a simple for loop will avoid you to deal with an annoying XML File ;) )
      
 
+\li set Routing mode
+\verbatim
+   simgrid.AS.new{id="AS0",mode="Full"};
+\endverbatim
+
 \li set Hosts
 \verbatim
   simgrid.Host.new{id="Tremblay",power=98095000};
 \li set Hosts
 \verbatim
   simgrid.Host.new{id="Tremblay",power=98095000};