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
Rename instr_interface.h and mc_ignore.h to .hpp.
[simgrid.git]
/
src
/
surf
/
surf_interface.cpp
diff --git
a/src/surf/surf_interface.cpp
b/src/surf/surf_interface.cpp
index
222720f
..
2ed96e5
100644
(file)
--- a/
src/surf/surf_interface.cpp
+++ b/
src/surf/surf_interface.cpp
@@
-4,19
+4,17
@@
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "surf_interface.hpp"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "surf_interface.hpp"
+#include "instr/instr_interface.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
#include "mc/mc.h"
#include "simgrid/s4u/Engine.hpp"
#include "mc/mc.h"
#include "simgrid/s4u/Engine.hpp"
-#include "simgrid/sg_config.h"
-#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
-#include "src/kernel/lmm/maxmin.hpp" // Constraint
-#include "src/kernel/routing/NetPoint.hpp"
+#include "simgrid/sg_config.hpp"
+#include "src/internal_config.h"
#include "src/surf/HostImpl.hpp"
#include "src/surf/HostImpl.hpp"
-#include "xbt/utility.hpp"
+#include "src/surf/xml/platf.hpp"
+#include "surf/surf.hpp"
#include <fstream>
#include <fstream>
-#include <set>
#include <string>
#include <string>
-#include <vector>
#ifdef _WIN32
#include <windows.h>
#ifdef _WIN32
#include <windows.h>
@@
-29,7
+27,7
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf, "Logging specific to SURF (ke
* Utils *
*********/
* Utils *
*********/
-std::vector<s
urf_model_t>
* all_existing_models = nullptr; /* to destroy models correctly */
+std::vector<s
imgrid::kernel::resource::Model*>
* all_existing_models = nullptr; /* to destroy models correctly */
simgrid::trace_mgr::future_evt_set *future_evt_set = nullptr;
std::vector<std::string> surf_path;
simgrid::trace_mgr::future_evt_set *future_evt_set = nullptr;
std::vector<std::string> surf_path;
@@
-128,12
+126,6
@@
double surf_get_clock()
return NOW;
}
return NOW;
}
-#ifdef _WIN32
-# define FILE_DELIM "\\"
-#else
-# define FILE_DELIM "/" /* FIXME: move to better location */
-#endif
-
std::ifstream* surf_ifsopen(std::string name)
{
std::ifstream* fs = new std::ifstream();
std::ifstream* surf_ifsopen(std::string name)
{
std::ifstream* fs = new std::ifstream();
@@
-144,7
+136,7
@@
std::ifstream* surf_ifsopen(std::string name)
/* search relative files in the path */
for (auto const& path_elm : surf_path) {
/* search relative files in the path */
for (auto const& path_elm : surf_path) {
- std::string buff = path_elm +
FILE_DELIM
+ name;
+ std::string buff = path_elm +
"/"
+ name;
fs->open(buff.c_str(), std::ifstream::in);
if (not fs->fail()) {
fs->open(buff.c_str(), std::ifstream::in);
if (not fs->fail()) {
@@
-167,7
+159,7
@@
FILE *surf_fopen(const char *name, const char *mode)
/* search relative files in the path */
for (auto const& path_elm : surf_path) {
/* search relative files in the path */
for (auto const& path_elm : surf_path) {
- std::string buff = path_elm +
FILE_DELIM
+ name;
+ std::string buff = path_elm +
"/"
+ name;
file = fopen(buff.c_str(), mode);
if (file)
file = fopen(buff.c_str(), mode);
if (file)
@@
-307,7
+299,7
@@
void surf_init(int *argc, char **argv)
xbt_init(argc, argv);
if (not all_existing_models)
xbt_init(argc, argv);
if (not all_existing_models)
- all_existing_models = new std::vector<simgrid::
surf
::Model*>();
+ all_existing_models = new std::vector<simgrid::
kernel::resource
::Model*>();
if (not future_evt_set)
future_evt_set = new simgrid::trace_mgr::future_evt_set();
if (not future_evt_set)
future_evt_set = new simgrid::trace_mgr::future_evt_set();
@@
-329,9
+321,6
@@
void surf_exit()
delete stype->model_properties;
delete stype;
}
delete stype->model_properties;
delete stype;
}
- for (auto const& s : *simgrid::surf::StorageImpl::storagesMap())
- delete s.second;
- delete simgrid::surf::StorageImpl::storagesMap();
for (auto const& model : *all_existing_models)
delete model;
for (auto const& model : *all_existing_models)
delete model;