X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a79a8e1cab86ccc687cfbc97b01b735acb996f16..82230d737404aa70c3c2b5824d97109f1f129d58:/src/kernel/routing/DragonflyZone.hpp diff --git a/src/kernel/routing/DragonflyZone.hpp b/src/kernel/routing/DragonflyZone.hpp index 2090b32233..fd63be55e4 100644 --- a/src/kernel/routing/DragonflyZone.hpp +++ b/src/kernel/routing/DragonflyZone.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-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. */ @@ -17,18 +17,16 @@ public: unsigned int group_; unsigned int chassis_; unsigned int blade_; - surf::Link** blueLinks_ = nullptr; - surf::Link** blackLinks_ = nullptr; - surf::Link** greenLinks_ = nullptr; - surf::Link** myNodes_ = nullptr; + surf::LinkImpl** blueLinks_ = nullptr; + surf::LinkImpl** blackLinks_ = nullptr; + surf::LinkImpl** greenLinks_ = nullptr; + surf::LinkImpl** myNodes_ = nullptr; DragonflyRouter(int i, int j, int k); ~DragonflyRouter(); }; -/** - * \class AsClusterDragonfly - * - * \brief Dragonfly representation and routing. +/** @ingroup ROUTING_API + * @brief NetZone using a Dragonfly topology * * Generate dragonfly according to the topology asked for, according to: * Cray Cascade: a Scalable HPC System based on a Dragonfly Network @@ -53,7 +51,7 @@ public: * LIMITATIONS (for now): * - Routing is only static and uses minimal routes. * - When n links are used between two routers/groups, we consider only one link with n times the bandwidth (needs to - * be validated on a real system) + * be validated on a real system) * - All links have the same characteristics for now * - Blue links are all attached to routers in the chassis n°0. This limits * the number of groups possible to the number of blades in a chassis. This @@ -62,19 +60,19 @@ public: */ class XBT_PRIVATE DragonflyZone : public ClusterZone { public: - explicit DragonflyZone(NetZone* father, const char* name); + explicit DragonflyZone(NetZone* father, std::string name); ~DragonflyZone() override; // void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position) override; - void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override; - void parse_specific_arguments(sg_platf_cluster_cbarg_t cluster) override; + void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t into, double* latency) override; + void parse_specific_arguments(ClusterCreationArgs* cluster) override; void seal() override; void generateRouters(); void generateLinks(); - void createLink(char* id, int numlinks, Link** linkup, Link** linkdown); - unsigned int* rankId_to_coords(int rankId); + void createLink(const std::string& id, int numlinks, surf::LinkImpl** linkup, surf::LinkImpl** linkdown); private: - sg_platf_cluster_cbarg_t cluster_; + void rankId_to_coords(int rankId, unsigned int (*coords)[4]); + ClusterCreationArgs* cluster_ = nullptr; unsigned int numNodesPerBlade_ = 0; unsigned int numBladesPerChassis_ = 0; unsigned int numChassisPerGroup_ = 0;