Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
doc improvements: mainly intro of platf and deployment
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 29 Apr 2017 21:38:38 +0000 (23:38 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 29 Apr 2017 21:38:38 +0000 (23:38 +0200)
doc/doxygen/deployment.doc
doc/doxygen/getting_started.doc
doc/doxygen/platform.doc

index 3870070..5d24f76 100644 (file)
@@ -1,15 +1,40 @@
 /*! @page deployment Deploy the simulation
 
-When you want to simulate the behavior of your code with SimGrid, you need
-to tell SimGrid exactly what code (that you wrote) is supposed to be run by which host - so you need to assign
-processes/functions to hosts. The hosts in question here are the hosts of your platform model; see Section @ref platform for details on how to set one up.
-
-This assignment of the form @c code -> @c host is what the deployment file is all about, which will
-be discussed briefly here.
-
-@note 
-    You can bypass the deployment file by hardcoding it in your user code, at least when you're using
-    MSG.
+Once you've specified your @ref platform "virtual platform" and the
+@ref application "application" you want to study, you must describe
+the mapping of the application onto the platform. This page says how
+to do that if you go for online simulation (that is, the study of a
+program), you must say which code starts on which host, with which
+parameters. You can also go for offline simulation, i.e. the study of
+a trace captured from a past applicative run, as briefly explained
+@ref XBT_replay "here".
+
+There is two ways to specify the mapping of your program onto virtual
+hosts: either directly from your program (with @ref MSG_process_create
+or as in @ref s4u_ex_basics "this S4U example"), or using an external
+XML file.  You should really logically separate your application from
+the deployment, as it will ease your experimental campain afterward.
+How exactly you organize your work remains up to you.
+
+@section deploy_s4u
+
+The following example shows the several ways of doing so in the S4U
+interface: @ref examples/s4u/actor-create/s4u_actor-create.cpp.
+Associated XML file: @ref examples/s4u/actor-create/s4u_actor-create_d.xml
+
+@section deploy_msg
+
+If you're stuck with the MSG interface, then you should simply use one
+of the following functions to start new actors onto your virtual
+hosts: @ref MSG_process_create, @ref MSG_process_create_with_arguments
+or @ref MSG_process_create_with_environment. These functions are used
+in many of the provided example, just grep for them.
+
+@section deploy_xml
+
+This section presents how to deploy from an XML file, as it is
+classically done. You will find a huge amount of examples of this in
+the @c examples directory.
 
 The deployment file looks just like a @ref platform "platform" file, except that in
 this case, only two different tags are used: @c process and @c argument, whereas
index 9bcb861..19f0bae 100644 (file)
@@ -50,11 +50,11 @@ Any SimGrid study entails the following components:
    have even support to specify the applicative workload that you want
    to feed to your application  @ref platform "(more info)".
 
- - The application's **Deployment Description**. In SimGrid terminology,
-   the application is an inert set of source files and binaries. To
-   make it run, you have to describe how your application should be
-   deployed on the virtual platform. Specify which process is mapped
-   on which host, along with its parameters
+ - The application's **Deployment Description**. In SimGrid
+   terminology, the application is an inert set of source files and
+   binaries. To make it run, you have to describe how your application
+   should be deployed on the virtual platform. You need to specify
+   which process is mapped on which host, along with their parameters
    @ref deployment "(more info)".
 
  - The **Platform Models**. They describe how the virtual platform
@@ -88,6 +88,22 @@ The questions that SimGrid can solve include the following:
    probe will not change the simulated state). It also makes it easy
    to mock some parts of the real system that are not under study.
 
+Depending on the context, you may see some parts of this process as
+less important, but you should pay close attention if you want to be
+confident in the results coming out of your simulations. In
+particular, you should not trust blindly your results but always
+strive to double-check them. Likewise, you should question the realism
+of your input configuration, and we even encourage you to doubt (and
+check) the provided performance models.
+
+To ease such questionning, you really should logically separate these
+parts in your experimental setup. It is seen as a very bad practice to
+merge the application, the platform and the deployment all together.
+SimGrid is versatile and your milleage may vary, but you should start
+with your Application specified as a C++ or Java program, using one of
+the provided XML platform file, and with your deployment in a separate
+XML file.
+
 @section starting_gears SimGrid Execution Gears
 
 Depending on the intended study, SimGrid can be run in several gears,
@@ -100,7 +116,7 @@ the experimental scenario.
 In this gear, SimGrid can provide information about the time taken by
 your application, the amount of energy dissipated by the platform to
 run your application and the detailed usage of each resource.
-   
+
 ** **Model-Checking Gear**. This can be seen as a sort of exhaustive
 testing gear, where every possible outcome of your application is
 explored. In some sense, this gear tests your application for all
@@ -109,15 +125,15 @@ possible platforms that you could imagine (and more).
 You just provide the application and its deployment (amount of
 processes and parameters), and the model-checker will litterally
 explore all possible outcomes by testing all possible message
-interleaving: if at some point a given process can either receive the
+interleavings: if at some point a given process can either receive the
 message A first or the message B depending on the platform
 characteristics, the model-checker will explore the scenario where A
 arrives first, and then rewind to the same point to explore the
-scenarion where B arrives first.
+scenario where B arrives first.
 
 This is a very powerful gear, where you can evaluate the correction of
-your application. It can verify either *safety properties* (asserts) 
-or *liveless properties* stating for example that if a given event
+your application. It can verify either **safety properties** (asserts) 
+or **liveless properties** stating for example that if a given event
 occures, then another given event will occur in a finite amount of
 steps. This gear is not only usable with the abstract algorithms
 developed on top of the SimGrid APIs, but also with real MPI
@@ -125,10 +141,16 @@ applications (to some extend).
 
 The main limit of Model Checking lays in the huge amount of scenarios
 to explore. SimGrid tries to explore only non-redundent scenarios
-thanks to classical reduction techniques (such as DPOR and statefull
+thanks to classical reduction techniques (such as DPOR and stateful
 exploration) but the exploration may well never finish if you don't
 carefully adapt your application to this gear.
 
+A classical trap is that the Model Checker can only verify whether
+your application fits the provided properties, which is useless if you
+have a bug in your property. Remember also that one way for your
+application to never violate a given assert is to not start at all
+because of a stupid bug.
+
 Another limit of this gear is that it does not use the performance
 models of the simulation gear. Time becomes discrete: You can say for
 example that the application took 42 steps to run, but there is no way
index 14b94aa..f9601f9 100644 (file)
@@ -2,46 +2,63 @@
 
 @tableofcontents
 
-In order to run any simulation, SimGrid must be provided with three things:
-something to run (i.e., your code), a description of the platform on which you want to simulate your application, and 
-information about the deployment of the application: Which process should be executed onto which processor/core?
-
-For the last two items, there are essentially three possible ways you can provide
-this information as an input:
-\li You can program, if you're using MSG, some of the platform and
-    deployment functions. If you choose to follow this approach, check the dedicated documentation
-    (\ref msg_simulation).
-\li You can use two XML files: one for the platform description and the other for the deployment. 
-\li You can program the description of your platform  in Lua format.
-
-For more information on SimGrid's deployment features, please refer to the \ref deployment section.
-
-The platform description may be intricate. This documentation is all
-about how to write this file. You should read about the
-@ref routing_basics "routing basic concepts" before proceeding. This page
-first contain a reference guide of the XML. Finally, it gives some hints and tips on how to write a better 
-platform description.
-
-\section pf_overview Some words about XML and DTD
-
-We opted for XML not only because it is extensible but also because many tools (and plugins for existing tools) are 
-available that facilitate editing and validating XML files. Furthermore, libraries that parse XML are often already
-available and very well tested.
-
-The XML checking is done based on the [simgrid.dtd](http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd) Document Type 
-Definition (DTD) file.
-
-If you read the DTD, you should notice the following:
-\li The platform tag has a version attribute. The current version is <b>4</b>. This attribute might be used in the 
-    provide backward compatibility.
-\li The DTD contains definitions for both the platform description and deployment files used by SimGrid.
-
-\section pf_netzones Defining a netzone
-
-Here is a simplistic example, describing a netzone using the Full
-routing.  Other supported values for the routing attribute can be
-found below, Section \ref pf_raf.
-
+As @ref starting_components "explained in the introduction," any
+SimGrid study must entail the description of the platform on which you
+want to simulate your application. You have to describe **each element
+of your platform**, such as computing hosts, clusters, each disks,
+links, etc. You must also define the **routing on your platform**, ie
+which path is taken between two hosts. Finally, you may also describe
+an **experimental scenario**, with qualitative changes (e.g.,
+bandwidth changes representing an external load) and qualitative
+changes (representing how some elements fail and restart over time).
+
+You should really separate your application from the platform
+description, as it will ease your experimental campain afterward.
+Mixing them is seen as a really bad experimental practice. The easiest
+to enforce this split is to put the platform description in a XML
+file. Many example platforms are provided in the archive, and this
+page gives all needed details to write such files, as well as some
+hints and tricks about describing your platform.
+
+On the other side, XML is sometimes not expressive enough for some
+platforms, in particular large platforms exhibiting repetitive
+patterns that are not simply expressed in XML.  In practice, many
+users end up generating their XML platform files from some sort of
+scripts. It is probably preferable to rewrite your XML @ref
+platform_lua "platform using the lua scripting language" instead.
+In the future, it should be possible to describe the platform directly
+in C++, but this is not possible yet.
+
+As usual, SimGrid is a versatile framework, and you should find the
+way of describing your platform that best fits your experimental
+practice. 
+
+\section pf_overview Describing the platform with XML
+
+Your platform description should follow the specification presented in
+the [simgrid.dtd](http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd)
+DTD file. The same DTD is used for both the platform and deployment
+files.
+
+From time to time, this DTD evolves to introduce possibly
+backward-incompatible changes. That is why each platform desciption is
+enclosed within a @c platform tag, that have a @c version attribute. 
+The current version is <b>4</b>. The @c simgrid_update_xml program can
+upgrade most of the past platform files to the recent formalism.
+
+\section pf_netzones Defining a NetZone
+
+In SimGrid, any resource must be located within a given **NetZone**.
+Each netzone is in charge of the routing between its resources. It
+means that when an host wants to communicate with another host of the
+same NetZone, it is the NetZone's duty to find the list of links that
+are involved in the communication. If the hosts are not in the same
+NetZone, @ref routing_basics "things are slightly more complex" to
+determine the links involved in a time- and space-efficient manner.
+
+But only one NetZone is really sufficient to begin with. The following
+chunk describes a simplistic NetZone using the Full routing (we will
+have to specify each and every routes manually). 
 
 \verbatim
 <AS id="netzone0" routing="Full">