Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Create mc_config.hpp for MC's configuration stuff.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 18 Apr 2018 15:30:37 +0000 (17:30 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 18 Apr 2018 20:54:09 +0000 (22:54 +0200)
src/include/mc/mc.h
src/mc/RegionSnapshot.cpp
src/mc/compare.cpp
src/mc/mc_base.cpp
src/mc/mc_checkpoint.cpp
src/mc/mc_config.hpp [new file with mode: 0644]
src/mc/mc_record.hpp
src/mc/mc_snapshot.cpp
src/simgrid/sg_config.cpp
tools/cmake/DefinePackages.cmake

index 3119413..bdaa8a4 100644 (file)
 
 SG_BEGIN_DECL()
 
-/********************************** Configuration of MC **************************************/
-extern XBT_PUBLIC int _sg_do_model_check;
-extern XBT_PRIVATE int _sg_do_model_check_record;
-extern XBT_PRIVATE int _sg_mc_checkpoint;
-extern XBT_PUBLIC int _sg_mc_sparse_checkpoint;
-extern XBT_PUBLIC int _sg_mc_ksm;
-extern XBT_PRIVATE int _sg_mc_timeout;
-extern XBT_PRIVATE int _sg_mc_hash;
-extern XBT_PRIVATE int _sg_mc_max_depth;
-extern XBT_PUBLIC int _sg_mc_max_visited_states;
-extern XBT_PUBLIC int _sg_mc_comms_determinism;
-extern XBT_PUBLIC int _sg_mc_send_determinism;
-extern XBT_PRIVATE int _sg_mc_snapshot_fds;
-extern XBT_PRIVATE int _sg_mc_termination;
-
 /********************************* Global *************************************/
-XBT_PRIVATE void _mc_cfg_cb_reduce(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_checkpoint(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_sparse_checkpoint(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_ksm(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_property(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_timeout(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_snapshot_fds(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_hash(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_max_depth(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_visited(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_dot_output(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_comms_determinism(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_send_determinism(const char *name);
-XBT_PRIVATE void _mc_cfg_cb_termination(const char *name);
-
 XBT_PUBLIC void MC_run();
 XBT_PUBLIC void MC_process_clock_add(smx_actor_t, double);
 XBT_PUBLIC double MC_process_clock_get(smx_actor_t);
index eee6962..a659f9a 100644 (file)
@@ -12,6 +12,7 @@
 #endif
 
 #include "mc/mc.h"
+#include "src/mc/mc_config.hpp"
 #include "src/mc/mc_snapshot.hpp"
 
 #include "src/mc/ChunkedData.hpp"
index 652c652..efbd0ef 100644 (file)
@@ -32,6 +32,7 @@
 #include "src/mc/ObjectInformation.hpp"
 #include "src/mc/Type.hpp"
 #include "src/mc/Variable.hpp"
+#include "src/mc/mc_config.hpp"
 #include "src/mc/mc_dwarf.hpp"
 #include "src/mc/mc_forward.hpp"
 #include "src/mc/mc_private.hpp"
index 5433989..384283f 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "mc/mc.h"
 #include "src/mc/mc_base.h"
+#include "src/mc/mc_config.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/simix/smx_private.hpp"
 
index 017562d..018a0db 100644 (file)
@@ -32,6 +32,7 @@
 #include "src/mc/mc_private.hpp"
 #include <mc/mc.h>
 
+#include "src/mc/mc_config.hpp"
 #include "src/mc/mc_hash.hpp"
 #include "src/mc/mc_mmu.hpp"
 #include "src/mc/mc_smx.hpp"
diff --git a/src/mc/mc_config.hpp b/src/mc/mc_config.hpp
new file mode 100644 (file)
index 0000000..343c93a
--- /dev/null
@@ -0,0 +1,39 @@
+/* Copyright (c) 2018. 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. */
+
+#ifndef MC_CONFIG_HPP
+#define MC_CONFIG_HPP
+
+/********************************** Configuration of MC **************************************/
+extern "C" XBT_PUBLIC int _sg_do_model_check;
+extern XBT_PRIVATE int _sg_do_model_check_record;
+extern XBT_PRIVATE int _sg_mc_checkpoint;
+extern XBT_PUBLIC int _sg_mc_sparse_checkpoint;
+extern XBT_PUBLIC int _sg_mc_ksm;
+extern XBT_PRIVATE int _sg_mc_timeout;
+extern XBT_PRIVATE int _sg_mc_hash;
+extern XBT_PRIVATE int _sg_mc_max_depth;
+extern "C" XBT_PUBLIC int _sg_mc_max_visited_states;
+extern XBT_PUBLIC int _sg_mc_comms_determinism;
+extern XBT_PUBLIC int _sg_mc_send_determinism;
+extern XBT_PRIVATE int _sg_mc_snapshot_fds;
+extern XBT_PRIVATE int _sg_mc_termination;
+
+XBT_PRIVATE void _mc_cfg_cb_reduce(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_checkpoint(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_sparse_checkpoint(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_ksm(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_property(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_timeout(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_snapshot_fds(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_hash(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_max_depth(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_visited(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_dot_output(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_comms_determinism(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_send_determinism(const char* name);
+XBT_PRIVATE void _mc_cfg_cb_termination(const char* name);
+
+#endif
index 7cfea8f..34ecd20 100644 (file)
@@ -18,6 +18,7 @@
 #define SIMGRID_MC_RECORD_HPP
 
 #include "src/mc/Transition.hpp"
+#include "src/mc/mc_config.hpp"
 #include "xbt/base.h"
 
 #include <vector>
index 391fef8..27acf54 100644 (file)
@@ -182,6 +182,7 @@ const void* Snapshot::read_bytes(void* buffer, std::size_t size,
 
 #include <sys/mman.h>
 
+#include "src/mc/mc_config.hpp"
 #include "src/mc/mc_mmu.hpp"
 #include "src/mc/mc_private.hpp"
 #include "src/mc/mc_snapshot.hpp"
index 5f56a50..e5bd9af 100644 (file)
@@ -7,10 +7,10 @@
 
 #include "simgrid/sg_config.hpp"
 #include "instr/instr_interface.hpp"
-#include "mc/mc.h"
 #include "simgrid/instr.h"
 #include "src/internal_config.h"
 #include "src/kernel/lmm/maxmin.hpp"
+#include "src/mc/mc_config.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/surf/surf_interface.hpp"
 #include "surf/surf.hpp"
index 19a3eaa..43d0ae0 100644 (file)
@@ -576,6 +576,7 @@ set(MC_SRC_BASE
   src/mc/mc_replay.hpp
   src/mc/mc_record.cpp
   src/mc/mc_config.cpp
+  src/mc/mc_config.hpp
   src/mc/mc_global.cpp
   )