From 84b49f68eeec8692daf7ae6ed18d5c2bb7940ba2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Castelli?= Date: Wed, 23 Apr 2014 10:21:38 +0200 Subject: [PATCH 1/1] Should fix a build error happening on 32bits architectures, related to the size of an adress --- src/surf/surf_routing_cluster_fat_tree.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/surf/surf_routing_cluster_fat_tree.cpp b/src/surf/surf_routing_cluster_fat_tree.cpp index 3ceda714e3..01d40f035a 100644 --- a/src/surf/surf_routing_cluster_fat_tree.cpp +++ b/src/surf/surf_routing_cluster_fat_tree.cpp @@ -51,7 +51,7 @@ void AsClusterFatTree::create_links(sg_platf_cluster_cbarg_t cluster) { if(nodesRequired > this->nodes.size()) { surf_parse_error("There is not enough nodes to fit to the described topology." - " Please check your platform description (We need %d nodes, we only got %lu)", + " Please check your platform description (We need %d nodes, we only got %zu)", nodesRequired, this->nodes.size()); return; } @@ -92,7 +92,7 @@ void AsClusterFatTree::getLevelPosition(const unsigned int level, int *position } void AsClusterFatTree::addNodes(std::vector const& id) { - for (unsigned int i = 0 ; i < id.size() ; i++) { + for (size_t i = 0 ; i < id.size() ; i++) { this->nodes.push_back(new FatTreeNode(id[i])); } } @@ -146,7 +146,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t surf_parse_error("Fat trees are defined by the levels number and 3 vectors" ", see the documentation for more informations"); } - for(unsigned int i = 0 ; i < tmp.size() ; i++){ + for(size_t i = 0 ; i < tmp.size() ; i++){ this->lowerLevelNodesNumber.push_back(std::atoi(tmp[i].c_str())); } @@ -156,7 +156,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t surf_parse_error("Fat trees are defined by the levels number and 3 vectors" ", see the documentation for more informations"); } - for(unsigned int i = 0 ; i < tmp.size() ; i++){ + for(size_t i = 0 ; i < tmp.size() ; i++){ this->upperLevelNodesNumber.push_back(std::atoi(tmp[i].c_str())); } @@ -167,7 +167,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t ", see the documentation for more informations"); } - for(unsigned int i = 0 ; i < tmp.size() ; i++){ + for(size_t i = 0 ; i < tmp.size() ; i++){ this->lowerLevelPortsNumber.push_back(std::atoi(tmp[i].c_str())); } } -- 2.20.1