Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This file is now generated by cmake.
[simgrid.git] / doc / FAQ.doc
index a95cada..5f8f91c 100644 (file)
@@ -108,28 +108,6 @@ CMake needs some prerequists like :
   \li ccmake for graphical used of CMake
   \li cmake <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
 
   \li ccmake for graphical used of CMake
   \li cmake <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
 
-For windows only : 
-  \li Visual C++ 2010 Express <a href="http://www.microsoft.com/express/Downloads/#2010-Visual-CPP">(download page)</a>
-  \li cmake <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
-  \li Set CC, CXX, INCLUDE, LIB and RC to environment variables.
-\verbatim
-SET --> CC     TO --> C:\MicrosoftVisualStudio10\VC\bin\cl
-    --> CXX       --> C:\MicrosoftVisualStudio10\VC\bin\cl
-    --> INCLUDE           --> C:\MicrosoftVisualStudio10\VC\include;C:\Program Files\Microsoft SDKs\Windows\v7.OA\Include
-    --> LIB       --> C:\MicrosoftVisualStudio10\VC\lib;C:\Program Files\Microsoft SDKs\Windows\v7.OA\Lib
-    --> RC        --> C:\Program Files\Microsoft SDKs\Windows\v7.OA\bin\RC
-\endverbatim
-  \li Add to environment variable "Path" the path where to find nmake executable and some needed files.
-\verbatim
-......
-;C\MicrosoftVisualStudio10\VC\bin
-;C\MicrosoftVisualStudio10\Common7\IDE
-;C:\Program Files\Microsoft SDKs\Windows\v7.OA\bin
-;C:\Program Files\Microsoft SDKs\Windows\v7.OA\Lib
-;C:\Program Files\Microsoft SDKs\Windows\v7.OA\bInclude
-\endverbatim  
-\subsection faq_cmakeoption Cmake options
-
 \subsubsection faq_cmakeoption1 Liste of options
 
 \verbatim
 \subsubsection faq_cmakeoption1 Liste of options
 
 \verbatim
@@ -466,9 +444,14 @@ make install
 \subsubsection faq_cmakeinstall2 From a distrib
 
 \verbatim
 \subsubsection faq_cmakeinstall2 From a distrib
 
 \verbatim
-cmake -Dprefix=/home/navarrop/Bureau/install_simgrid ./
-make
-make install
+For version 3.4.1 and 3.4
+       cmake -Dprefix=/home/navarrop/Bureau/install_simgrid ./
+       make
+       make install-simgrid
+Since version 3.5
+       cmake -Dprefix=/home/navarrop/Bureau/install_simgrid ./
+       make
+       make install
 \endverbatim
 
 \subsection faq_cmakehowto How to modified sources files for developers
 \endverbatim
 
 \subsection faq_cmakehowto How to modified sources files for developers
@@ -1068,22 +1051,32 @@ you still don't see how to do it, please come back to us...
 
 \subsubsection faq_MIA_asynchronous I want to do asynchronous communications in MSG
 
 
 \subsubsection faq_MIA_asynchronous I want to do asynchronous communications in MSG
 
-Up until now, there is no asynchronous communications in MSG. However,
-you can create as many process as you want so you should be able to do
-whatever you want... I've written a queue module to help implementing
-some asynchronous communications at low cost (creating thousands of
-process only to handle communications may be problematic in term of
-performance at some point). I'll add it in the distribution asap.
+In the past (version <= 3.4), there was no function to perform asynchronous communications. 
+It could easily be implemented by creating new process when needed though. Since version 3.5, 
+we have introduced the following functions:
+ - MSG_task_isend()
+ - MSG_task_irecv()
+ - MSG_comm_test()
+ - MSG_comm_wait()
+ - MSG_comm_waitall()
+ - MSG_comm_waitany()
+ - MSG_comm_destroy()
+
+We refer you to the description of these functions for more details on their usage as well 
+as to the exemple section on \ref MSG_ex_asynchronous_communications.
 
 \subsubsection faq_MIA_thread_synchronization I need to synchronize my MSG processes
 
 
 \subsubsection faq_MIA_thread_synchronization I need to synchronize my MSG processes
 
-You obviously cannot use pthread_mutexes of pthread_conds. The best
-thing would be to propose similar structures. Unfortunately, we
-haven't found time to do it yet. However you can try to play with
-MSG_process_suspend() and MSG_process_resume(). You can even do some
-synchronization with fake communications (using MSG_task_get(),
+You obviously cannot use pthread_mutexes of pthread_conds since we handle every 
+scheduling related decision within SimGrid. 
+
+In the past (version <=3.3.4) you could do it by playing with
+MSG_process_suspend() and MSG_process_resume() or with fake communications (using MSG_task_get(),
 MSG_task_put() and MSG_task_Iprobe()).
 
 MSG_task_put() and MSG_task_Iprobe()).
 
+Since version 3.4, you can use classical synchronization structures. See page \ref XBT_synchro or simply check in
+include/xbt/synchro_core.h.
+
 \subsubsection faq_MIA_host_load Where is the get_host_load function hidden in MSG?
 
 There is no such thing because its semantic wouldn't be really
 \subsubsection faq_MIA_host_load Where is the get_host_load function hidden in MSG?
 
 There is no such thing because its semantic wouldn't be really
@@ -1374,7 +1367,38 @@ annotate Tiers-generated topologies. This perl-script is in
 <tt>tools/platform_generation/</tt> directory of the SVN. Dinda et Al.
 released a very comparable tool, and called it GridG.
 
 <tt>tools/platform_generation/</tt> directory of the SVN. Dinda et Al.
 released a very comparable tool, and called it GridG.
 
-\subsubsection faq_SURF_dynamic Expressing dynamic resource availability in platform files
+\subsubsection faq_SURF_multicore Modeling multi-core resources 
+
+There is currently no native support for multi-core or SMP machines in
+SimGrid. We are currently working on it, but coming up with the right
+model is very hard: Cores share caches and bus to access memory and
+thus interfere with each others. Memory contention is a crucial
+component of multi-core modeling.
+
+In the meanwhile, some user-level tricks can reveal sufficient for
+you. For example, you may model each core by a CPU and add some very
+high speed links between them. This complicates a bit the user code
+since you have to remember that when you assign something to a (real)
+host, it can be any of the (fake) hosts representing the cores of a
+given machine. For that, you can use the prop tag of the XML files as
+follows. Your code should then look at the ‘machine’ property
+associated with each workstation, and run parallel tasks over all
+cores of the machine.
+
+\verbatim
+  <host id="machine0/core0" power="91500E6">
+    <prop id="machine" value="machine0"/>
+    <prop id="core" value="0"/>
+  </host>
+  <host id="machine0/core1" power="91500E6">
+    <prop id="machine" value="machine0"/>
+    <prop id="core" value="1"/>
+</host>
+
+
+\endverbatim
+
+\subsubsection faq_SURF_dynamic Modeling dynamic resource availability 
 
 A nice feature of SimGrid is that it enables you to seamlessly have
 resources whose availability change over time. When you build a
 
 A nice feature of SimGrid is that it enables you to seamlessly have
 resources whose availability change over time. When you build a
@@ -2045,8 +2069,8 @@ be relative locally.
 For <em>LINK</em> we have:
 \verbatim
   LINK = {
 For <em>LINK</em> we have:
 \verbatim
   LINK = {
-    src = SrcHost;
-    dst = DstHost;
+    src = source;
+    dst = destination;
     
     size = bandwidth;
     scale = global;
     
     size = bandwidth;
     scale = global;
@@ -2055,7 +2079,7 @@ For <em>LINK</em> we have:
 For the types specified in the <em>edge</em> parameter (such as <em>LINK</em>),
 the configuration must contain two additional parameters: <em>src</em> and
 <em>dst</em> that are used to properly identify which nodes this edge is
 For the types specified in the <em>edge</em> parameter (such as <em>LINK</em>),
 the configuration must contain two additional parameters: <em>src</em> and
 <em>dst</em> that are used to properly identify which nodes this edge is
-connecting. The values <em>SrcHost</em> and <em>DstHost</em> are always present
+connecting. The values <em>source</em> and <em>destination</em> are always present
 in the SimGrid trace file and should not be changed in the configuration. The
 parameter <em>size</em> for the LINK, in this case, is configured as the
 variable <em>bandwidth</em>, with a <em>global</em> scale. The scale meaning
 in the SimGrid trace file and should not be changed in the configuration. The
 parameter <em>size</em> for the LINK, in this case, is configured as the
 variable <em>bandwidth</em>, with a <em>global</em> scale. The scale meaning
@@ -2093,8 +2117,8 @@ as configuration for HOST and LINK this:
   };
 
   LINK = {
   };
 
   LINK = {
-    src = SrcHost;
-    dst = DstHost;
+    src = source;
+    dst = destination;
     size = bandwidth;
     scale = global;
 
     size = bandwidth;
     scale = global;
 
@@ -2156,8 +2180,8 @@ visualization was generated with the following configuration:
     };
   };
   LINK = {
     };
   };
   LINK = {
-    src = SrcHost;
-    dst = DstHost;
+    src = source;
+    dst = destination;
     size = bandwidth;
     scale = global;
 
     size = bandwidth;
     scale = global;
 
@@ -2222,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
@@ -2254,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()
@@ -2267,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 
@@ -2278,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
@@ -2290,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
@@ -2302,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};