Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
compile with -Wmissing-declarations to catch more errors
[simgrid.git] / src / surf / surf_routing_cluster_fat_tree.cpp
index 83bd2eb..041abb7 100644 (file)
@@ -6,7 +6,8 @@
 #include <vector>
 #include <iostream>
 
-#include "surf_routing_cluster_fat_tree.hpp"
+#include "src/surf/surf_routing_private.hpp"
+#include "src/surf/surf_routing_cluster_fat_tree.hpp"
 #include "xbt/lib.h"
 
 #include <boost/algorithm/string/split.hpp>
@@ -58,8 +59,8 @@ bool AsClusterFatTree::isInSubTree(FatTreeNode *root, FatTreeNode *node) {
   return true;
 }
 
-void AsClusterFatTree::getRouteAndLatency(RoutingEdge *src,
-                                          RoutingEdge *dst,
+void AsClusterFatTree::getRouteAndLatency(NetCard *src,
+                                          NetCard *dst,
                                           sg_platf_route_cbarg_t into,
                                           double *latency) {
   FatTreeNode *source, *destination, *currentNode;
@@ -508,7 +509,7 @@ FatTreeNode::FatTreeNode(sg_platf_cluster_cbarg_t cluster, int id, int level,
     memset(&linkTemplate, 0, sizeof(linkTemplate));
     linkTemplate.bandwidth = cluster->limiter_link;
     linkTemplate.latency = 0;
-    linkTemplate.state = SURF_RESOURCE_ON;
+    linkTemplate.initiallyOn = 1;
     linkTemplate.policy = SURF_LINK_SHARED;
     linkTemplate.id = bprintf("limiter_%d", id);
     sg_platf_new_link(&linkTemplate);
@@ -519,7 +520,7 @@ FatTreeNode::FatTreeNode(sg_platf_cluster_cbarg_t cluster, int id, int level,
     memset(&linkTemplate, 0, sizeof(linkTemplate));
     linkTemplate.bandwidth = cluster->loopback_bw;
     linkTemplate.latency = cluster->loopback_lat;
-    linkTemplate.state = SURF_RESOURCE_ON;
+    linkTemplate.initiallyOn = 1;
     linkTemplate.policy = SURF_LINK_FATPIPE;
     linkTemplate.id = bprintf("loopback_%d", id);
     sg_platf_new_link(&linkTemplate);
@@ -537,7 +538,7 @@ FatTreeLink::FatTreeLink(sg_platf_cluster_cbarg_t cluster,
   memset(&linkTemplate, 0, sizeof(linkTemplate));
   linkTemplate.bandwidth = cluster->bw;
   linkTemplate.latency = cluster->lat;
-  linkTemplate.state = SURF_RESOURCE_ON;
+  linkTemplate.initiallyOn = 1;
   linkTemplate.policy = cluster->sharing_policy; // sthg to do with that ?
   linkTemplate.id = bprintf("link_from_%d_to_%d_%d", downNode->id, upNode->id,
                             uniqueId);