Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / surf / AsClusterFatTree.cpp
index 7dc11a2..3b071e1 100644 (file)
@@ -152,7 +152,7 @@ void AsClusterFatTree::getRouteAndLatency(NetCard *src,
 /* This function makes the assumption that parse_specific_arguments() and
  * addNodes() have already been called
  */
-void AsClusterFatTree::create_links(){
+void AsClusterFatTree::seal(){
   if(this->levels_ == 0) {
     return;
   }
@@ -403,7 +403,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t cluster
 
   // TODO : we have to check for zeros and negative numbers, or it might crash
   if (parameters.size() != 4){
-    surf_parse_error("Fat trees are defined by the levels number and 3 vectors, see the documentation for more informations");
+    surf_parse_error("Fat trees are defined by the levels number and 3 vectors, see the documentation for more information");
   }
 
   // The first parts of topo_parameters should be the levels number
@@ -413,7 +413,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t cluster
   boost::split(tmp, parameters[1], boost::is_any_of(","));
   if(tmp.size() != this->levels_) {
     surf_parse_error("Fat trees are defined by the levels number and 3 vectors" 
-                     ", see the documentation for more informations"); 
+                     ", see the documentation for more information");
   }
   for(size_t i = 0 ; i < tmp.size() ; i++){
     this->lowerLevelNodesNumber_.push_back(xbt_str_parse_int(tmp[i].c_str(), "Invalid lower level node number: %s"));
@@ -423,7 +423,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t cluster
   boost::split(tmp, parameters[2], boost::is_any_of(","));
   if(tmp.size() != this->levels_) {
     surf_parse_error("Fat trees are defined by the levels number and 3 vectors" 
-                     ", see the documentation for more informations"); 
+                     ", see the documentation for more information");
   }
   for(size_t i = 0 ; i < tmp.size() ; i++){
     this->upperLevelNodesNumber_.push_back(xbt_str_parse_int(tmp[i].c_str(), "Invalid upper level node number: %s"));
@@ -433,7 +433,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t cluster
   boost::split(tmp, parameters[3], boost::is_any_of(","));
   if(tmp.size() != this->levels_) {
     surf_parse_error("Fat trees are defined by the levels number and 3 vectors" 
-                     ", see the documentation for more informations"); 
+                     ", see the documentation for more information");
     
   }
   for(size_t i = 0 ; i < tmp.size() ; i++){
@@ -470,7 +470,7 @@ void AsClusterFatTree::generateDotFile(const std::string& filename) const {
 FatTreeNode::FatTreeNode(sg_platf_cluster_cbarg_t cluster, int id, int level,
                          int position) : id(id), level(level),
                                          position(position) {
-  s_sg_platf_link_cbarg_t linkTemplate = SG_PLATF_LINK_INITIALIZER;
+  s_sg_platf_link_cbarg_t linkTemplate;
   if(cluster->limiter_link) {
     memset(&linkTemplate, 0, sizeof(linkTemplate));
     linkTemplate.bandwidth = cluster->limiter_link;
@@ -498,13 +498,12 @@ FatTreeLink::FatTreeLink(sg_platf_cluster_cbarg_t cluster,
                          FatTreeNode *upNode) : upNode(upNode),
                                                 downNode(downNode) {
   static int uniqueId = 0;
-  s_sg_platf_link_cbarg_t linkTemplate = SG_PLATF_LINK_INITIALIZER;
+  s_sg_platf_link_cbarg_t linkTemplate;
   memset(&linkTemplate, 0, sizeof(linkTemplate));
   linkTemplate.bandwidth = cluster->bw;
   linkTemplate.latency = cluster->lat;
   linkTemplate.policy = cluster->sharing_policy; // sthg to do with that ?
-  linkTemplate.id = bprintf("link_from_%d_to_%d_%d", downNode->id, upNode->id,
-                            uniqueId);
+  linkTemplate.id = bprintf("link_from_%d_to_%d_%d", downNode->id, upNode->id, uniqueId);
   sg_platf_new_link(&linkTemplate);
   Link* link;
   std::string tmpID;