Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New: s4u::create_torus_zone
authorBruno Donassolo <bruno.donassolo@inria.fr>
Mon, 19 Apr 2021 17:30:26 +0000 (19:30 +0200)
committerBruno Donassolo <bruno.donassolo@inria.fr>
Fri, 23 Apr 2021 08:39:06 +0000 (10:39 +0200)
commita9c676f1de2ffc2dd8dbb788a582ac6023142048
treefdcc7da1b152836cacdeee0756ebf58e883c8af9
parent241fcf4924bafcae753a5d106d97dd6f2af539af
New: s4u::create_torus_zone

Implements the builder method for Torus zones

NetZone* create_torus_zone(const std::string& name, const NetZone* parent, const std::vector<unsigned int>& dimensions,
                           double bandwidth, double latency, Link::SharingPolicy sharing_policy,
                           const std::function<TorusNetPointCb>& set_netpoint,
                           const std::function<TorusLinkCb>& set_loopback = {},
                           const std::function<TorusLinkCb>& set_limiter  = {});

This builder method allow us to keep hiding the internals of our
NetZones, exporting only a NetZone* to the end-user.

It uses callbacks functions to populate the leaves in the Torus, 3
callbacks can be used:
- set_netpoint: must return a pair NetPoint,Gateway. This allows us to
have complex netzones under each leaf
- set_loopback: The link used to loopback communications
- set_limiter: A limiter link for each leaf

The links inside the Torus are homogeneous and described by the
bandwidth, latency and sharing policy parameters.

As the creation of resources are linked to the netzones (create_host,
create_link functions), we have to add the parent parameter to the
builder function. Otherwise, the user cannot create the resources
associated with the leaves in the callbacks.

Obs.: By now, the sg_platf.cpp isn't using this new builder method.
It will be changed once we have implemented the builder for every
cluster type (fatree, dragonfly).
include/simgrid/kernel/routing/TorusZone.hpp
include/simgrid/s4u/NetZone.hpp
src/kernel/routing/ClusterZone.cpp
src/kernel/routing/TorusZone.cpp