X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6badbbf58554a35b03f58509b0b18cf606c38f5e..948123777fd4d4ba34d203d29936888075ea04e1:/src/surf/surf_routing_cluster_fat_tree.cpp diff --git a/src/surf/surf_routing_cluster_fat_tree.cpp b/src/surf/surf_routing_cluster_fat_tree.cpp index 7667c22bfd..9ecbb8ad1f 100644 --- a/src/surf/surf_routing_cluster_fat_tree.cpp +++ b/src/surf/surf_routing_cluster_fat_tree.cpp @@ -6,7 +6,8 @@ #include #include -#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 @@ -430,7 +431,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t } // The first parts of topo_parameters should be the levels number - this->levels = std::atoi(parameters[0].c_str()); // stoi() only in C++11... + this->levels = xbt_str_parse_int(parameters[0].c_str(), "First parameter is not the amount of levels: %s"); // Then, a l-sized vector standing for the childs number by level boost::split(tmp, parameters[1], boost::is_any_of(",")); @@ -439,7 +440,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t ", see the documentation for more informations"); } for(size_t i = 0 ; i < tmp.size() ; i++){ - this->lowerLevelNodesNumber.push_back(std::atoi(tmp[i].c_str())); + this->lowerLevelNodesNumber.push_back(xbt_str_parse_int(tmp[i].c_str(), "Invalid lower level node number: %s")); } // Then, a l-sized vector standing for the parents number by level @@ -449,7 +450,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t ", see the documentation for more informations"); } for(size_t i = 0 ; i < tmp.size() ; i++){ - this->upperLevelNodesNumber.push_back(std::atoi(tmp[i].c_str())); + this->upperLevelNodesNumber.push_back(xbt_str_parse_int(tmp[i].c_str(), "Invalid upper level node number: %s")); } // Finally, a l-sized vector standing for the ports number with the lower level @@ -460,7 +461,7 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t } for(size_t i = 0 ; i < tmp.size() ; i++){ - this->lowerLevelPortsNumber.push_back(std::atoi(tmp[i].c_str())); + this->lowerLevelPortsNumber.push_back(xbt_str_parse_int(tmp[i].c_str(), "Invalid lower level node number: %s")); } this->cluster = cluster; }