1 /* Copyright (c) 2016-2022. The SimGrid Team. All rights reserved. */
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. */
6 #include "src/mc/explo/Exploration.hpp"
7 #include "src/mc/mc_config.hpp"
8 #include "src/mc/mc_private.hpp"
10 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_explo, mc, "Generic exploration algorithm of the model-checker");
12 namespace simgrid::mc {
14 Exploration::Exploration(const std::vector<char*>& args) : remote_app_(std::make_unique<RemoteApp>(args))
16 mc_model_checker->set_exploration(this);
19 void Exploration::log_state()
21 if (not _sg_mc_dot_output_file.get().empty()) {
22 mc_model_checker->dot_output("}\n");
23 mc_model_checker->dot_output_close();
25 if (getenv("SIMGRID_MC_SYSTEM_STATISTICS")) {
26 int ret = system("free");
28 XBT_WARN("Call to system(free) did not return 0, but %d", ret);
32 }; // namespace simgrid::mc