From a8a8986479eb622009601692325c404d74b5a7ed Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 10 May 2017 01:49:51 +0200 Subject: [PATCH] further fiddling with the platform documentation [no ci] --- doc/doxygen/platform.doc | 243 +++++++++++++++------------------------ src/surf/xml/simgrid.dtd | 1 + 2 files changed, 96 insertions(+), 148 deletions(-) diff --git a/doc/doxygen/platform.doc b/doc/doxygen/platform.doc index a6e9a2fc9d..ed5af1d878 100644 --- a/doc/doxygen/platform.doc +++ b/doc/doxygen/platform.doc @@ -104,70 +104,39 @@ 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). -\section pf_pftags Resource description +\section pf_res Resource description -\subsection pf_tag_zone <zone> - -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. - -Example: -\code - - - - - - -\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. +\subsection pf_res_computing Computing Resources \subsubsection pf_tag_host <host> -A host 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.
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.
Warning: 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.
Note: The filename must be specified with your system's format. -state_file | no | string | Same mechanism as availability_file.
Note: 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. +An host is the computing resource on which an actor can execute. -### Possible children: ### +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.
+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. -Tag name | Description | Documentation ------------- | ----------- | ------------- -\ | Defines mounting points between some storage resource and the host. | \ref pf_storage_entity_mount -\ | 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 +#### Included tags #### -### Example ### + - @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(). -\verbatim - - - - - -\endverbatim +#### Examples #### +\code{.xml} + + + + + +\endcode \anchor pf_host_dynamism ### Expressing dynamism ### @@ -206,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 ON (default value) or OFF. - -#### Example: Expliciting the default value "ON" #### - -\verbatim - - - -\endverbatim - -If you want this host to be unavailable, simply substitute ON with OFF. - \anchor pf_host_churn ### Expressing churn ### @@ -252,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 <cluster> +\subsubsection pf_tag_cluster <cluster> ```` represents a machine-cluster. It is most commonly used when one wants to define many hosts and a network quickly. Technically, @@ -356,7 +310,7 @@ c-99.me This tag is only available when the routing mode of the AS is set to ``Cluster``. -The ``<cabinet />`` tag is, like the \ref pf_cluster "<cluster>" tag, +The ``<cabinet />`` tag is, like the \ref pf_tag_cluster "<cluster>" 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 <cluster>, however, the <cabinet> assumes that you create the backbone @@ -440,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. @@ -633,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 ```` tag #### Similar to the ```` tag, a link may also contain the ```` tag; see the host @@ -684,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_tag_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 @@ -790,12 +743,9 @@ Here is a complete example for the ``storage_type`` tag: \endverbatim -\anchor pf_storage_entity_storage -#### <storage> #### - -``storage`` attributes: +@subsubsection pf_tag_storage <storage> -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 "\"; the storage entity defined by this tag will then inherit the properties defined there. @@ -822,14 +772,12 @@ 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 -#### <mount> #### +\subsubsection pf_tag_mount <mount> -Attributes: -| Attribute name | Mandatory | Values | Description | -| ---------------- | ----------- | -------- | ------------- | -| id | yes | string | Refers to a \ref pf_storage_entity_storage "<storage>" 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 "<storage>" 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_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. @@ -949,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 <zone> + +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. + +Example: +\code + + + + + + +\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 @@ -1125,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 "<cluster/>" 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 "<cluster/>" 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. | @@ -1466,93 +1439,67 @@ information to SimGrid. Here is a file doing it all : \endverbatim -\section pf_other_tags Tags not (directly) describing the platform +\section pf_other Other tags The following tags can be used inside a \ 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 <config> -#### 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 ------------- | ----------- | ------------- -\ | 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 - - - - - - - + + + + + ... \endverbatim -\subsection pf_include include +\subsection pf_tag_prop <prop> -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. - -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 #### +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. -| 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} + +\endcode -\verbatim - - - - - - - - -\endverbatim \subsection pf_trace trace and trace_connect @@ -1617,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 diff --git a/src/surf/xml/simgrid.dtd b/src/surf/xml/simgrid.dtd index f2b787cf6d..1a6e627949 100644 --- a/src/surf/xml/simgrid.dtd +++ b/src/surf/xml/simgrid.dtd @@ -69,6 +69,7 @@ To upgrade your files, use the tool simgrid_update_xml + -- 2.20.1