Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'public_smpi_func' into 'master'
authorAugustin Degomme <adegomme@gmail.com>
Thu, 23 Sep 2021 12:48:54 +0000 (12:48 +0000)
committerAugustin Degomme <adegomme@gmail.com>
Thu, 23 Sep 2021 12:48:54 +0000 (12:48 +0000)
Make some SMPI functions public

See merge request simgrid/simgrid!71

20 files changed:
ChangeLog
MANIFEST.in
NEWS
docs/default.nix [new file with mode: 0644]
docs/source/Doxyfile
docs/source/Installing_SimGrid.rst
docs/source/Platform_howtos.rst
docs/source/The_XBT_toolbox.rst
docs/source/app_s4u.rst
docs/source/conf.py
docs/source/tuto_disk/analysis.irst [moved from docs/source/tuto_disk/analysis.rst with 96% similarity]
include/simgrid/s4u/Disk.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Link.hpp
include/xbt/dynar.h
src/s4u/s4u_Engine.cpp
src/xbt/dynar.cpp
src/xbt/dynar_test.cpp
tools/cmake/DefinePackages.cmake
tools/internal/check_dist_archive.exclude

index 10bc26e..13e0736 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,21 +2,13 @@
 
 SimGrid (3.28.1) NOT RELEASED YET (v3.29 expected September 22. 2021, 19:21 UTC)
 
-New features:
- - Non-linear resource sharing: allows to dynamically change the resource
-   capacity. Users can change this capacity by setting a callback which will
-   be called when SimGrid is sharing the resource between the active
-   activities. An activity can be a task running, a read/write IO operation or a
-   communication flow.
-   - Callback signature: double (double capacity, int n_activities): given the
-     current resource's capacity and number of activities running on it,
-     returns the new capacity.
-   - Note that this callback is in the critical path of the system solve and
-   should not take long to execute.
-   - Examples:
-     - Disk: examples/cpp/io-degradation
-     - Link: examples/cpp/network-nonlinear
-     - CPU: examples/cpp/exec-cpu-nonlinear
+New modeling features:
+ - Non-linear resource sharing for decay models:
+   - The total capacity may depend on the number of concurrent usages
+   - For that, resources can take a callback that computes the capacity 
+     depending on the idle capacity and the number of concurrent usages
+   - Examples (both cpp and python): io-degradation, network-nonlinear, exec-cpu-nonlinear
+
  - Dynamic factors for CPU and disk: similarly to dynamic network factors,
    allows the user to set a callback which can affect the progress of activities
    (multiplicative factor applied when updating the amount of work remaining).
@@ -24,30 +16,22 @@ New features:
 
 Python:
  - Added support to programmatic platform creation in Python.
- - Several new methods were added to Python interface. For more details, see
- the corresponding documentation.
- - New python examples:
-   - Clusters: examples/python/clusters-multicpu
-   - Disk: examples/python/io-degradation
-   - CPU: examples/python/exec-cpu-nonlienar
-   - Link: examples/python/network-nonlinear
+   Example: examples/python/clusters-multicpu
 
 S4U:
- - New: s4u::Disk::set_sharing_policy() and s4u::Host::set_sharing_policy().
-   Allows the configuration of non-linear resource sharing for hosts and
-   disks.
+ - Disk and Host now have a set_sharing_policy() too, for non-linear sharing.
+   This can only be set through the API, not through XML files.
 
 SMPI:
  - TI Tracing/Replay:
-     - Multiple fixes to ensure reproducibility of tracing
-     - scan/excan can now be replayed
-     - wait action now uses ranks and not pid, as the other ones.
-     - smpi/init and smpi/finalization-barrier are now valid for replays.
+   - Multiple fixes to ensure reproducibility of tracing
+   - scan/excan can now be replayed
+   - wait action now uses ranks and not pid, as the other ones.
+   - smpi/init and smpi/finalization-barrier are now valid for replays.
 
 Documentation:
   * New section "Release Notes" documenting recent and current developments.
-  * New section "Modeling I/O: the realistic way" presenting how to properly
-  model disks in SimGrid.
+  * New section "Modeling I/O: the realistic way" presenting how to properly model disks in SimGrid.
   * Improvements in API Reference for C++ and Python interfaces.
 
 ns-3 model:
index 67381d9..1f37766 100644 (file)
@@ -1890,8 +1890,8 @@ include docs/source/index.rst
 include docs/source/intl.rst
 include docs/source/tuto_disk/CMakeLists.txt
 include docs/source/tuto_disk/Dockerfile
+include docs/source/tuto_disk/analysis.irst
 include docs/source/tuto_disk/analysis.org
-include docs/source/tuto_disk/analysis.rst
 include docs/source/tuto_disk/fig/edel_read_dhist.png
 include docs/source/tuto_disk/fig/edel_write_dhist.png
 include docs/source/tuto_disk/fig/griffon_deg.png
diff --git a/NEWS b/NEWS
index cd4f2d4..0379431 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,12 @@ __   _____ _ __ ___(_) ___  _ __   |___ / |___ \ / _ \
  \ V /  __/ |  \__ \ | (_) | | | |  ___) | / __/ \__, |
   \_/ \___|_|  |___/_|\___/|_| |_| |____(_)_____|  /_/
                (unreleased)
+              
+The "Give peace a chance" release (International Day of Peace)
+
+  * Python bindings for the platform creation API
+  * Introduce non-linear ressource sharing, allowing decay models
+  * New documentation section on realistic I/O modeling
 
                     _               _____  ____  ___
 __   _____ _ __ ___(_) ___  _ __   |___ / |___ \( _ )
diff --git a/docs/default.nix b/docs/default.nix
new file mode 100644 (file)
index 0000000..7ba4219
--- /dev/null
@@ -0,0 +1,88 @@
+# Nix package for SimGrid's sphinx documentation.
+# Example usage: nix-build ./default.nix -A simgrid-doc && firefox result/index.html
+{ pkgs ? import (fetchTarball {
+    url = "https://github.com/NixOS/nixpkgs/archive/21.05.tar.gz";
+    sha256 = "1ckzhh24mgz6jd1xhfgx0i9mijk6xjqxwsshnvq789xsavrmsc36";
+  }) {}
+}:
+
+let
+  pythonPackages = pkgs.python3Packages;
+  buildPythonPackage = pythonPackages.buildPythonPackage;
+
+  self = rec {
+    # the desired package
+    simgrid-doc = pkgs.stdenv.mkDerivation rec {
+      name = "simgrid-doc";
+      src = ./..;
+      buildInputs = [
+        pkgs.doxygen
+        pythonPackages.sphinx
+        pythonPackages.sphinx_rtd_theme
+        pythonPackages.breathe
+        javasphinx
+        sphinx-tabs
+      ];
+      phases = [ "unpackPhase" "buildPhase" "installPhase" ];
+      buildPhase = ''
+        cd docs
+        rm -rf build # this is not done in your directory, this is on the copy made by the Nix build daemon
+        sphinx-build -b html source build
+      '';
+      installPhase = ''
+        mkdir -p $out
+        mv build/* $out/
+      '';
+    };
+
+    # sphinx extensions (and their dependencies) shenanigans
+    javalang = buildPythonPackage rec {
+      pname = "javalang";
+      version = "0.13.0";
+      src = pythonPackages.fetchPypi {
+        inherit pname version;
+        sha256 = "0k22ldm4xn0sb26qclp5zz0fc9dy589zvvby5ba1d0d5h2jab08n";
+      };
+      buildInputs = with pythonPackages; [ six ];
+      doCheck = false;
+    };
+
+    javasphinx = buildPythonPackage rec {
+      pname = "javasphinx";
+      version = "0.9.15+simgrid";
+      src = pkgs.fetchFromGitHub {
+        owner = "simgrid";
+        repo = pname;
+        rev = "659209069603a5f221596dd039e724cb89b31b82";
+        sha256 = "1nbz822zd2ikzzmpyqsrrpqvlpng72qvl86wcqfn89szbp85c20a";
+      };
+      propagatedBuildInputs = with pythonPackages; [
+        beautifulsoup4
+        docutils
+        javalang
+        future
+        lxml
+        sphinx
+      ];
+    };
+
+    sphinx-tabs = pythonPackages.buildPythonPackage rec {
+      pname = "sphinx-tabs";
+      version = "3.1.0";
+      name = "${pname}-${version}";
+
+      src = pythonPackages.fetchPypi {
+        inherit pname version;
+        sha256 = "0kv935qhml40mly33rk5am128g2ygqkfvizh33vf29hjkf32mvjy";
+      };
+
+      propagatedBuildInputs = with pythonPackages; [
+        docutils
+        pygments
+        sphinx
+      ];
+    };
+
+  };
+in
+  self
index 3f66286..95f48f2 100644 (file)
@@ -19,6 +19,8 @@ INPUT                 += ../../include/simgrid/mutex.h
 INPUT                 += ../../include/simgrid/semaphore.h
 INPUT                 += ../../include/simgrid/vm.h
 INPUT                 += ../../include/simgrid/zone.h
+INPUT                 += ../../include/xbt/dynar.h
+INPUT                 += ../../src/xbt/dynar.cpp
 INPUT                 += ../../include/xbt/signal.hpp
 INPUT                 += ../../src/msg/
 INPUT                 += ../../src/plugins/
index 696dae7..ee8e3de 100644 (file)
@@ -25,9 +25,26 @@ following lines, or several lines if you need several languages.
    $ apt install simgrid-java    # if you want to develop in Java
    $ apt install python3-simgrid # if you want to develop in Python
 
+If you use the Nix_ package manager, the latest SimGrid release is packaged as ``simgrid`` in Nixpkgs_.
+Previous SimGrid versions are maintained in `NUR-Kapack`_ and are available
+pre-compiled in release and debug modes on the `capack cachix binary cache`_
+— refer to `NUR-Kapack's documentation`_ for usage instructions.
+
+If you use a pacman-based system (*e.g.*, Arch Linux and derived distributions),
+the latest SimGrid is available in the `simgrid AUR package`_
+— refer to `AUR official documentation`_ for installation instructions.
+
 If you build pre-compiled packages for other distributions, drop us an
 email.
 
+.. _Nix: https://nixos.org/
+.. _Nixpkgs: https://github.com/NixOS/nixpkgs
+.. _NUR-Kapack: https://github.com/oar-team/nur-kapack
+.. _capack cachix binary cache: https://app.cachix.org/cache/capack
+.. _NUR-Kapack's documentation: https://github.com/oar-team/nur-kapack
+.. _simgrid AUR package: https://aur.archlinux.org/packages/simgrid/
+.. _AUR official documentation: https://wiki.archlinux.org/title/Arch_User_Repository
+
 .. _install_java_precompiled:
 
 Stable Java Package
@@ -58,6 +75,8 @@ Library not found: boost-context
    You should obviously install the ``boost-context`` library on your
    machine, for example with ``apt``.
 
+.. _deprecation_policy:
+
 Version numbering and deprecation
 ---------------------------------
 
index 4ff8021..0bf8ac9 100644 (file)
@@ -101,7 +101,7 @@ https://hal.inria.fr/hal-01523608
 
 .. _howto_churn:
 
-Modeling Churn (e.g., in P2P)
+Modeling churn (e.g., in P2P)
 *****************************
 
 One of the biggest challenges in P2P settings is to cope with the
@@ -137,10 +137,10 @@ listing the events, or something else if you wish.
 
 .. _howto_multicore:
 
-Modeling Multicore Machines
+Modeling multicore machines
 ***************************
 
-Default Model
+Default model
 =============
 
 Multicore machines are very complex, and there are many ways to model
@@ -186,7 +186,7 @@ and unconvincing, but some users achieved very realistic simulations
 of multicore and GPU machines this way.
 
 Modeling machine boot and shutdown periods
-********************************************
+******************************************
 
 When a physical host boots up, a lot of things happen. It takes time
 during which the machine is not usable but dissipates energy, and
@@ -288,8 +288,4 @@ So the final platform for our example becomes :
         <link_ctn id="link2"/>
     </route>
 
-
-:ref:`Modeling I/O: the realistic way<howto_disk>`
-*****************
-
-Tutorial available at: :ref:`howto_disk`.
+.. include:: tuto_disk/analysis.irst
index ad86e14..e89aa0d 100644 (file)
@@ -185,3 +185,166 @@ single integer comparison at runtime, and the parameters are not even evaluated.
 You can even specify a compile-time threshold that will completely remove every logging below the specified priority. Passing ``-DNDEBUG`` to cmake disables every logging of
 priority below INFO while ``-DNLOG`` removes any logging at compile time. Note that using this feature may hinder the stability of SimGrid, as we consider the logs to be fast
 enough to not thoughtfully test the case where they are removed at compile time.
+
+Dynamic arrays
+**************
+
+As SimGrid used to be written in pure C, it used to rely on custom data containers such as dynamic arrays and dictionnaries. Nowadays, the standard library of
+C++ is used internally, but some part of the interface still rely on the old containers, that are thus still available. 
+
+.. warning:: 
+
+   You should probably not start a new project using these data structures,  as we will :ref:`deprecate them from SimGrid <deprecation_policy>` 
+   as soon as possible. Better implementations exist out there anyway, in particular if you're not writting pure C code.
+
+.. doxygentypedef:: xbt_dynar_t
+.. doxygentypedef:: const_xbt_dynar_t
+
+Creation and destruction
+========================
+
+.. doxygenfunction:: xbt_dynar_new
+.. doxygenfunction:: xbt_dynar_free
+.. doxygenfunction:: xbt_dynar_free_container
+.. doxygenfunction:: xbt_dynar_shrink
+
+Dynars as regular arrays
+========================
+   
+.. doxygenfunction:: xbt_dynar_get_cpy
+.. doxygenfunction:: xbt_dynar_insert_at
+.. doxygenfunction:: xbt_dynar_remove_at
+.. doxygenfunction:: xbt_dynar_member
+.. doxygenfunction:: xbt_dynar_sort
+
+Dynar size
+==========
+
+.. doxygenfunction:: xbt_dynar_is_empty
+.. doxygenfunction:: xbt_dynar_length
+.. doxygenfunction:: xbt_dynar_reset
+   
+Perl-like interface
+===================
+
+.. doxygenfunction:: xbt_dynar_push
+.. doxygenfunction:: xbt_dynar_pop
+.. doxygenfunction:: xbt_dynar_unshift
+.. doxygenfunction:: xbt_dynar_shift
+.. doxygenfunction:: xbt_dynar_map
+
+Direct content manipulation
+===========================
+
+Those functions do not retrieve the content, but only their address.
+
+.. doxygenfunction:: xbt_dynar_set_at_ptr
+.. doxygenfunction:: xbt_dynar_get_ptr
+.. doxygenfunction:: xbt_dynar_insert_at_ptr
+.. doxygenfunction:: xbt_dynar_push_ptr
+.. doxygenfunction:: xbt_dynar_pop_ptr
+
+Dynars of scalars
+=================
+
+While the other functions use a memcpy to retrieve the content into the user provided area, those ones use a
+regular affectation. It only works for scalar values, but should be a little faster.
+
+.. doxygendefine:: xbt_dynar_get_as
+.. doxygendefine:: xbt_dynar_set_as
+
+.. doxygendefine:: xbt_dynar_getlast_as
+.. doxygendefine:: xbt_dynar_getfirst_as
+.. doxygendefine:: xbt_dynar_push_as
+.. doxygendefine:: xbt_dynar_pop_as
+
+Iterating over Dynars
+=====================
+
+.. doxygendefine:: xbt_dynar_foreach
+
+Example with scalar values
+==========================
+
+.. code-block:: c
+
+   xbt_dynar_t d = xbt_dynar_new(sizeof(int), nullptr);
+
+   /* 1. Populate the dynar */
+   xbt_dynar_t d = xbt_dynar_new(sizeof(int), nullptr);
+   for (int cpt = 0; cpt < NB_ELEM; cpt++) {
+     xbt_dynar_push_as(d, int, cpt);     /* This is faster (and possible only with scalars) */
+     /* xbt_dynar_push(d,&cpt);       This would also work */
+     xbt_test_log("Push %d, length=%lu", cpt, xbt_dynar_length(d));
+   }
+
+   /* 2. Traverse manually the dynar */
+   for (cursor = 0; cursor < NB_ELEM; cursor++) {
+     int* iptr = (int*)xbt_dynar_get_ptr(d, cursor);
+   /* 1. Populate further the dynar */
+   for (int cpt = 0; cpt < NB_ELEM; cpt++) {
+     xbt_dynar_insert_at(d, cpt, &cpt);
+     xbt_test_log("Push %d, length=%lu", cpt, xbt_dynar_length(d));
+   }
+
+   /* 3. Traverse the dynar */
+   int cpt;
+   xbt_dynar_foreach(d, cursor, cpt) {
+     xbt_test_assert(cursor == (unsigned int) cpt, "The retrieved value is not the same than the injected one (%u!=%d)", cursor, cpt);
+   }
+
+   /* 4. Reset the values */
+   for (int i = 0; i < NB_ELEM; i++)
+     *(int*)xbt_dynar_get_ptr(d, i) = i;
+
+   /* 5. Shift all the values */
+   for (int i = 0; i < NB_ELEM; i++) {
+      int val;
+      xbt_dynar_shift(d, &val);
+   }
+   // the dynar is empty after shifting all values
+
+   /* 5. Free the resources */
+   xbt_dynar_free(&d);
+
+Example with pointed values
+===========================
+
+.. code-block:: c
+
+   xbt_dynar_t d = xbt_dynar_new(sizeof(char*), &xbt_free_ref);
+
+   /// Push/shift example 
+   for (int i = 0; i < NB_ELEM; i++) {
+     char * val = xbt_strdup("hello");
+     xbt_dynar_push(d, &val);
+   }
+   for (int i = 0; i < NB_ELEM; i++) {
+     char *val;
+     xbt_dynar_shift(d, &val);
+     REQUIRE("hello" == val);
+     xbt_free(val);
+   }
+   xbt_dynar_free(&d);
+
+   /// Unshift, traverse and pop example
+   d = xbt_dynar_new(sizeof(char**), &xbt_free_ref);
+   for (int i = 0; i < NB_ELEM; i++) {
+     std::string val = std::to_string(i);
+     s1              = xbt_strdup(val.c_str());
+     xbt_dynar_unshift(d, &s1);
+   }
+   /* 2. Traverse the dynar with the macro */
+   xbt_dynar_foreach (d, iter, s1) {
+     std::string val = std::to_string(NB_ELEM - iter - 1);
+     REQUIRE(s1 == val); // The retrieved value is not the same than the injected one
+   }
+   /* 3. Traverse the dynar with the macro */
+   for (int i = 0; i < NB_ELEM; i++) {
+     std::string val = std::to_string(i);
+     xbt_dynar_pop(d, &s2);
+     REQUIRE(s2 == val); // The retrieved value is not the same than the injected one
+     xbt_free(s2);
+   }
+   /* 4. Free the resources */
+   xbt_dynar_free(&d);
index a0b52e0..8bae0cc 100644 (file)
@@ -1334,8 +1334,8 @@ DVFS
 
       .. doxygenfunction:: simgrid::s4u::Host::get_pstate() const
       .. doxygenfunction:: simgrid::s4u::Host::get_pstate_count() const
-      .. doxygenfunction:: simgrid::s4u::Host::get_pstate_speed(int pstate_index) const
-      .. doxygenfunction:: simgrid::s4u::Host::set_pstate(int pstate_index)
+      .. doxygenfunction:: simgrid::s4u::Host::get_pstate_speed(unsigned long pstate_index) const
+      .. doxygenfunction:: simgrid::s4u::Host::set_pstate(unsigned long pstate_index)
       .. doxygenfunction:: simgrid::s4u::Host::set_speed_profile(kernel::profile::Profile *p)
       .. doxygenfunction:: simgrid::s4u::Host::set_state_profile(kernel::profile::Profile *p)
 
@@ -1349,8 +1349,8 @@ DVFS
       .. doxygenfunction:: sg_host_get_available_speed(const_sg_host_t host)
       .. doxygenfunction:: sg_host_get_nb_pstates(const_sg_host_t host)
       .. doxygenfunction:: sg_host_get_pstate(const_sg_host_t host)
-      .. doxygenfunction:: sg_host_get_pstate_speed(const_sg_host_t host, int pstate_index)
-      .. doxygenfunction:: sg_host_set_pstate(sg_host_t host, int pstate)
+      .. doxygenfunction:: sg_host_get_pstate_speed(const_sg_host_t host, unsigned long pstate_index)
+      .. doxygenfunction:: sg_host_set_pstate(sg_host_t host, unsigned long pstate)
 
 Execution
 ---------
@@ -1609,7 +1609,7 @@ Basic management
       idiom on network zones because SimGrid does not allow (yet) to create nor
       destroy resources once the simulation is started. 
 
-      .. automethod:: simgrid.NetZone.seal
+      .. doxygenfunction:: simgrid::s4u::NetZone::seal
 
    .. group-tab:: Python
 
@@ -1750,7 +1750,7 @@ Zones
      .. doxygenfunction:: simgrid::s4u::create_floyd_zone(const std::string& name)
      .. doxygenfunction:: simgrid::s4u::create_vivaldi_zone(const std::string& name)
      .. doxygenfunction:: simgrid::s4u::create_wifi_zone(const std::string& name)
-     .. doxygenfunction:: simgrid::s4u::create_torus_zone(const std::string& name, const NetZone* parent, const std::vector<unsigned int>& dimensions, const ClusterCallbacks& set_callbacks, double bandwidth, double latency, Link::SharingPolicy sharing_policy)
+     .. doxygenfunction:: simgrid::s4u::create_torus_zone
      .. doxygenfunction:: simgrid::s4u::create_fatTree_zone(const std::string& name, const NetZone* parent, const FatTreeParams& parameters, const ClusterCallbacks& set_callbacks, double bandwidth, double latency, Link::SharingPolicy sharing_policy)
      .. doxygenfunction:: simgrid::s4u::create_dragonfly_zone(const std::string& name, const NetZone* parent, const DragonflyParams& parameters, const ClusterCallbacks& set_callbacks, double bandwidth, double latency, Link::SharingPolicy sharing_policy)
 
@@ -2050,7 +2050,7 @@ Querying info
       .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff, size_t size)
       .. doxygenfunction:: simgrid::s4u::Comm::detach()
       .. doxygenfunction:: simgrid::s4u::Comm::detach(void(*clean_function)(void *))
-      .. doxygenfunction:: simgrid::s4u::Comm::set_payload_size(double bytes)
+      .. doxygenfunction:: simgrid::s4u::Comm::set_payload_size(uint64_t bytes)
       .. doxygenfunction:: simgrid::s4u::Comm::set_rate(double rate)
       .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff)
       .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff, size_t size)
index fed868f..952ca49 100644 (file)
@@ -124,6 +124,7 @@ nitpick_ignore = [
   ('cpp:identifier', 'this_actor'),
   ('cpp:identifier', 'uint64_t'),
   ('cpp:identifier', 'xbt'),
+  ('cpp:identifier', 'xbt_dynar_s'),
   ('cpp:identifier', 'xbt::Extendable<Actor>'),
   ('cpp:identifier', 'xbt::Extendable<Disk>'),
   ('cpp:identifier', 'xbt::Extendable<File>'),
similarity index 96%
rename from docs/source/tuto_disk/analysis.rst
rename to docs/source/tuto_disk/analysis.irst
index e07daf0..dfc8912 100644 (file)
@@ -1,13 +1,11 @@
-
-
-
+.. This file has "irst" as an extension to ensure that it's not parsed by sphinx as is. Instead, it's included in another file that is parsed.
 .. _howto_disk:
 
 Modeling I/O: the realistic way
--------------------------------
+*******************************
 
 Introduction
-~~~~~~~~~~~~
+============
 
 This tutorial presents how to perform faithful IO experiments in
 SimGrid. It is based on the paper "Adding Storage Simulation
@@ -38,7 +36,7 @@ in IO operations (Fig. 5 to 7).
   evolved and may not be available anymore.
 
 Running this tutorial
-^^^^^^^^^^^^^^^^^^^^^
+---------------------
 
 A Dockerfile is available in ``docs/source/tuto_disk``. It allows you to
 re-run this tutorial. For that, build the image and run the container:
@@ -48,12 +46,12 @@ re-run this tutorial. For that, build the image and run the container:
 - ``docker run -it tuto_disk``
 
 Analyzing the experimental data
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+===============================
 
 We start by analyzing and extracting the real data available.
 
 Scripts
-^^^^^^^
+-------
 
 We use a special method to create non-uniform histograms to represent
 the noise in IO operations. 
@@ -64,7 +62,7 @@ here.
 Copied from: `https://rdrr.io/github/dlebauer/pecan-priors/src/R/plots.R <https://rdrr.io/github/dlebauer/pecan-priors/src/R/plots.R>`_
 
 Data preparation
-^^^^^^^^^^^^^^^^
+----------------
 
 Some initial configurations/list of packages.
 
@@ -227,10 +225,10 @@ Preparing data for concurrent analysis.
     dfrange$Jobs=16
 
 Griffon (SATA)
-^^^^^^^^^^^^^^
+--------------
 
 Modeling resource sharing w/ concurrent access
-::::::::::::::::::::::::::::::::::::::::::::::
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 This figure presents the overall performance of IO operation with
 concurrent access to the disk. Note that the image is different
@@ -249,10 +247,10 @@ available data to obtain exaclty the same results.
       geom_errorbar(data=dfd, aes(x=Jobs, ymin=BW-ci, ymax=BW+ci),color="black",width=.6) +
       xlab("Number of concurrent operations") + ylab("Aggregated Bandwidth (MiB/s)")  + guides(color=FALSE)  + xlim(0,NA) + ylim(0,NA)
 
-.. image:: fig/griffon_deg.png
+.. image:: tuto_disk/fig/griffon_deg.png
 
 Read
-''''
+""""
 
 Getting read data for Griffon from 1 to 15 concurrent reads.
 
@@ -276,7 +274,7 @@ Getting read data for Griffon from 1 to 15 concurrent reads.
     }
 
 Write
-'''''
+"""""
 
 Same for write operations.
 
@@ -301,7 +299,7 @@ Same for write operations.
     }
 
 Modeling read/write bandwidth variability
-:::::::::::::::::::::::::::::::::::::::::
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Fig.5 in the paper presents the noise in the read/write operations in
 the Griffon SATA disk.
@@ -312,7 +310,7 @@ effective bandwidth. However, in this tutorial, we use dhist
 more precise information over the highly dense areas around the mean.
 
 Read
-''''
+""""
 
 First, we present the histogram for read operations.
 
@@ -321,7 +319,7 @@ First, we present the histogram for read operations.
     griffon_read = df %>% filter(grepl("^Griffon", Cluster)) %>% filter(Operation == "Read") %>% select(Bwi)
     dhist(1/griffon_read$Bwi)
 
-.. image:: fig/griffon_read_dhist.png
+.. image:: tuto_disk/fig/griffon_read_dhist.png
 
 Saving it to be exported in json format.
 
@@ -355,7 +353,7 @@ Saving it to be exported in json format.
     }
 
 Write
-'''''
+"""""
 
 Same analysis for write operations.
 
@@ -364,7 +362,7 @@ Same analysis for write operations.
     griffon_write = df %>% filter(grepl("^Griffon", Cluster)) %>% filter(Operation == "Write") %>% select(Bwi)
     dhist(1/griffon_write$Bwi)
 
-.. image:: fig/griffon_write_dhist.png
+.. image:: tuto_disk/fig/griffon_write_dhist.png
 
 .. code:: R
 
@@ -401,15 +399,15 @@ Same analysis for write operations.
     }
 
 Edel (SSD)
-^^^^^^^^^^
+----------
 
 This section presents the exactly same analysis for the Edel SSDs.
 
 Modeling resource sharing w/ concurrent access
-::::::::::::::::::::::::::::::::::::::::::::::
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Read
-''''
+""""
 
 Getting read data for Edel from 1 to 15 concurrent operations.
 
@@ -450,7 +448,7 @@ Getting read data for Edel from 1 to 15 concurrent operations.
     }
 
 Write
-'''''
+"""""
 
 Same for write operations.
 
@@ -493,17 +491,17 @@ Same for write operations.
     }
 
 Modeling read/write bandwidth variability
-:::::::::::::::::::::::::::::::::::::::::
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Read
-''''
+""""
 
 .. code:: R
 
     edel_read = df %>% filter(grepl("^Edel", Cluster)) %>% filter(Operation == "Read") %>% select(Bwi)
     dhist(1/edel_read$Bwi)
 
-.. image:: fig/edel_read_dhist.png
+.. image:: tuto_disk/fig/edel_read_dhist.png
 
 Saving it to be exported in json format.
 
@@ -555,7 +553,7 @@ Saving it to be exported in json format.
     }
 
 Write
-'''''
+"""""
 
 .. code:: R
 
@@ -563,7 +561,7 @@ Write
     edel_write = df %>% filter(grepl("^Edel", Cluster)) %>% filter(Operation == "Write") %>% select(Bwi)
     dhist(1/edel_write$Bwi)
 
-.. image:: fig/edel_write_dhist.png
+.. image:: tuto_disk/fig/edel_write_dhist.png
 
 Saving it to be exported later.
 
@@ -620,7 +618,7 @@ Saving it to be exported later.
     }
 
 Exporting to JSON
-~~~~~~~~~~~~~~~~~
+=================
 
 Finally, let's save it to a file to be opened by our simulator.
 
@@ -630,14 +628,14 @@ Finally, let's save it to a file to be opened by our simulator.
     cat(json, file="IO_noise.json")
 
 Injecting this data in SimGrid
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+==============================
 
 To mimic this behavior in SimGrid, we use two features in the platform
 description: non-linear sharing policy and bandwidth factors. For more
 details, please see the source code in ``tuto_disk.cpp``.
 
 Modeling resource sharing w/ concurrent access
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------------------------------------
 
 The ``set_sharing_policy`` method allows the user to set a callback to
 dynamically change the disk capacity. The callback is called each time
@@ -658,7 +656,7 @@ capacity.
     disk->set_sharing_policy(sg4::Disk::Operation::READ, sg4::Disk::SharingPolicy::NONLINEAR, &disk_dynamic_sharing);
 
 Modeling read/write bandwidth variability
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------------------
 
 The noise in I/O operations can be obtained by applying a factor to
 the I/O bandwidth of the disk. This factor is applied when we update
@@ -681,7 +679,7 @@ write). It must return a multiply factor (e.g. 1.0 for doing nothing).
     disk->set_factor_cb(&disk_variability);
 
 Running our simulation
-^^^^^^^^^^^^^^^^^^^^^^
+----------------------
 
 The binary was compiled in the provided docker container.
 
@@ -690,7 +688,7 @@ The binary was compiled in the provided docker container.
     ./tuto_disk > ./simgrid_disk.csv
 
 Analyzing the SimGrid results
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+=============================
 
 The figure below presents the results obtained by SimGrid.
 
@@ -717,7 +715,7 @@ the real platform.
         facet_wrap(disk~op,ncol=2,scale="free_y")+ # ) + #
         xlab("Number of concurrent operations") + ylab("Aggregated Bandwidth (MiB/s)")  + guides(color=FALSE)  + xlim(0,NA) + ylim(0,NA)
 
-.. image:: fig/simgrid_results.png
+.. image:: tuto_disk/fig/simgrid_results.png
 
 Note: The variability in griffon read operation seems to decrease when
 we have more concurrent operations. This is a particularity of the
index 6d8e00d..68740d1 100644 (file)
@@ -95,12 +95,13 @@ public:
   /**
    * @brief Describes how the disk is shared between activities for each operation
    *
-   * Disks have different bandwidths for read and write operations. This method
-   * allows you to set different sharing policies for each operation:
+   * Disks have different bandwidths for read and write operations, that can have different policies:
    * - Read: resource sharing for read operation
    * - Write: resource sharing for write
    * - ReadWrite: global sharing for read and write operations
    *
+   * Note that the NONLINEAR callback is in the critical path of the solver, so it should be fast.
+   *
    * @param op Operation type
    * @param policy Sharing policy
    * @param cb Callback for NONLINEAR policies
index 88d7d36..d50d8f9 100644 (file)
@@ -174,6 +174,8 @@ public:
   /**
    * @brief Describes how the CPU is shared between concurrent tasks
    *
+   * Note that the NONLINEAR callback is in the critical path of the solver, so it should be fast.
+   *
    * @param policy Sharing policy
    * @param cb Callback for NONLINEAR policies
    */
index bcd91af..4eb8cf6 100644 (file)
@@ -78,7 +78,10 @@ public:
    */
   Link* set_latency(const std::string& value);
 
-  /** @brief Describes how the link is shared between flows */
+  /** @brief Describes how the link is shared between flows
+   *
+   *  Note that the NONLINEAR callback is in the critical path of the solver, so it should be fast.
+   */
   Link* set_sharing_policy(SharingPolicy policy, const NonLinearResourceCb& cb = {});
   SharingPolicy get_sharing_policy() const;
 
index 7f59f28..ca8a25b 100644 (file)
 
 SG_BEGIN_DECL
 
-/** @addtogroup XBT_dynar
- * @brief DynArr are dynamically sized vector which may contain any type of variables.
+/** @brief Dynar data type (opaque type)
  *
- * These are the SimGrid version of the dynamically size arrays, which all C programmer recode one day or another.
- *
- * For performance concerns, the content of DynArr must be homogeneous (in contrary to dictionaries -- see the
- * @ref XBT_dict section). You thus have to provide the function which will be used to free the content at
+ * These are the SimGrid version of the DYNamically sized ARays, which all C programmer recode one day or another.
+ * For performance concerns, the content of dynars must be homogeneous (in contrary to @ref xbt_dict_t).
+ * You thus have to provide the function which will be used to free the content at
  * structure creation (of type void_f_pvoid_t).
- *
- * @deprecated If you are using C++, you might want to use `std::vector` instead.
- *
- * @section XBT_dynar_exscal Example with scalar
- * @dontinclude dynar.cpp
- *
- * @skip Vars_decl
- * @skip dyn
- * @until iptr
- * @skip Populate_ints
- * @skip dyn
- * @until end_of_traversal
- * @skip shifting
- * @skip val
- * @until xbt_dynar_free
- *
- * @section XBT_dynar_exptr Example with pointed data
- *
- * @skip test_dynar_string
- * @skip dynar_t
- * @until s2
- * @skip Populate_str
- * @skip dyn
- * @until }
- * @skip macro
- * @until dynar_free
- * @skip end_of_doxygen
- * @until }
- *
- * Note that if you use dynars to store pointed data, xbt_dynar_member() won't be for you. Instead of comparing your
- * pointed elements, it compares the pointer to them.
  */
-/** @defgroup XBT_dynar_cons Dynar constructor and destructor
- *  @ingroup XBT_dynar
- *
- *  @{
- */
-/** @brief Dynar data type (opaque type) */
 typedef struct xbt_dynar_s *xbt_dynar_t;
+/** constant dynar */
 typedef const struct xbt_dynar_s* const_xbt_dynar_t;
+/* @warning DO NOT USE THIS STRUCTURE DIRECTLY! Use the public interface, even if it's public for sake of inlining */
+typedef struct xbt_dynar_s {
+  unsigned long size;
+  unsigned long used;
+  unsigned long elmsize;
+  void* data;
+  void_f_pvoid_t free_f;
+} s_xbt_dynar_t;
 
 XBT_PUBLIC xbt_dynar_t xbt_dynar_new(const unsigned long elm_size, void_f_pvoid_t free_f);
 XBT_PUBLIC void xbt_dynar_free(xbt_dynar_t* dynar);
 XBT_PUBLIC void xbt_dynar_free_container(xbt_dynar_t* dynar);
 XBT_PUBLIC void xbt_dynar_shrink(xbt_dynar_t dynar, int empty_slots);
 
-/** @} */
-/** @defgroup XBT_dynar_array Dynar as a regular array
- *  @ingroup XBT_dynar
- *
- *  @{
- */
-
+/* Dynar as a regular array */
 XBT_PUBLIC void xbt_dynar_get_cpy(const_xbt_dynar_t dynar, unsigned long idx, void* dst);
 
 XBT_PUBLIC void xbt_dynar_insert_at(xbt_dynar_t dynar, int idx, const void* src);
@@ -85,57 +49,28 @@ XBT_PUBLIC int xbt_dynar_member(const_xbt_dynar_t dynar, const void* elem);
 XBT_PUBLIC void xbt_dynar_sort(const_xbt_dynar_t dynar, int_f_cpvoid_cpvoid_t compar_fn);
 XBT_ATTRIB_DEPRECATED_v331("This function will be removed") XBT_PUBLIC void* xbt_dynar_to_array(xbt_dynar_t dynar);
 
-/** @} */
-/** @defgroup XBT_dynar_misc Dynar miscellaneous functions
- *  @ingroup XBT_dynar
- *
- *  @{
- */
-
+/* Dynar size */
+XBT_PUBLIC void xbt_dynar_reset(xbt_dynar_t dynar);
 XBT_PUBLIC unsigned long xbt_dynar_length(const_xbt_dynar_t dynar);
 XBT_PUBLIC int xbt_dynar_is_empty(const_xbt_dynar_t dynar);
-XBT_PUBLIC void xbt_dynar_reset(xbt_dynar_t dynar);
-
-/** @} */
-/** @defgroup XBT_dynar_perl Perl-like use of dynars
- *  @ingroup XBT_dynar
- *
- *  @{
- */
 
+/* Perl-like interface */
 XBT_PUBLIC void xbt_dynar_push(xbt_dynar_t dynar, const void* src);
 XBT_PUBLIC void xbt_dynar_pop(xbt_dynar_t dynar, void* dst);
 XBT_PUBLIC void xbt_dynar_unshift(xbt_dynar_t dynar, const void* src);
 XBT_PUBLIC void xbt_dynar_shift(xbt_dynar_t dynar, void* dst);
 XBT_PUBLIC void xbt_dynar_map(const_xbt_dynar_t dynar, void_f_pvoid_t op);
 
-/** @} */
-/** @defgroup XBT_dynar_ctn Direct manipulation to the dynars content
- *  @ingroup XBT_dynar
- *
- *  Those functions do not retrieve the content, but only their address.
- *
- *  @{
- */
-
+/* Direct content manipulation*/
 XBT_PUBLIC void* xbt_dynar_set_at_ptr(const xbt_dynar_t dynar, unsigned long idx);
 XBT_PUBLIC void* xbt_dynar_get_ptr(const_xbt_dynar_t dynar, unsigned long idx);
 XBT_PUBLIC void* xbt_dynar_insert_at_ptr(xbt_dynar_t dynar, int idx);
 XBT_PUBLIC void* xbt_dynar_push_ptr(xbt_dynar_t dynar);
 XBT_PUBLIC void* xbt_dynar_pop_ptr(xbt_dynar_t dynar);
 
-/** @} */
-/** @defgroup XBT_dynar_speed Speed optimized access to dynars of scalars
- *  @ingroup XBT_dynar
- *
- *  While the other functions use a memcpy to retrieve the content into the user provided area, those ones use a
- *  regular affectation. It only works for scalar values, but should be a little faster.
- *
- *  @{
- */
-
-  /** @brief Quick retrieval of scalar content
-   *  @hideinitializer */
+/* Dynars of scalar */
+/** @brief Quick retrieval of scalar content
+ *  @hideinitializer */
 #  define xbt_dynar_get_as(dynar,idx,type) \
           (*(type*)xbt_dynar_get_ptr((dynar),(idx)))
 /** @brief Quick setting of scalar content
@@ -157,31 +92,7 @@ XBT_PUBLIC void* xbt_dynar_pop_ptr(xbt_dynar_t dynar);
 #  define xbt_dynar_pop_as(dynar,type) \
            (*(type*)xbt_dynar_pop_ptr(dynar))
 
-/** @} */
-/** @defgroup XBT_dynar_cursor Cursors on dynar
- *  @ingroup XBT_dynar
- *
- * Cursors are used to iterate over the structure. Never add elements to the DynArr during the traversal.
- *
- *  @{
- */
-
-/*
- * @warning DO NOT USE THIS STRUCTURE DIRECTLY! Instead, use the public interface:
- *          This was made public to allow:
- *           - the inlining of the foreach elements
- *           - sending such beasts over the network
- *
- * @see xbt_dynar_length()
- */
-typedef struct xbt_dynar_s {
-  unsigned long size;
-  unsigned long used;
-  unsigned long elmsize;
-  void *data;
-  void_f_pvoid_t free_f;
-} s_xbt_dynar_t;
-
+/* Iterating over dynars */
 static inline int _xbt_dynar_cursor_get(const_xbt_dynar_t dynar, unsigned int idx, void* dst)
 {
   if (!dynar) /* iterating over a NULL dynar is a no-op */
@@ -198,27 +109,25 @@ static inline int _xbt_dynar_cursor_get(const_xbt_dynar_t dynar, unsigned int id
 /** @brief Iterates over the whole dynar.
  *
  *  @param _dynar what to iterate over
- *  @param _cursor an integer used as cursor
- *  @param _data
+ *  @param _cursor an unsigned integer used as cursor
  *  @hideinitializer
  *
  * Here is an example of usage:
  * @code
 xbt_dynar_t dyn;
 unsigned int cpt;
-string *str;
+char* str;
 xbt_dynar_foreach (dyn,cpt,str) {
   printf("Seen %s\n",str);
 }
 @endcode
  *
  * Note that underneath, that's a simple for loop with no real black  magic involved. It's perfectly safe to interrupt
- * a foreach with a break or a return statement.
+ * a foreach with a break or a return statement, but inserting or removing elements during the traversal is probably a
+ * bad idea (even if you can fix side effects by manually changing the counter).
  */
 #define xbt_dynar_foreach(_dynar, _cursor, _data)                                                                      \
   for ((_cursor) = 0; _xbt_dynar_cursor_get((_dynar), (_cursor), &(_data)); (_cursor)++)
-
-/** @} */
 SG_END_DECL
 
 #endif /* XBT_DYNAR_H */
index 30c6367..7f74eef 100644 (file)
@@ -505,7 +505,7 @@ int simgrid_get_actor_count() // XBT_ATTRIB_DEPRECATED_v330
 void simgrid_set_maestro(void (*code)(void*), void* data)
 {
 #ifdef _WIN32
-  XBT_INFO("WARNING, SIMIX_set_maestro is believed to not work on windows. Please help us investigating this issue if "
+  XBT_WARN("simgrid_set_maestro is believed to not work on windows. Please help us investigating this issue if "
            "you need that feature");
 #endif
   maestro_code = std::bind(code, data);
index 1a4424f..4e84015 100644 (file)
@@ -71,13 +71,12 @@ static inline void _xbt_dynar_get_elm(void* dst, const_xbt_dynar_t dynar, unsign
   memcpy(dst, elm, dynar->elmsize);
 }
 
-/** @brief Constructor
+/**
+ * Creates a new dynar. If a @c free_f is provided, the elements have to be pointer of pointer. That is to say that
+ * dynars can contain either base types (int, char, double, etc) or pointer of pointers (struct **).
  *
  * @param elmsize size of each element in the dynar
  * @param free_f function to call each time we want to get rid of an element (or nullptr if nothing to do).
- *
- * Creates a new dynar. If a free_func is provided, the elements have to be pointer of pointer. That is to say that
- * dynars can contain either base types (int, char, double, etc) or pointer of pointers (struct **).
  */
 xbt_dynar_t xbt_dynar_new(const unsigned long elmsize, void_f_pvoid_t free_f)
 {
@@ -92,12 +91,10 @@ xbt_dynar_t xbt_dynar_new(const unsigned long elmsize, void_f_pvoid_t free_f)
   return dynar;
 }
 
-/** @brief Destructor of the structure not touching to the content
+/** Destructor of the structure leaving the content unmodified. Ie, the array is freed, but the content is not touched
+ * (the @a free_f function is not used).
  *
  * @param dynar poor victim
- *
- * kilkil a dynar BUT NOT its content. Ie, the array is freed, but the content is not touched (the @a free_f function
- * is not used)
  */
 void xbt_dynar_free_container(xbt_dynar_t* dynar)
 {
@@ -109,10 +106,7 @@ void xbt_dynar_free_container(xbt_dynar_t* dynar)
   }
 }
 
-/** @brief Frees the content and set the size to 0
- *
- * @param dynar who to squeeze
- */
+/** @brief Frees the content and set the size to 0 */
 void xbt_dynar_reset(xbt_dynar_t dynar)
 {
   _sanity_check_dynar(dynar);
@@ -125,27 +119,19 @@ void xbt_dynar_reset(xbt_dynar_t dynar)
 }
 
 /**
- * @brief Shrink the dynar by removing empty slots at the end of the internal array
- * @param dynar a dynar
- * @param empty_slots_wanted number of empty slots you want to keep at the end of the internal array for further
- * insertions
+ * Shrinks (reduces) the dynar by removing empty slots in the internal storage to save memory.
+ * If @c empty_slots_wanted is not zero, this operation preserves that amount of empty slot, for fast future additions.
+ * Note that if @c empty_slots_wanted is large enough, the internal array is expanded instead of shrunk.
  *
- * Reduces the internal array size of the dynar to the number of elements plus @a empty_slots_wanted.
- * After removing elements from the dynar, you can call this function to make the dynar use less memory.
- * Set @a empty_slots_wanted to zero to reduce the dynar internal array as much as possible.
- * Note that if @a empty_slots_wanted is greater than the array size, the internal array is expanded instead of shrunk.
+ * @param dynar a dynar
+ * @param empty_slots_wanted number of empty slots elements that can be inserted the internal storage without resizing it
  */
 void xbt_dynar_shrink(xbt_dynar_t dynar, int empty_slots_wanted)
 {
   _xbt_dynar_resize(dynar, dynar->used + empty_slots_wanted);
 }
 
-/** @brief Destructor
- *
- * @param dynar poor victim
- *
- * kilkil a dynar and its content
- */
+/** @brief Destructor: kilkil a dynar and its content. */
 void xbt_dynar_free(xbt_dynar_t* dynar)
 {
   if (dynar && *dynar) {
@@ -154,19 +140,13 @@ void xbt_dynar_free(xbt_dynar_t* dynar)
   }
 }
 
-/** @brief Count of dynar's elements
- *
- * @param dynar the dynar we want to measure
- */
+/** @brief Count of dynar's elements */
 unsigned long xbt_dynar_length(const_xbt_dynar_t dynar)
 {
   return (dynar ? dynar->used : 0UL);
 }
 
-/**@brief check if a dynar is empty
- *
- *@param dynar the dynat we want to check
- */
+/**@brief check if a dynar is empty */
 int xbt_dynar_is_empty(const_xbt_dynar_t dynar)
 {
   return (xbt_dynar_length(dynar) == 0);
@@ -188,11 +168,7 @@ void xbt_dynar_get_cpy(const_xbt_dynar_t dynar, unsigned long idx, void* dst)
 
 /** @brief Retrieve a pointer to the Nth element of a dynar.
  *
- * @param dynar information dealer
- * @param idx index of the slot we want to retrieve
- * @return the @a idx-th element of @a dynar.
- *
- * @warning The returned value is the actual content of the dynar.
+ * Note that the returned value is the actual content of the dynar.
  * Make a copy before fooling with it.
  */
 void* xbt_dynar_get_ptr(const_xbt_dynar_t dynar, unsigned long idx)
@@ -261,7 +237,7 @@ void xbt_dynar_insert_at(xbt_dynar_t dynar, int idx, const void* src)
   memcpy(xbt_dynar_insert_at_ptr(dynar, idx), src, dynar->elmsize);
 }
 
-/** @brief Remove the Nth dynar's element, sliding the previous values to the left
+/** @brief Remove the Nth element, sliding other values to the left
  *
  * Get the Nth element of a dynar, removing it from the dynar and moving all subsequent values to one position left in
  * the dynar.
@@ -293,7 +269,7 @@ void xbt_dynar_remove_at(xbt_dynar_t dynar, int idx, void* object)
 /** @brief Returns a boolean indicating whether the element is part of the dynar
  *
  * Beware that if your dynar contains pointed values (such as strings) instead of scalar, this function is probably not
- * what you want.
+ * what you want. It would compare the pointer values, not the pointed elements.
  */
 int xbt_dynar_member(const_xbt_dynar_t dynar, const void* elem)
 {
@@ -388,21 +364,21 @@ void xbt_dynar_map(const_xbt_dynar_t dynar, void_f_pvoid_t op)
  * a comparison function. Here is a quick example if you have integers in your dynar:
  *
  * @verbatim
* int cmpfunc (const void * a, const void * b) {
*   int intA = *(int*)a;
*   int intB = *(int*)b;
*   return intA - intB;
* }
* @endverbatim
  int cmpfunc (const void * a, const void * b) {
    int intA = *(int*)a;
    int intB = *(int*)b;
    return intA - intB;
  }
  @endverbatim
  *
- * and now to sort a dynar of MSG hosts depending on their speed:
+ * And now, a function to sort a dynar of MSG hosts depending on their speed:
  * @verbatim
* int cmpfunc(const MSG_host_t a, const MSG_host_t b) {
*   MSG_host_t hostA = *(MSG_host_t*)a;
*   MSG_host_t hostB = *(MSG_host_t*)b;
*   return MSG_host_get_speed(hostA) - MSG_host_get_speed(hostB);
* }
* @endverbatim
  int cmpfunc(const MSG_host_t a, const MSG_host_t b) {
    MSG_host_t hostA = *(MSG_host_t*)a;
    MSG_host_t hostB = *(MSG_host_t*)b;
    return MSG_host_get_speed(hostA) - MSG_host_get_speed(hostB);
  }
  @endverbatim
  *
  * @param dynar the dynar to sort
  * @param compar_fn comparison function of type (int (compar_fn*) (const void*) (const void*)).
index 26236ea..37124d7 100644 (file)
@@ -18,7 +18,6 @@ TEST_CASE("xbt::dynar: generic C vector", "dynar")
 {
   SECTION("Dynars of integers")
   {
-    /* Vars_decl [doxygen cruft] */
     int cpt;
     unsigned int cursor;
 
@@ -32,7 +31,6 @@ TEST_CASE("xbt::dynar: generic C vector", "dynar")
     /* in your code is naturally the way to go outside a regression test */
 
     INFO("==== Push " << NB_ELEM << " int, set them again 3 times, traverse them, shift them");
-    /* Populate_ints [doxygen cruft] */
     /* 1. Populate the dynar */
     d = xbt_dynar_new(sizeof(int), nullptr);
     for (int i = 0; i < NB_ELEM; i++) {
index dfb9e35..a0c85b1 100644 (file)
@@ -967,7 +967,7 @@ set(DOC_SOURCES
   docs/source/tuto_smpi/roundtrip.c
 
   docs/source/tuto_disk/analysis.org
-  docs/source/tuto_disk/analysis.rst
+  docs/source/tuto_disk/analysis.irst
   docs/source/tuto_disk/CMakeLists.txt
   docs/source/tuto_disk/Dockerfile
   docs/source/tuto_disk/fig/edel_read_dhist.png
index 8cf4bb6..ad0eb2e 100644 (file)
@@ -27,6 +27,8 @@
 
 + \.github/.*
 
++ docs/default.nix
+
 + tools/appveyor-irc-notify\.py
 + tools/docker/.*
 + tools/git-hooks/.*