A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Actor: make the refcount observable, and improve debug messages
[simgrid.git]
/
src
/
smpi
/
internals
/
smpi_utils.cpp
diff --git
a/src/smpi/internals/smpi_utils.cpp
b/src/smpi/internals/smpi_utils.cpp
index
e646ff7
..
7e029ad
100644
(file)
--- a/
src/smpi/internals/smpi_utils.cpp
+++ b/
src/smpi/internals/smpi_utils.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2016-201
7
. The SimGrid Team.
+/* Copyright (c) 2016-201
9
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* 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 <boost/tokenizer.hpp>
#include "xbt/log.h"
#include "xbt/sysdep.h"
#include <boost/tokenizer.hpp>
+#include "src/surf/xml/platf_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_utils, smpi, "Logging specific to SMPI (utils)");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_utils, smpi, "Logging specific to SMPI (utils)");
-std::vector<s_smpi_factor_t> parse_factor(
std::string
smpi_coef_string)
+std::vector<s_smpi_factor_t> parse_factor(
const std::string&
smpi_coef_string)
{
std::vector<s_smpi_factor_t> smpi_factor;
{
std::vector<s_smpi_factor_t> smpi_factor;
@@
-42,14
+43,14
@@
std::vector<s_smpi_factor_t> parse_factor(std::string smpi_coef_string)
if (factor_iter == factor_values.begin()) { /* first element */
try {
fact.factor = std::stoi(*factor_iter);
if (factor_iter == factor_values.begin()) { /* first element */
try {
fact.factor = std::stoi(*factor_iter);
- } catch (
std::invalid_argument& ia
) {
+ } catch (
const std::invalid_argument&
) {
throw std::invalid_argument(std::string("Invalid factor in chunk ") + std::to_string(smpi_factor.size() + 1) +
": " + *factor_iter);
}
} else {
try {
throw std::invalid_argument(std::string("Invalid factor in chunk ") + std::to_string(smpi_factor.size() + 1) +
": " + *factor_iter);
}
} else {
try {
- fact.values.push_back(s
td::stod(*factor_iter
));
- } catch (
std::invalid_argument& ia
) {
+ fact.values.push_back(s
urf_parse_get_time((*factor_iter).c_str(), "smpi factor", ""
));
+ } catch (
const std::invalid_argument&
) {
throw std::invalid_argument(std::string("Invalid factor value ") + std::to_string(iteration) + " in chunk " +
std::to_string(smpi_factor.size() + 1) + ": " + *factor_iter);
}
throw std::invalid_argument(std::string("Invalid factor value ") + std::to_string(iteration) + " in chunk " +
std::to_string(smpi_factor.size() + 1) + ": " + *factor_iter);
}