X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/82230d737404aa70c3c2b5824d97109f1f129d58..e44f9774238ec0236589e28a4f4dc35706aab511:/src/smpi/internals/smpi_utils.cpp diff --git a/src/smpi/internals/smpi_utils.cpp b/src/smpi/internals/smpi_utils.cpp index e646ff7ef1..931d3ecba0 100644 --- a/src/smpi/internals/smpi_utils.cpp +++ b/src/smpi/internals/smpi_utils.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2016-2017. The SimGrid Team. +/* Copyright (c) 2016-2019. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -8,10 +8,11 @@ #include "xbt/log.h" #include "xbt/sysdep.h" #include +#include "src/surf/xml/platf_private.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_utils, smpi, "Logging specific to SMPI (utils)"); -std::vector parse_factor(std::string smpi_coef_string) +std::vector parse_factor(const std::string& smpi_coef_string) { std::vector smpi_factor; @@ -48,7 +49,7 @@ std::vector parse_factor(std::string smpi_coef_string) } } else { try { - fact.values.push_back(std::stod(*factor_iter)); + fact.values.push_back(surf_parse_get_time((*factor_iter).c_str(), "smpi factor", std::to_string(smpi_factor.size() + 1) + ": " + *factor_iter)); } catch (std::invalid_argument& ia) { throw std::invalid_argument(std::string("Invalid factor value ") + std::to_string(iteration) + " in chunk " + std::to_string(smpi_factor.size() + 1) + ": " + *factor_iter);