Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'wifi_clean' into 'master'
[simgrid.git] / src / mc / explo / Exploration.cpp
1 /* Copyright (c) 2016-2022. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include "src/mc/explo/Exploration.hpp"
7 #include "src/mc/mc_config.hpp"
8 #include "src/mc/mc_private.hpp"
9
10 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_explo, mc, "Generic exploration algorithm of the model-checker");
11
12 namespace simgrid::mc {
13
14 Exploration::Exploration(const std::vector<char*>& args) : remote_app_(std::make_unique<RemoteApp>(args))
15 {
16   mc_model_checker->set_exploration(this);
17 }
18
19 void Exploration::log_state()
20 {
21   if (not _sg_mc_dot_output_file.get().empty()) {
22     mc_model_checker->dot_output("}\n");
23     mc_model_checker->dot_output_close();
24   }
25   if (getenv("SIMGRID_MC_SYSTEM_STATISTICS")) {
26     int ret = system("free");
27     if (ret != 0)
28       XBT_WARN("Call to system(free) did not return 0, but %d", ret);
29   }
30 }
31
32 }; // namespace simgrid::mc