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
dict --
[simgrid.git]
/
src
/
surf
/
trace_mgr.cpp
diff --git
a/src/surf/trace_mgr.cpp
b/src/surf/trace_mgr.cpp
index
a67c7d4
..
f100e2e
100644
(file)
--- a/
src/surf/trace_mgr.cpp
+++ b/
src/surf/trace_mgr.cpp
@@
-1,11
+1,10
@@
-/* Copyright (c) 2004-2005, 2007, 2009-2014. The SimGrid Team.
+/* Copyright (c) 2004-2005, 2007, 2009-2014
, 2016-2017
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/sysdep.h"
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/sysdep.h"
-#include "xbt/dict.h"
#include "xbt/log.h"
#include "xbt/str.h"
#include "xbt/log.h"
#include "xbt/str.h"
@@
-16,8
+15,8
@@
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/split.hpp>
+#include <cmath>
#include <fstream>
#include <fstream>
-#include <math.h>
#include <sstream>
#include <unordered_map>
#include <sstream>
#include <unordered_map>
@@
-77,7
+76,7
@@
tmgr_trace_t tmgr_trace_new_from_string(const char* name, std::string input, dou
continue;
if (sscanf(val.c_str(), "PERIODICITY %lg\n", &periodicity) == 1)
continue;
continue;
if (sscanf(val.c_str(), "PERIODICITY %lg\n", &periodicity) == 1)
continue;
- if (sscanf(val.c_str(), "
WAITFO
R %lg\n", &periodicity) == 1)
+ if (sscanf(val.c_str(), "
LOOPAFTE
R %lg\n", &periodicity) == 1)
continue;
xbt_assert(sscanf(val.c_str(), "%lg %lg\n", &event.date_, &event.value_) == 2, "%s:%d: Syntax error in trace\n%s",
continue;
xbt_assert(sscanf(val.c_str(), "%lg %lg\n", &event.date_, &event.value_) == 2, "%s:%d: Syntax error in trace\n%s",
@@
-110,7
+109,7
@@
tmgr_trace_t tmgr_trace_new_from_file(const char *filename)
xbt_assert(trace_list.find(filename) == trace_list.end(), "Refusing to define trace %s twice", filename);
std::ifstream* f = surf_ifsopen(filename);
xbt_assert(trace_list.find(filename) == trace_list.end(), "Refusing to define trace %s twice", filename);
std::ifstream* f = surf_ifsopen(filename);
- xbt_assert(
!
f->fail(), "Cannot open file '%s' (path=%s)", filename, (boost::join(surf_path, ":")).c_str());
+ xbt_assert(
not
f->fail(), "Cannot open file '%s' (path=%s)", filename, (boost::join(surf_path, ":")).c_str());
std::stringstream buffer;
buffer << f->rdbuf();
std::stringstream buffer;
buffer << f->rdbuf();
@@
-182,6
+181,7
@@
void tmgr_finalize()
xbt_free((char*)kv.first);
delete kv.second;
}
xbt_free((char*)kv.first);
delete kv.second;
}
+ trace_list.clear();
}
void tmgr_trace_event_unref(tmgr_trace_event_t* trace_event)
}
void tmgr_trace_event_unref(tmgr_trace_event_t* trace_event)