Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 12 May 2017 13:27:05 +0000 (15:27 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 12 May 2017 13:27:05 +0000 (15:27 +0200)
14 files changed:
doc/doxygen/platform.doc
src/include/mc/mc.h
src/kernel/context/Context.cpp
src/kernel/context/ContextRaw.cpp
src/kernel/context/ContextUnix.cpp
src/mc/mc_base.cpp
src/mc/mc_global.cpp
src/mc/mc_ignore.h
src/mc/remote/Client.cpp
src/msg/instr_msg_task.cpp
src/msg/msg_global.cpp
src/smpi/smpi_process.cpp
src/surf/xml/simgrid.dtd
src/xbt/mmalloc/mfree.c

index f9601f9..ed5af1d 100644 (file)
@@ -43,144 +43,100 @@ 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
+The current version is <b>4.1</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
+\section pf_first_example First Platform Example 
 
-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.
+Here is a very simple platform file, containing 3 resources (two hosts
+and one link), and explicitly giving the route between the hosts.
 
-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">
-\endverbatim
-
-There is also the ``<route>`` tag; this tag takes two attributes,
-``src`` (source) and ``dst`` (destination). Both source and
-destination must be valid identifiers for routers (these will be
-introduced later). Contained by the ``<route>`` are network links;
-these links must be used in order to communicate from the source to
-the destination specified in the tag. Hence, a route merely describes
-how to reach a router from another router.
-
-\remark
-  More information and (code-)examples can be found in Section \ref pf_rm.
-
-A netzone can also contain itself one or more netzone; this allows you to model
-the hierarchy of your platform.
-
-### Within each AS, the following types of resources exist:
-
-%Resource        | Documented in Section | Description
---------------- | --------------------- | -----------
-AS              |                       | Every Autonomous System (AS) may contain one or more AS.
-host            | \ref pf_host          | This entity carries out the actual computation. For this reason, it contains processors (with potentially multiple cores).
-router          | \ref pf_router        | In SimGrid, routers are used to provide helpful information to routing algorithms.  Routers may also act as gateways, connecting several autonomous systems with each other.
-link            | \ref pf_link          | In SimGrid, (network)links define a connection between two or potentially even more resources. Every link has a bandwidth and a latency and may potentially experience congestion.
-cluster         | \ref pf_cluster       | In SimGrid, clusters were introduced to model large and homogenous environments. They are not really a resource by themselves - technically, they are only a shortcut, as they will internally set up all the hosts, network and routing for you, i.e., using this resource, one can easily setup thousands of hosts and links in a few lines of code. Each cluster is itself an AS.
-
-As it is desirable to interconnect these resources, a routing has to
-be defined. The AS is supposed to be Autonomous, hence this has to be
-done at the AS level. The AS handles two different types of entities
-(<b>host/router</b> and <b>AS</b>). However, the user is responsible
-to define routes between those resources, otherwise entities will be
-unconnected and therefore unreachable from other entities. Although
-several routing algorithms are built into SimGrid (see \ref pf_rm),
-you might encounter a case where you want to define routes manually
-(for instance, due to specific requirements of your platform).
-
-There are three tags to use:
-\li <b>ASroute</b>: to define routes between two  <b>AS</b>
-\li <b>route</b>: to define routes between two <b>host/router</b>
-\li <b>bypassRoute</b>: to define routes between two <b>AS</b> that
-    will bypass default routing (as specified by the ``routing`` attribute
-    supplied to ``<AS>``, see above).
+\code{.xml}
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
+<platform version="4.1">
+  <zone id="first zone" routing="Full">
+    <!-- the resources -->
+    <host id="host1" speed="1Mf"/>
+    <host id="host2" speed="2Mf"/>
+    <link id="link1" bandwidth="125MBps" latency="100us"/>
+    <!-- the routing: specify how the hosts are interconnected -->
+    <route src="host1" dst="host2">
+      <link_ctn id="link1"/>
+    </route>
+  </zone>
+</platform>
+\endcode
 
+As we said, the englobing @ref pf_overview "&lt;platform&gt;" tag is
+used to specify the dtd version used for this file.
+
+Then, every resource (specified with @ref pf_tag_host, @ref
+pf_tag_link or others) must be located within a given **networking
+zone**.  Each zone is in charge of the routing between its
+resources. It means that when an host wants to communicate with
+another host of the same zone, it is the zone's duty to find the list
+of links that are involved in the communication. Here, since the @ref
+pf_tag_zone tag has **Full** as a **routing attribute**, all routes
+must be explicitely given using the @ref pf_tag_route and @ref
+pf_tag_linkctn tags (this @ref pf_rm "routing model" is both simple
+and inefficient :) It is OK to not specify the route between two
+hosts, as long as the processes located on them never try to
+communicate together.
+
+A zone can contain several zones itself, leading to a hierarchical
+decomposition of the platform. This can be more efficient (as the
+inter-zone routing gets factorized with @ref pf_tag_zoneroute), and
+allows to have more than one routing model in your platform. For
+example, you could have a coordinate-based routing for the WAN parts
+of your platforms, a full routing within each datacenter, and a highly
+optimized routing within each cluster of the datacenter.  In this
+case, determining the route between two given hosts gets @ref
+routing_basics "somewhat more complex" but SimGrid still computes
+these routes for you in a time- and space-efficient manner.
 Here is an illustration of these concepts:
 
-![An illustration of an AS hierarchy. Here, AS1 contains 5 other ASes who in turn may contain other ASes as well.](AS_hierarchy.png)
- Circles represent processing units and squares represent network routers. Bold
-    lines represent communication links. AS2 models the core of a national
-    network interconnecting a small flat cluster (AS4) and a larger
-    hierarchical cluster (AS5), a subset of a LAN (AS6), and a set of peers
-    scattered around the world (AS7).
+![A hierarchy of networking zones.](AS_hierarchy.png)
 
-\section pf_pftags Resource description
+Circles represent processing units and squares represent network
+routers. Bold lines represent communication links. The zone "AS2"
+models the core of a national network interconnecting a small flat
+cluster (AS4) and a larger hierarchical cluster (AS5), a subset of a
+LAN (AS6), and a set of peers scattered around the world (AS7).
 
-\subsection  pf_As Platform: The &lt;AS&gt; tag
+\section pf_res Resource description
 
-For historical reasons, the XML files use the expression AS for
-NetZones. Netzones are very important because they group other resources (such
-as routers/hosts) together (in fact, any such resource must be
-contained in a NetZone).
+\subsection pf_res_computing Computing Resources
 
-Available attributes :
+\subsubsection pf_tag_host &lt;host&gt;
 
-Attribute name  | Mandatory | Values | Description
---------------- | --------- | ------ | -----------
-id              | yes       | String | The identifier of an AS; facilitates referring to this AS. ID must be unique.
-routing         | yes       | Full\| Floyd\| Dijkstra\| DijkstraCache\| None\| Vivaldi\| Cluster | See Section \ref pf_rm for details.
+An host is the computing resource on which an actor can execute.
 
+Attribute         | Values                                 | Description
+----------------- | -------------------------------------- | -----------
+id                | String (mandatory)                     | The identifier of the host. facilitates referring to this AS.
+speed             | double (mandatory)                     | Computational power of every core of this host in FLOPS (must be positive)
+core              | int (defaults to 1)                    | Number of cores (see @ref howto_multicore)
+state             | optionally "OFF"                       | If set to OFF, the host is initially turned off.
+availability_file | File name (optional) | (Relative or absolute) filename to use as input; must contain availability traces for this host. The syntax of this file is defined below.
+state_file        | File name (optional) |  Same mechanism as availability_file.<br /> 
+coordinates       | String (mandatory when using Vivaldi routing) | The coordinates of this host (see @ref pf_P2P_tags).
+pstate     | Double (Defaults to 0) | FIXME: Not yet documented.
 
-<b>Example:</b>
-\code
-<AS id="AS0" routing="Full">
-   <host id="host1" speed="1000000000"/>
-   <host id="host2" speed="1000000000"/>
-   <link id="link1" bandwidth="125000000" latency="0.000100"/>
-   <route src="host1" dst="host2"><link_ctn id="link1"/></route>
-</AS>
-\endcode
-
-In this example, AS0 contains two hosts (host1 and host2). The route
-between the hosts goes through link1.
-
-\subsection pf_Cr Computing resources: hosts, clusters and peers.
-
-\subsubsection pf_host &lt;host&gt;
-
-A <b>host</b> represents a computer/node card. Every host is able to execute
-code and it can send and receive data to/from other hosts. Most importantly,
-a host can contain more than 1 core.
-
-### Attributes: ###
-
-Attribute name  | Mandatory | Values | Description
---------------- | --------- | ------ | -----------
-id              | yes       | String | The identifier of the host. facilitates referring to this AS.
-speed           | yes       | double (must be > 0.0) | Computational power of every core of this host in FLOPS. Must be larger than 0.0.
-core            | no        | int (Default: 1) | The number of cores of this host. If more than one core is specified, the "speed" parameter refers to every core, i.e., the total computational power is no_of_cores*speed.<br /> If 6 cores are specified, up to 6 tasks can be executed without sharing the computational power; if more than 6 tasks are executed, computational power will be shared among these tasks. <br /> <b>Warning:</b> Although functional, this model was never scientifically assessed.
-availability_file| no       | string | (Relative or absolute) filename to use as input; must contain availability traces for this host. The syntax of this file is defined below. <br /> <b>Note:</b> The filename must be specified with your system's format.
-state_file      | no        | string |  Same mechanism as availability_file.<br /> <b>Note:</b> The filename must be specified with your system's format.
-coordinates     | no        | string | Must be provided when choosing the Vivaldi, coordinate-based routing model for the AS the host belongs to. More details can be found in the Section \ref pf_P2P_tags.
-pstate     | no        | double (Default: 0.0) | FIXME: Not yet documented.
+#### Included tags ####
 
-### Possible children: ###
+ - @ref pf_tag_mount Specifies the storages mounted on that host
+ - @ref pf_tag_prop Specifies a user-defined property of that host, that you can retrieve with MSG_host_get_property_value() or simgrid::s4u::Host::property().
 
-Tag name        | Description | Documentation
-------------    | ----------- | -------------
-\<mount/\>        | Defines mounting points between some storage resource and the host. | \ref pf_storage_entity_mount
-\<prop/\>         | The prop tag allows you to define additional information on this host following the attribute/value schema. You may want to use it to give information to the tool you use for rendering your simulation, for example. | N/A
-
-### Example ###
-
-\verbatim
-   <host id="host1" speed="1000000000"/>
-   <host id="host2" speed="1000000000">
-       <prop id="color" value="blue"/>
-       <prop id="rendershape" value="square"/>
-   </host>
-\endverbatim
+#### Examples ####
 
+\code{.xml}
+<host id="host1" speed="1000000000"/>
+<host id="host2" speed="1000000000">
+   <prop id="color" value="blue"/>
+   <prop id="rendershape" value="square"/>
+</host>
+\endcode
 
 \anchor pf_host_dynamism
 ### Expressing dynamism ###
@@ -219,21 +175,6 @@ will start delivering 80\% of its power. In this example, this amounts to 400 Mf
 Since the periodicity in line 1 was set to be 1.0, i.e., 1 timestep, this host will
 continue to provide 500 Mflop/s from time 21. From time 32 it will provide 250 MFlop/s and so on.
 
-### Changing initial state ###
-
-It is also possible to specify whether the host is up or down by setting the
-``state`` attribute to either <b>ON</b> (default value) or <b>OFF</b>.
-
-#### Example: Expliciting the default value "ON" ####
-
-\verbatim
-<platform version="4">
-   <host id="bob" speed="500Gf" state="ON" />
-</platform>
-\endverbatim
-
-If you want this host to be unavailable, simply substitute ON with OFF.
-
 \anchor pf_host_churn
 ### Expressing churn ###
 
@@ -265,7 +206,7 @@ periodicity 10). It will be turned off again at time 13.0 until time 23.0, and
 so on.
 
 
-\subsubsection pf_cluster &lt;cluster&gt;
+\subsubsection pf_tag_cluster &lt;cluster&gt;
 
 ``<cluster />`` represents a machine-cluster. It is most commonly used
 when one wants to define many hosts and a network quickly. Technically,
@@ -319,7 +260,7 @@ suffix          | yes       | string | Each node of the cluster will be suffixed
 radical         | yes       | string | Regexp used to generate cluster nodes name. Syntax: "10-20" will give you 11 machines numbered from 10 to 20, "10-20;2" will give you 12 machines, one with the number 2, others numbered as before. The produced number is concatenated between prefix and suffix to form machine names.
 speed           | yes       | int    | Same as the ``speed`` attribute of the ``\<host\>`` tag.
 core            | no        | int (default: 1) | Same as the ``core`` attribute of the ``\<host\>`` tag.
-bw              | yes       | int    | Bandwidth for the links between nodes and backbone (if any). See the \ref pf_link "link section" for syntax/details.
+bw              | yes       | int    | Bandwidth for the links between nodes and backbone (if any). See the \ref pf_tag_link "link section" for syntax/details.
 lat             | yes       | int    | Latency for the links between nodes and backbone (if any). See <b>link</b> section for syntax/details.
 sharing_policy  | no        | string | Sharing policy for the links between nodes and backbone (if any). See <b>link</b> section for syntax/details.
 bb_bw           | no        | int    | Bandwidth for backbone (if any). See <b>link</b> section for syntax/details. If bb_bw and bb_lat (see below) attributes are omitted, no backbone is created (alternative cluster architecture <b>described before</b>).
@@ -369,7 +310,7 @@ c-99.me
     This tag is only available when the routing mode of the AS
     is set to ``Cluster``.
 
-The ``&lt;cabinet /&gt;`` tag is, like the \ref pf_cluster "&lt;cluster&gt;" tag,
+The ``&lt;cabinet /&gt;`` tag is, like the \ref pf_tag_cluster "&lt;cluster&gt;" tag,
 a meta-tag. This means that it is simply a shortcut for creating a set of (homogenous) hosts and links quickly;
 unsurprisingly, this tag was introduced to setup cabinets in data centers quickly. Unlike
 &lt;cluster&gt;, however, the &lt;cabinet&gt; assumes that you create the backbone
@@ -383,9 +324,9 @@ id              | yes       | string | The identifier of the cabinet. Facilitate
 prefix          | yes       | string | Each node of the cabinet has to have a name. This name will be prefixed with this prefix.
 suffix          | yes       | string | Each node of the cabinet will be suffixed with this suffix
 radical         | yes       | string | Regexp used to generate cabinet nodes name. Syntax: "10-20" will give you 11 machines numbered from 10 to 20, "10-20;2" will give you 12 machines, one with the number 2, others numbered as before. The produced number is concatenated between prefix and suffix to form machine names.
-speed           | yes       | int    | Same as the ``speed`` attribute of the \ref pf_host "&lt;host&gt;" tag.
-bw              | yes       | int    | Bandwidth for the links between nodes and backbone (if any). See the \ref pf_link "link section" for syntax/details.
-lat             | yes       | int    | Latency for the links between nodes and backbone (if any). See the \ref pf_link "link section" for syntax/details.
+speed           | yes       | int    | Same as the ``speed`` attribute of the \ref pf_tag_host "&lt;host&gt;" tag.
+bw              | yes       | int    | Bandwidth for the links between nodes and backbone (if any). See the \ref pf_tag_link "link section" for syntax/details.
+lat             | yes       | int    | Latency for the links between nodes and backbone (if any). See the \ref pf_tag_link "link section" for syntax/details.
 
 \note
     Please note that as of now, it is impossible to change attributes such as,
@@ -453,7 +394,7 @@ See the documentation of simgrid::kernel::routing::VivaldiZone for
 details on how the latency is computed from the coordinate, and on the
 the up and down bandwidth are used.
 
-\subsection pf_ne Network equipments: links and routers
+\subsection pf_ne Network equipments
 
 There are two tags at all times available to represent network entities and
 several other tags that are available only in certain contexts.
@@ -497,7 +438,7 @@ coordinates     | no        | string | Must be provided when choosing the Vivald
  <router id="gw_dc1_horizdist"/>
 \endverbatim
 
-\subsubsection pf_link &lt;link/&gt;
+\subsubsection pf_tag_link &lt;link&gt;
 
 Network links can represent one-hop network connections. They are
 characterized by their id and their bandwidth; links can (but may not) be subject
@@ -646,7 +587,6 @@ be adjusted to 0.01 (or 10ms) and one second later it will be set again to 1ms.
 value will not change until second 5, when the periodicity defined in line 1
 kicks in. It then loops back, starting at 100µs (the initial value) for one second.
 
-
 #### The ``<prop/>`` tag ####
 
 Similar to the ``<host>`` tag, a link may also contain the ``<prop/>`` tag; see the host
@@ -697,7 +637,7 @@ Entity name     | Description
 --------------- | -----------
 \ref pf_storage_entity_storage_type "storage_type"    | Defines a template for a particular kind of storage (such as a hard-drive) and specifies important features of the storage, such as capacity, performance (read/write), contents, ... Different models of hard-drives use different storage_types (because the difference between an SSD and an HDD does matter), as they differ in some specifications (e.g., different sizes or read/write performance).
 \ref pf_storage_entity_storage "storage"        | Defines an actual instance of a storage type (disk, RAM, ...); uses a ``storage_type`` template (see line above) so that you don't need to re-specify the same details over and over again.
-\ref pf_storage_entity_mount "mount"          | Must be wrapped by a \ref pf_host tag; declares which storage(s) this host has mounted and where (i.e., the mountpoint).
+\ref pf_tag_mount "mount"          | Must be wrapped by a \ref pf_tag_host tag; declares which storage(s) this host has mounted and where (i.e., the mountpoint).
 
 
 \anchor pf_storage_content_file
@@ -803,12 +743,9 @@ Here is a complete example for the ``storage_type`` tag:
 </storage_type>
 \endverbatim
 
-\anchor pf_storage_entity_storage
-#### &lt;storage&gt; ####
-
-``storage`` attributes:
+@subsubsection pf_tag_storage &lt;storage&gt; 
 
-Attribute name | Mandatory | Values | Description
+Attributes     | Mandatory | Values | Description
 -------------- | --------- | ------ | -----------
 id             | yes       | string | Identifier of this ``storage``; used when referring to it
 typeId         | yes       | string | Here you need to refer to an already existing \ref pf_storage_entity_storage_type "\<storage_type\>"; the storage entity defined by this tag will then inherit the properties defined there.
@@ -835,16 +772,14 @@ now specifies a new content file (so the contents will be different from Disk1)
 and the filesystem uses the windows style; finally, it is attached to a second host,
 called alice (which is again not defined here).
 
-\anchor pf_storage_entity_mount
-#### &lt;mount&gt; ####
+\subsubsection pf_tag_mount &lt;mount&gt;
 
-Attributes:
-| Attribute name   | Mandatory   | Values   | Description                                                                                               |
-| ---------------- | ----------- | -------- | -------------                                                                                             |
-| id               | yes         | string   | Refers to a \ref pf_storage_entity_storage "&lt;storage&gt;" entity that will be mounted on that computer |
-| name             | yes         | string   | Path/location to/of the logical reference (mount point) of this disk
+| Attribute   | Mandatory   | Values   | Description                                                                                               |
+| ----------- | ----------- | -------- | -------------                                                                                             |
+| id          | yes         | string   | Refers to a \ref pf_storage_entity_storage "&lt;storage&gt;" entity that will be mounted on that computer |
+| name        | yes         | string   | Path/location to/of the logical reference (mount point) of this disk
 
-This tag must be enclosed by a \ref pf_host tag. It then specifies where the mountpoint of a given storage device (defined by the ``id`` attribute)
+This tag must be enclosed by a \ref pf_tag_host tag. It then specifies where the mountpoint of a given storage device (defined by the ``id`` attribute)
 is; this location is specified by the ``name`` attribute.
 
 Here is a simple example, taken from the file ``examples/platform/storage.xml``:
@@ -962,6 +897,31 @@ are all calculating shortest paths. They do require some time to converge, but
 eventually, when the routing tables have stabilized, your packets will follow
 the shortest paths.
 
+\subsection  pf_tag_zone &lt;zone&gt;
+
+Before SimGrid v3.16, networking zones used to be called Autonomous
+Systems, but this was misleading as zones may include other zones in a
+hierarchical manner. If you find any remaining reference to ASes,
+please report this as a bug.
+
+Attribute   | Value                                             | Description
+----------- | ------------------------------------------------- | ----------------------------------------------
+id          | String (mandatory)                                | The identifier of this zone (must be unique)
+routing     | One of the existing routing algorithm (mandatory) | See Section \ref pf_rm for details.
+
+<b>Example:</b>
+\code
+<AS id="AS0" routing="Full">
+   <host id="host1" speed="1000000000"/>
+   <host id="host2" speed="1000000000"/>
+   <link id="link1" bandwidth="125000000" latency="0.000100"/>
+   <route src="host1" dst="host2"><link_ctn id="link1"/></route>
+</AS>
+\endcode
+
+In this example, AS0 contains two hosts (host1 and host2). The route
+between the hosts goes through link1.
+
 \subsection pf_rm Routing models
 
 For each AS, you must define explicitly which routing model will
@@ -1138,7 +1098,7 @@ routing model (the path is given relative to SimGrid's source directory):
 
 | Name                                     | Description                                                                                                                         |
 | ---------------------------------------- | ------------------------------------------------------------------------------                                                      |
-| \ref pf_routing_model_cluster "Cluster"  | This is specific to the \ref pf_cluster "&lt;cluster/&gt;" tag and should not be used by the user, as several assumptions are made. |
+| \ref pf_routing_model_cluster "Cluster"  | This is specific to the \ref pf_tag_cluster "&lt;cluster/&gt;" tag and should not be used by the user, as several assumptions are made. |
 | \ref pf_routing_model_none    "None"     | No routing at all. Unless you know what you're doing, avoid using this mode in combination with a non-constant network model.       |
 | \ref pf_routing_model_vivaldi "Vivaldi"  | Perfect when you want to use coordinates. Also see the corresponding \ref pf_P2P_tags "P2P section" below.                          |
 
@@ -1163,7 +1123,7 @@ available within this model and if you try to communicate within the AS that
 uses this model, SimGrid will fail unless you have explicitly activated the
 \ref options_model_select_network_constant "Constant Network Model" (this model charges
 the same for every single communication). It should
-be noted, however, that you can still attach an \ref pf_routing_tag_asroute "ASroute",
+be noted, however, that you can still attach an \ref pf_tag_asroute "ASroute",
 as is demonstrated in the example below:
 
 \verbinclude platforms/cluster_and_one_host.xml
@@ -1201,10 +1161,10 @@ There are currently four different ways to define routes:
 
 | Name                                              | Description                                                                         |
 | ------------------------------------------------- | ----------------------------------------------------------------------------------- |
-| \ref pf_routing_tag_route "route"                 | Used to define route between host/router                                            |
-| \ref pf_routing_tag_asroute "ASroute"             | Used to define route between different AS                                           |
-| \ref pf_routing_tag_bypassroute "bypassRoute"     | Used to supersede normal routes as calculated by the network model between host/router; e.g., can be used to use a route that is not the shortest path for any of the shortest-path routing models. |
-| \ref pf_routing_tag_bypassasroute "bypassASroute"  | Used in the same way as bypassRoute, but for AS                                     |
+| \ref pf_tag_route "route"                 | Used to define route between host/router                                            |
+| \ref pf_tag_zoneroute "zoneRoute"             | Used to define route between different zones                                           |
+| \ref pf_tag_bypassroute "bypassRoute"     | Used to supersede normal routes as calculated by the network model between host/router; e.g., can be used to use a route that is not the shortest path for any of the shortest-path routing models. |
+| \ref pf_tag_bypassasroute "bypassZoneRoute"  | Used in the same way as bypassRoute, but for zones                                     |
 
 Basically all those tags will contain an (ordered) list of references
 to link that compose the route you want to define.
@@ -1220,14 +1180,14 @@ Consider the example below:
 \endverbatim
 
 The route here from host Alice to Bob will be first link1, then link2,
-and finally link3. What about the reverse route? \ref pf_routing_tag_route "Route" and
-\ref pf_routing_tag_asroute "ASroute" have an optional attribute \c symmetrical, that can
+and finally link3. What about the reverse route? \ref pf_tag_route "Route" and
+\ref pf_tag_zoneroute "ASroute" have an optional attribute \c symmetrical, that can
 be either \c YES or \c NO. \c YES means that the reverse route is the same
 route in the inverse order, and is set to \c YES by default. Note that
 this is not the case for bypass*Route, as it is more probable that you
 want to bypass only one default route.
 
-For an \ref pf_routing_tag_asroute "ASroute", things are just slightly more complicated, as you have
+For an \ref pf_tag_zoneroute "ASroute", things are just slightly more complicated, as you have
 to give the id of the gateway which is inside the AS you want to access ... 
 So it looks like this:
 
@@ -1243,11 +1203,11 @@ it means that it must pass through router1 to get out of the AS, then
 pass through link1, and get into AS2 by being received by router2.
 router1 must belong to AS1 and router2 must belong to AS2.
 
-\subsubsection pf_linkctn &lt;link_ctn/&gt;
+\subsubsection pf_tag_linkctn &lt;link_ctn&gt;
 
 This entity has only one purpose: Refer to an already existing
-\ref pf_link "&lt;link/&gt;" when defining a route, i.e., it
-can only occur as a child of \ref pf_routing_tag_route "&lt;route/&gt;"
+\ref pf_tag_link "&lt;link/&gt;" when defining a route, i.e., it
+can only occur as a child of \ref pf_tag_route "&lt;route/&gt;"
 
 | Attribute name  | Mandatory | Values | Description                                                   |
 | --------------- | --------- | ------ | -----------                                                   |
@@ -1261,7 +1221,7 @@ entity (the path is given relative to SimGrid's source directory):
 
 \verbinclude example_filelist_xmltag_linkctn
 
-\subsubsection pf_routing_tag_asroute ASroute
+\subsubsection pf_tag_zoneroute &lt;zoneRoute&gt;
 
 The purpose of this entity is to define a route between two ASes.
 This is mainly useful when you're in the \ref pf_routing_model_full "Full routing model".
@@ -1272,7 +1232,7 @@ This is mainly useful when you're in the \ref pf_routing_model_full "Full routin
 | --------------- | --------- | ------ | -----------                                                                                                                                |
 | src             | yes       | String | The identifier of the source AS                                                                                                            |
 | dst             | yes       | String | See the \c src attribute                                                                                                                   |
-| gw_src          | yes       | String | The gateway that will be used within the src AS; this can be any \ref pf_host "Host" or \ref pf_router "Router" defined within the src AS. |
+| gw_src          | yes       | String | The gateway that will be used within the src AS; this can be any \ref pf_tag_host "Host" or \ref pf_router "Router" defined within the src AS. |
 | gw_dst          | yes       | String | Same as \c gw_src, but with the dst AS instead.                                                                                            |
 | symmetrical     | no        | YES\|NO (Default: YES) | If this route is symmetric, the opposite route (from dst to src) will also be declared implicitly.               | 
 
@@ -1303,12 +1263,12 @@ This is mainly useful when you're in the \ref pf_routing_model_full "Full routin
 </AS>
 \endverbatim
 
-\subsubsection pf_routing_tag_route route 
+\subsubsection pf_tag_route &lt;route&gt; 
 
 The principle is the same as for 
-\ref pf_routing_tag_asroute "ASroute": The route contains a list of links that
+\ref pf_tag_zoneroute "ASroute": The route contains a list of links that
 provide a path from \c src to \c dst. Here, \c src and \c dst can both be either a 
-\ref pf_host "host" or \ref pf_router "router".  This is mostly useful for the 
+\ref pf_tag_host "host" or \ref pf_router "router".  This is mostly useful for the 
 \ref pf_routing_model_full "Full routing model" as well as for the 
 \ref pf_routing_model_shortest_path "shortest-paths" based models (as they require 
 topological information).
@@ -1342,7 +1302,7 @@ A route in the \ref pf_routing_model_shortest_path "Shortest-Path routing model"
     (network-)graph and the employed algorithms need to know which edge connects
     which pair of entities.
 
-\subsubsection pf_routing_tag_bypassasroute bypassASroute
+\subsubsection pf_tag_bypassasroute bypassASroute
 
 As said before, once you choose
 a model, it (most likely; the constant network model, for example, doesn't) calculates routes for you. But maybe you want to
@@ -1379,7 +1339,7 @@ connects the router \c my_cluster_1_router in the source cluster to the router
 \c my_cluster_2_router in the destination router. Additionally, as the \c symmetrical
 attribute was not given, this route is presumed to be symmetrical.
 
-\subsubsection pf_routing_tag_bypassroute bypassRoute
+\subsubsection pf_tag_bypassroute bypassRoute
 
 As said before, once you choose
 a model, it (most likely; the constant network model, for example, doesn't) calculates routes for you. But maybe you want to
@@ -1479,93 +1439,67 @@ information to SimGrid. Here is a file doing it all :
 </AS>
 \endverbatim
 
-\section pf_other_tags Tags not (directly) describing the platform
+\section pf_other Other tags
 
 The following tags can be used inside a \<platform\> tag even if they are not
 directly describing the platform:
-\li \ref pf_config "config": it allows you to pass some configuration stuff like, for
-    example, the network model and so on. It follows the
-\li \ref pf_include "include": allows you to include another file into the current one.
 
-\subsection pf_config config
+  - @ref pf_tag_config passes configuration options, e.g. to change the network model;
+  - @ref pf_tag_prop gives user-defined properties to various elements
 
-The only purpose of this tag is to contain the \c prop tags, as described below.
-These tags will then configure the options as described by Section \ref options.
-(See the example)
+\subsection pf_tag_config &lt;config&gt;
 
-#### Attributes ####
+Adding configuration flags into the platform file is particularly
+useful when the described platform is best used with specific
+flags. For example, you could finely tune SMPI in your platform file directly.
 
-| Attribute name  | Mandatory | Values                  | Description                                                                                                  |
-| --------------- | --------- | ----------------------  | -----------                                                                                                  |
-| id              | yes       | String                  | The identifier of the config tag when referring to id; this is basically useless, though.                    |
+| Attribute  | Values              | Description                                    |
+| ---------- | ------------------- | ---------------------------------------------- |
+| id         | String (optional)   | This optional identifier is ignored by SimGrid |
 
-#### Possible children ####
+* **Included tags:** @ref pf_tag_prop to specify a given configuration item (see @ref options).
 
-Tag name        | Description | Documentation
-------------    | ----------- | -------------
-\<prop/\>       | The prop tag allows you to define different configuration options following the attribute/value schema. See the \ref options page. | N/A
+Any such configuration must be given at the very top of the platform file.
 
-#### Example ####
+* **Example**
 
 \verbatim
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
 <platform version="4">
-<config id="General">
-       <prop id="maxmin/precision" value="0.000010"></prop>
-       <prop id="cpu/optim" value="TI"></prop>
-       <prop id="host/model" value="compound"></prop>
-       <prop id="network/model" value="SMPI"></prop>
-       <prop id="path" value="~/"></prop>
-       <prop id="smpi/bw-factor" value="65472:0.940694;15424:0.697866;9376:0.58729"></prop>
+<config>
+       <prop id="maxmin/precision" value="0.000010" />
+       <prop id="cpu/optim" value="TI" />
+       <prop id="network/model" value="SMPI" />
+       <prop id="smpi/bw-factor" value="65472:0.940694;15424:0.697866;9376:0.58729" />
 </config>
 
 <AS  id="AS0"  routing="Full">
 ...
 \endverbatim
 
-\subsection pf_include include
+\subsection pf_tag_prop &lt;prop&gt;
 
-Even if it can be used in other contexts, this tag was originally created
-to be used with \ref pf_trace. The idea was to have a file describing the
-platform, and another file attaching traces of a given period to the platform.
+Defines a user-defined property, identified with a name and having a
+value. You can specify such properties to most kind of resources:
+@ref pf_tag_zone, @ref pf_tag_host, @ref pf_tag_storage,
+@ref pf_tag_cluster and @ref pf_tag_link. These values can be retrieved
+at runtime with MSG_zone_property() or simgrid::s4u::NetZone::property(),
+or similar functions.
 
-The drawback is that the file chuncks that will be included do not
-constitute valid XML files. This may explain why this feature was never really
-used in practice (as far as we know). Other mechanisms, such as the ability to load
-several platform files one after the other, could be considered in the future.
-
-In the meanwhile, the \c include tag allows you to import other platforms into your
-local file. This is done with the intention to help people
-combine their different AS and provide new platforms. Those files
-should contain XML that consists of 
-\ref pf_include "include", \ref pf_cluster "cluster", \ref pf_peer "peer", \ref pf_As "AS", \ref pf_trace "trace", \ref pf_trace "tags".
-
-Do not forget to close the tag to make it work, or you will end up with an invalid XML file.
-
-#### Attributes ####
-
-| Attribute name  | Mandatory | Values                  | Description                                                                                                  |
-| --------------- | --------- | ----------------------  | -----------                                                                                                  |
-| file            | yes       | String                  | Filename of the path you want to include with either relative or absolute path. |
+| Attribute | Values                  | Description                                                                               |
+| --------- | ----------------------  | ----------------------------------------------------------------------------------------- |
+| id        | String (mandatory)      | Identifier of this property. Must be unique for a given property holder, eg host or link. |
+| value     | String (mandatory)      | Value of this property; The semantic is completely up to you.                             |
 
+* **Included tags:** none.
 
 #### Example ####
 
-The following example includes two files, clusterA.xml and clusterB.xml and
-combines them two one platform file; all hosts, routers etc. defined in 
-each of them will then be usable.
+\code{.xml}
+<prop id="Operating System" value="Linux" />
+\endcode
 
-\verbatim
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
-<platform version="4">
-       <AS id="main" routing="Full">
-               <include file="clusterA.xml"></include>
-               <include file="clusterB.xml"></include>
-       </AS>
-</platform>
-\endverbatim
 
 \subsection pf_trace trace and trace_connect
 
@@ -1602,7 +1536,7 @@ entity.
 | --------------- | --------- | ---------------------- | -----------                                                                                       |
 | id              | yes       | String                 | Identifier of this trace; this is the name you pass on to \c trace_connect.                       |
 | file            | no        | String                 | Filename of the file that contains the information - the path must follow the style of your OS. You can omit this, but then you must specifiy the values inside of &lt;trace&gt; and &lt;/trace&gt; - see the example below. |
-| trace_periodicity | yes | String | This is the same as for \ref pf_host "hosts" (see there for details) |
+| trace_periodicity | yes | String | This is the same as for \ref pf_tag_host "hosts" (see there for details) |
 
 Here is an example  of trace when no file name is provided:
 
@@ -1630,7 +1564,7 @@ are some best practices you should pay attention to in order to
 produce good platform and some choices you can make in order to have
 faster simulations. Here's some hints and tips, then.
 
-@subsection Finding the platform example that you need
+@subsection pf_hints_search Finding the platform example that you need
 
 Most platform files that we ship are in the @c examples/platforms
 folder. The good old @c grep tool can find the examples you need when
index aadf44d..3f5864c 100644 (file)
@@ -8,10 +8,6 @@
 
 #include <simgrid/modelchecker.h> /* our public interface (and definition of SIMGRID_HAVE_MC) */
 #include <simgrid/simix.h>
-#include <src/internal_config.h>
-#if HAVE_UCONTEXT_H
-#include <ucontext.h>           /* context relative declarations */
-#endif
 
 /* Maximum size of the application heap.
  *
@@ -66,15 +62,6 @@ XBT_PUBLIC(void) MC_process_clock_add(smx_actor_t, double);
 XBT_PUBLIC(double) MC_process_clock_get(smx_actor_t);
 XBT_PRIVATE void MC_automaton_load(const char *file);
 
-/****************************** MC ignore **********************************/
-XBT_PUBLIC(void) MC_ignore_heap(void *address, size_t size);
-XBT_PUBLIC(void) MC_remove_ignore_heap(void *address, size_t size);
-XBT_PUBLIC(void) MC_ignore_local_variable(const char *var_name, const char *frame);
-XBT_PUBLIC(void) MC_ignore_global_variable(const char *var_name);
-#if HAVE_UCONTEXT_H
-XBT_PUBLIC(void) MC_register_stack_area(void *stack, smx_actor_t process, ucontext_t* context, size_t size);
-#endif
-
 /********************************* Memory *************************************/
 XBT_PUBLIC(void) MC_memory_init();  /* Initialize the memory subsystem */
 XBT_PUBLIC(void) MC_memory_exit();
index 292ff2e..97b1985 100644 (file)
@@ -1,21 +1,14 @@
-/* Copyright (c) 2007-2010, 2012-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include <cstdint>
-
-#include <memory>
-#include <functional>
-#include <utility>
-
-#include <simgrid/simix.hpp>
-
 #include "mc/mc.h"
 
 #include "src/kernel/context/Context.hpp"
 #include "src/simix/smx_private.h"
+#include "src/mc/mc_ignore.h"
+
 
 /**
  * @brief creates a new context for a user level process
index 8ad2f11..5afc40f 100644 (file)
@@ -1,22 +1,15 @@
-/* Copyright (c) 2009-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include <math.h>
-
-#include <utility>
-#include <functional>
-
 #include "src/internal_config.h" 
 
-#include "xbt/log.h"
 #include "xbt/parmap.h"
-#include "xbt/dynar.h"
 
 #include "src/simix/smx_private.h"
 #include "mc/mc.h"
+#include "src/mc/mc_ignore.h"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_context);
 
index f2f99a6..ac2a4b5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2015. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -7,10 +7,12 @@
 
 #include <ucontext.h>           /* context relative declarations */
 
-#include "mc/mc.h"
 #include "src/simix/ActorImpl.hpp"
 #include "src/simix/smx_private.h"
 #include "xbt/parmap.h"
+#include "mc/mc.h"
+#include "src/mc/mc_ignore.h"
+
 
 /** Many integers are needed to store a pointer
  *
index 1a3a1a3..c80227d 100644 (file)
@@ -3,34 +3,13 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include <cassert>
-
 #include <simgrid_config.h>
 
-#include <xbt/log.h>
-#include <xbt/asserts.h>
-#include <xbt/dynar.h>
-
-#include <simgrid/simix.h>
-
 #include "mc/mc.h"
-#include "src/mc/mc_base.h"
 #include "src/mc/mc_replay.h"
-#include "src/mc/remote/mc_protocol.h"
-#include "src/simix/smx_private.h"
-
-#include "src/kernel/activity/ActivityImpl.hpp"
-#include "src/kernel/activity/SynchroIo.hpp"
-#include "src/kernel/activity/SynchroComm.hpp"
-#include "src/kernel/activity/SynchroRaw.hpp"
-#include "src/kernel/activity/SynchroSleep.hpp"
-#include "src/kernel/activity/SynchroExec.hpp"
 
 #if SIMGRID_HAVE_MC
-#include "src/mc/mc_request.h"
-#include "src/mc/Process.hpp"
 #include "src/mc/ModelChecker.hpp"
-#include "src/mc/mc_smx.h"
 
 using simgrid::mc::remote;
 #endif
@@ -41,9 +20,8 @@ int MC_random(int min, int max)
 {
 #if SIMGRID_HAVE_MC
   xbt_assert(mc_model_checker == nullptr);
-  /* TODO, if the MC is disabled we do not really need to make a simcall for
-   * this :) */
 #endif
+  /* TODO, if the MC is disabled we do not really need to make a simcall for this :) */
   return simcall_mc_random(min, max);
 }
 
index 3d596ab..b3140e1 100644 (file)
@@ -31,6 +31,7 @@
 #if SIMGRID_HAVE_MC
 #include <libunwind.h>
 #include "src/mc/mc_comm_pattern.h"
+#include "src/mc/mc_ignore.h"
 #include "src/mc/mc_request.h"
 #include "src/mc/mc_safety.h"
 #include "src/mc/mc_snapshot.h"
index b62bfb1..cf42fd1 100644 (file)
@@ -6,12 +6,25 @@
 #ifndef SIMGRID_MC_IGNORE_H
 #define SIMGRID_MC_IGNORE_H
 
-#include <xbt/base.h>           /* SG_BEGIN_DECL */
-#include <xbt/dynar.h>
+#include "src/internal_config.h"
+#include "xbt/dynar.h"
+
+#if HAVE_UCONTEXT_H
+#include <ucontext.h>           /* context relative declarations */
+#endif
+
 
 SG_BEGIN_DECL();
 
-XBT_PRIVATE xbt_dynar_t MC_checkpoint_ignore_new(void);
+XBT_PUBLIC(void) MC_ignore_heap(void *address, size_t size);
+XBT_PUBLIC(void) MC_remove_ignore_heap(void *address, size_t size);
+XBT_PUBLIC(void) MC_ignore_local_variable(const char *var_name, const char *frame);
+XBT_PUBLIC(void) MC_ignore_global_variable(const char *var_name);
+
+#if HAVE_UCONTEXT_H
+XBT_PUBLIC(void) MC_register_stack_area(void *stack, smx_actor_t process, ucontext_t* context, size_t size);
+#endif
+
 
 SG_END_DECL();
 
index 9759c21..b4a8aed 100644 (file)
@@ -242,7 +242,7 @@ void Client::declareStack(void* stack, size_t size, smx_actor_t process, ucontex
   message.type         = MC_MESSAGE_STACK_REGION;
   message.stack_region = region;
   if (channel_.send(message))
-    xbt_die("Coule not send STACK_REGION to model-checker");
+    xbt_die("Could not send STACK_REGION to model-checker");
 }
 }
 }
index 65f32a6..fb6550f 100644 (file)
@@ -7,6 +7,7 @@
 #include "mc/mc.h"
 #include "src/instr/instr_private.h"
 #include "src/msg/msg_private.h"
+#include "src/mc/mc_ignore.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_msg, instr, "MSG instrumentation");
 
index 1eefcc5..0d94715 100644 (file)
@@ -9,6 +9,7 @@
 #include "instr/instr_interface.h"
 #include "mc/mc.h"
 #include "src/msg/msg_private.h"
+#include "src/mc/mc_ignore.h"
 
 XBT_LOG_NEW_CATEGORY(msg, "All MSG categories");
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg, "Logging specific to MSG (kernel)");
index 3d989e4..27bc512 100644 (file)
@@ -4,6 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "mc/mc.h"
+#include "src/mc/mc_ignore.h"
 #include "src/mc/mc_replay.h"
 #include "src/msg/msg_private.h"
 #include "src/simix/smx_private.h"
@@ -12,6 +13,7 @@
 #include "src/smpi/smpi_group.hpp"
 #include "src/smpi/smpi_comm.hpp"
 
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_process, smpi, "Logging specific to SMPI (kernel)");
 
 //TODO : replace
index f2b787c..1a6e627 100644 (file)
@@ -69,6 +69,7 @@ To upgrade your files, use the tool simgrid_update_xml
 <!ELEMENT platform ((config|random)*,(include|cluster|cabinet|peer|AS|zone|trace|trace_connect)*,(process|actor)*)>
 <!ATTLIST platform version CDATA "0.0">
 
+<!-- tag include is deprecated. Not documented, and soon removed -->
 <!ELEMENT include (include|cluster|cabinet|peer|AS|zone|trace|trace_connect)*>
 <!ATTLIST include file CDATA #REQUIRED>
 
index a08c7dd..5294c14 100644 (file)
@@ -1,7 +1,6 @@
 /* Free a block of memory allocated by `mmalloc'. */
 
-/* Copyright (c) 2010-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -14,6 +13,7 @@
 #include "mmprivate.h"
 #include "xbt/ex.h"
 #include "mc/mc.h"
+#include "src/mc/mc_ignore.h"
 
 /* Return memory to the heap.
    Like `mfree' but don't call a mfree_hook if there is one.  */