Commit a45a65d7 authored by Augustin Degomme's avatar Augustin Degomme

help mc initialize smpi options.

parent 34bfa2df
......@@ -6,6 +6,7 @@
#include "src/mc/Session.hpp"
#include "src/mc/checker/Checker.hpp"
#include "src/mc/mc_config.hpp"
#include "src/smpi/include/smpi_config.hpp"
#include "src/mc/mc_private.hpp"
#include "src/mc/mc_state.hpp"
#include "xbt/log.h"
......@@ -52,6 +53,7 @@ static void setup_child_environment(int socket)
Session::Session(const std::function<void()>& code)
{
#if HAVE_SMPI
smpi_init_options();//only performed once
xbt_assert(smpi_cfg_privatization() != SmpiPrivStrategies::MMAP,
"Please use the dlopen privatization schema when model-checking SMPI code");
#endif
......
......@@ -5,6 +5,7 @@
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/sg_config.hpp"
#include "src/smpi/include/smpi_config.hpp"
#include "src/mc/Session.hpp"
#include "src/mc/checker/Checker.hpp"
#include "src/mc/mc_config.hpp"
......@@ -46,8 +47,8 @@ int main(int argc, char** argv)
// value to the model-checked:
char** argv_copy = argvdup(argc, argv);
xbt_log_init(&argc, argv);
smpi_init_options();//only performed once
sg_config_init(&argc, argv);
simgrid::mc::session = new simgrid::mc::Session([argv_copy] { execvp(argv_copy[1], argv_copy + 1); });
delete[] argv_copy;
......
......@@ -96,8 +96,6 @@ XBT_PRIVATE void smpi_mpi_init();
enum class SharedMallocType { NONE, LOCAL, GLOBAL };
enum class SmpiPrivStrategies { NONE = 0, MMAP = 1, DLOPEN = 2, DEFAULT = DLOPEN };
XBT_PRIVATE void smpi_init_options();
XBT_PRIVATE void smpi_check_options();
XBT_PRIVATE double smpi_cfg_host_speed();
XBT_PRIVATE bool smpi_cfg_simulate_computation();
XBT_PRIVATE SharedMallocType smpi_cfg_shared_malloc();
......
......@@ -7,7 +7,8 @@
#define SMPI_CONFIG_HPP
#include <xbt/config.hpp>
XBT_PUBLIC void smpi_init_options();
XBT_PRIVATE void smpi_check_options();
/********************************** Configuration of SMPI **************************************/
extern XBT_PRIVATE simgrid::config::Flag<double> _smpi_cfg_host_speed;
extern XBT_PRIVATE simgrid::config::Flag<bool> _smpi_cfg_simulate_computation;
......
......@@ -6,6 +6,7 @@
#include "include/xbt/config.hpp"
#include "private.hpp"
#include "smpi_coll.hpp"
#include "smpi_config.hpp"
#include "src/simix/smx_private.hpp"
#include <cfloat> /* DBL_MAX */
#include <boost/algorithm/string.hpp> /* trim */
......
......@@ -9,6 +9,7 @@
#include "smpi_coll.hpp"
#include "smpi_f2c.hpp"
#include "smpi_host.hpp"
#include "smpi_config.hpp"
#include "src/kernel/activity/CommImpl.hpp"
#include "src/simix/smx_private.hpp"
#include "src/smpi/include/smpi_actor.hpp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment