Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
prefix all macro defined in public simgrid_config.h with 'SIMGRID_'
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 5 May 2017 10:07:59 +0000 (12:07 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 5 May 2017 10:08:15 +0000 (12:08 +0200)
(fix #162)

41 files changed:
examples/simdag/scheduling/sd_scheduling.c
include/simgrid/jedule/jedule.hpp
include/simgrid/jedule/jedule_events.hpp
include/simgrid/jedule/jedule_platform.hpp
include/simgrid/jedule/jedule_sd_binding.h
include/simgrid/modelchecker.h
include/smpi/mpi.h
include/xbt/string.hpp
src/include/mc/mc.h
src/instr/jedule/jedule.cpp
src/instr/jedule/jedule_events.cpp
src/instr/jedule/jedule_platform.cpp
src/instr/jedule/jedule_sd_binding.cpp
src/kernel/activity/SynchroComm.hpp
src/kernel/context/Context.cpp
src/kernel/context/ContextUnix.cpp
src/mc/mc_base.cpp
src/mc/mc_config.cpp
src/mc/mc_global.cpp
src/mc/mc_record.cpp
src/mc/remote/Client.hpp
src/msg/msg_environment.cpp
src/simdag/sd_global.cpp
src/simdag/sd_task.cpp
src/simdag/simdag_private.hpp
src/simgrid/sg_config.cpp
src/simix/popping.cpp
src/simix/popping_generated.cpp
src/simix/smx_context.cpp
src/simix/smx_global.cpp
src/simix/smx_network.cpp
src/simix/smx_private.h
src/smpi/smpi_datatype.cpp
src/surf/surf_interface.cpp
src/surf/xml/surfxml_parseplatf.cpp
src/xbt/backtrace_linux.cpp
src/xbt/log.c
src/xbt/mallocator.c
src/xbt/mmalloc/mm_legacy.c
src/xbt/string.cpp
src/xbt/xbt_main.cpp

index 0dcf287..a949e73 100644 (file)
@@ -8,7 +8,7 @@
 #include <string.h>
 #include "simgrid/simdag.h"
 
 #include <string.h>
 #include "simgrid/simdag.h"
 
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
 #include "simgrid/jedule/jedule_sd_binding.h"
 #endif
 
 #include "simgrid/jedule/jedule_sd_binding.h"
 #endif
 
@@ -231,7 +231,7 @@ int main(int argc, char **argv)
   XBT_INFO("Simulation Time: %f", SD_get_clock());
   XBT_INFO("------------------- Produce the trace file---------------------------");
   XBT_INFO("Producing a jedule output (if active) of the run into %s", tracefilename?tracefilename:"minmin_test.jed");
   XBT_INFO("Simulation Time: %f", SD_get_clock());
   XBT_INFO("------------------- Produce the trace file---------------------------");
   XBT_INFO("Producing a jedule output (if active) of the run into %s", tracefilename?tracefilename:"minmin_test.jed");
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
   jedule_sd_dump(tracefilename);
 #endif
   free(tracefilename);
   jedule_sd_dump(tracefilename);
 #endif
   free(tracefilename);
index 8d7fd7b..43387f2 100644 (file)
@@ -12,7 +12,7 @@
 #include "jedule_events.hpp"
 #include "jedule_platform.hpp"
 
 #include "jedule_events.hpp"
 #include "jedule_platform.hpp"
 
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
 
 XBT_ATTRIB_UNUSED static std::unordered_map <const char *, jed_container_t> host2_simgrid_parent_container;
 XBT_ATTRIB_UNUSED static std::unordered_map <std::string, jed_container_t> container_name2container;
 
 XBT_ATTRIB_UNUSED static std::unordered_map <const char *, jed_container_t> host2_simgrid_parent_container;
 XBT_ATTRIB_UNUSED static std::unordered_map <std::string, jed_container_t> container_name2container;
index 0cf00db..aa16099 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "jedule_platform.hpp"
 
 
 #include "jedule_platform.hpp"
 
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
 namespace simgrid {
 namespace jedule{
 
 namespace simgrid {
 namespace jedule{
 
index 195ca91..caaf672 100644 (file)
@@ -13,7 +13,7 @@
 #include <unordered_map>
 #include <vector>
 #include <string>
 #include <unordered_map>
 #include <vector>
 #include <string>
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
 
 namespace simgrid {
 namespace jedule{
 
 namespace simgrid {
 namespace jedule{
index 9a494b7..909ad6c 100644 (file)
@@ -10,7 +10,7 @@
 #include "simgrid_config.h"
 #include "simgrid/simdag.h"
 
 #include "simgrid_config.h"
 #include "simgrid/simdag.h"
 
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
 SG_BEGIN_DECL()
 XBT_PUBLIC(void) jedule_log_sd_event(SD_task_t task);
 XBT_PUBLIC(void) jedule_sd_init(void);
 SG_BEGIN_DECL()
 XBT_PUBLIC(void) jedule_log_sd_event(SD_task_t task);
 XBT_PUBLIC(void) jedule_sd_init(void);
index a097953..9a198ec 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <stdbool.h>
 
 
 #include <stdbool.h>
 
-#include <simgrid_config.h> /* HAVE_MC ? */
+#include <simgrid_config.h> /* SIMGRID_HAVE_MC ? */
 
 #include <xbt/base.h>
 
 
 #include <xbt/base.h>
 
@@ -25,7 +25,7 @@ SG_BEGIN_DECL()
 
 XBT_PUBLIC(int) MC_random(int min, int max);
 
 
 XBT_PUBLIC(int) MC_random(int min, int max);
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 
 /* Internal variable used to check if we're running under the MC
  *
 
 /* Internal variable used to check if we're running under the MC
  *
index 5021574..671d22e 100644 (file)
@@ -24,7 +24,7 @@
 #define nanosleep(x, y) smpi_nanosleep(x, y)
 #define clock_gettime(x, y) smpi_clock_gettime(x, y)
 #endif
 #define nanosleep(x, y) smpi_nanosleep(x, y)
 #define clock_gettime(x, y) smpi_clock_gettime(x, y)
 #endif
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 #undef assert
 #define assert(x) MC_assert(x)
 #endif
 #undef assert
 #define assert(x) MC_assert(x)
 #endif
index 0c9221a..b163867 100644 (file)
@@ -13,7 +13,7 @@
 #include <cstdarg>
 #include <stdlib.h>
 
 #include <cstdarg>
 #include <stdlib.h>
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 
 #include <stdexcept>
 #include <cstddef>
 
 #include <stdexcept>
 #include <cstddef>
@@ -28,7 +28,7 @@
 namespace simgrid {
 namespace xbt {
 
 namespace simgrid {
 namespace xbt {
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 
 /** POD structure representation of a string
  */
 
 /** POD structure representation of a string
  */
index 8ca9c1a..aadf44d 100644 (file)
@@ -6,9 +6,9 @@
 #ifndef MC_MC_H
 #define MC_MC_H
 
 #ifndef MC_MC_H
 #define MC_MC_H
 
-#include <src/internal_config.h>
+#include <simgrid/modelchecker.h> /* our public interface (and definition of SIMGRID_HAVE_MC) */
 #include <simgrid/simix.h>
 #include <simgrid/simix.h>
-#include <simgrid/modelchecker.h> /* our public interface (and definition of HAVE_MC) */
+#include <src/internal_config.h>
 #if HAVE_UCONTEXT_H
 #include <ucontext.h>           /* context relative declarations */
 #endif
 #if HAVE_UCONTEXT_H
 #include <ucontext.h>           /* context relative declarations */
 #endif
index ed3d6e5..86dbae5 100644 (file)
@@ -7,7 +7,7 @@
 #include "xbt/asserts.h"
 #include "simgrid/jedule/jedule.hpp"
 
 #include "xbt/asserts.h"
 #include "simgrid/jedule/jedule.hpp"
 
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
 
 namespace simgrid{
 namespace jedule {
 
 namespace simgrid{
 namespace jedule {
index 1b43029..b4d4810 100644 (file)
@@ -11,7 +11,7 @@
 #include "simgrid/s4u/NetZone.hpp"
 #include "xbt/asserts.h"
 
 #include "simgrid/s4u/NetZone.hpp"
 #include "xbt/asserts.h"
 
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
 namespace simgrid{
 namespace jedule{
 
 namespace simgrid{
 namespace jedule{
 
index acc3e9b..29f8229 100644 (file)
@@ -11,7 +11,7 @@
 #include "xbt/dynar.h"
 #include <algorithm>
 
 #include "xbt/dynar.h"
 #include <algorithm>
 
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
 
 namespace simgrid {
 namespace jedule {
 
 namespace simgrid {
 namespace jedule {
index 782bb6e..24c66fd 100644 (file)
@@ -11,7 +11,7 @@
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/NetZone.hpp"
 
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/NetZone.hpp"
 
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
 
 XBT_LOG_NEW_CATEGORY(jedule, "Logging specific to Jedule");
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(jed_sd, jedule, "Logging specific to Jedule SD binding");
 
 XBT_LOG_NEW_CATEGORY(jedule, "Logging specific to Jedule");
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(jed_sd, jedule, "Logging specific to Jedule SD binding");
index 7a56db9..b114b25 100644 (file)
@@ -34,7 +34,7 @@ namespace activity {
     e_smx_comm_type_t type;         /* Type of the communication (SIMIX_COMM_SEND or SIMIX_COMM_RECEIVE) */
     smx_mailbox_t mbox = nullptr;   /* Rendez-vous where the comm is queued */
 
     e_smx_comm_type_t type;         /* Type of the communication (SIMIX_COMM_SEND or SIMIX_COMM_RECEIVE) */
     smx_mailbox_t mbox = nullptr;   /* Rendez-vous where the comm is queued */
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
     smx_mailbox_t mbox_cpy = nullptr; /* Copy of the rendez-vous where the comm is queued, MC needs it for DPOR
                                        (comm.mbox set to nullptr when the communication is removed from the mailbox
                                        (used as garbage collector)) */
     smx_mailbox_t mbox_cpy = nullptr; /* Copy of the rendez-vous where the comm is queued, MC needs it for DPOR
                                        (comm.mbox set to nullptr when the communication is removed from the mailbox
                                        (used as garbage collector)) */
index 2288faa..292ff2e 100644 (file)
@@ -47,7 +47,7 @@ Context* ContextFactory::self()
 
 void ContextFactory::declare_context(void* context, std::size_t size)
 {
 
 void ContextFactory::declare_context(void* context, std::size_t size)
 {
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   /* Store the address of the stack in heap to compare it apart of heap comparison */
   if(MC_is_active())
     MC_ignore_heap(context, size);
   /* Store the address of the stack in heap to compare it apart of heap comparison */
   if(MC_is_active())
     MC_ignore_heap(context, size);
index 8c51f67..f2f99a6 100644 (file)
@@ -218,7 +218,7 @@ UContext::UContext(std::function<void()> code,
       sysv_maestro_context = this;
   }
 
       sysv_maestro_context = this;
   }
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   if (MC_is_active() && has_code()) {
     MC_register_stack_area(this->stack_, process,
                       &(this->uc_), smx_context_usable_stack_size);
   if (MC_is_active() && has_code()) {
     MC_register_stack_area(this->stack_, process,
                       &(this->uc_), smx_context_usable_stack_size);
index edcf150..00fd66c 100644 (file)
@@ -26,7 +26,7 @@
 #include "src/kernel/activity/SynchroSleep.hpp"
 #include "src/kernel/activity/SynchroExec.hpp"
 
 #include "src/kernel/activity/SynchroSleep.hpp"
 #include "src/kernel/activity/SynchroExec.hpp"
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 #include "src/mc/mc_request.h"
 #include "src/mc/Process.hpp"
 #include "src/mc/ModelChecker.hpp"
 #include "src/mc/mc_request.h"
 #include "src/mc/Process.hpp"
 #include "src/mc/ModelChecker.hpp"
@@ -39,7 +39,7 @@ XBT_LOG_NEW_CATEGORY(mc, "All MC categories");
 
 int MC_random(int min, int max)
 {
 
 int MC_random(int min, int max)
 {
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   xbt_assert(mc_model_checker == nullptr);
   /* TODO, if the MC is disabled we do not really need to make a simcall for
    * this :) */
   xbt_assert(mc_model_checker == nullptr);
   /* TODO, if the MC is disabled we do not really need to make a simcall for
    * this :) */
@@ -52,7 +52,7 @@ namespace mc {
 
 void wait_for_requests(void)
 {
 
 void wait_for_requests(void)
 {
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   xbt_assert(mc_model_checker == nullptr);
 #endif
 
   xbt_assert(mc_model_checker == nullptr);
 #endif
 
@@ -68,7 +68,7 @@ void wait_for_requests(void)
         SIMIX_simcall_handle(req, 0);
     }
   }
         SIMIX_simcall_handle(req, 0);
     }
   }
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   xbt_dynar_reset(simix_global->actors_vector);
   for (std::pair<aid_t, smx_actor_t> kv : simix_global->process_list) {
     xbt_dynar_push_as(simix_global->actors_vector, smx_actor_t, kv.second);
   xbt_dynar_reset(simix_global->actors_vector);
   for (std::pair<aid_t, smx_actor_t> kv : simix_global->process_list) {
     xbt_dynar_push_as(simix_global->actors_vector, smx_actor_t, kv.second);
@@ -107,7 +107,7 @@ bool request_is_enabled(smx_simcall_t req)
     simgrid::kernel::activity::Comm *act =
         static_cast<simgrid::kernel::activity::Comm*>(simcall_comm_wait__get__comm(req));
 
     simgrid::kernel::activity::Comm *act =
         static_cast<simgrid::kernel::activity::Comm*>(simcall_comm_wait__get__comm(req));
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
     // Fetch from MCed memory:
     // HACK, type puning
     if (mc_model_checker != nullptr) {
     // Fetch from MCed memory:
     // HACK, type puning
     if (mc_model_checker != nullptr) {
@@ -135,7 +135,7 @@ bool request_is_enabled(smx_simcall_t req)
     simgrid::kernel::activity::Comm *act =
         static_cast<simgrid::kernel::activity::Comm*>(simcall_comm_wait__get__comm(req));
 
     simgrid::kernel::activity::Comm *act =
         static_cast<simgrid::kernel::activity::Comm*>(simcall_comm_wait__get__comm(req));
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
     s_xbt_dynar_t comms_buffer;
     size_t buffer_size = 0;
     if (mc_model_checker != nullptr) {
     s_xbt_dynar_t comms_buffer;
     size_t buffer_size = 0;
     if (mc_model_checker != nullptr) {
@@ -158,7 +158,7 @@ bool request_is_enabled(smx_simcall_t req)
 #endif
 
     for (index = 0; index < comms->used; ++index) {
 #endif
 
     for (index = 0; index < comms->used; ++index) {
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
       // Fetch act from MCed memory:
       // HACK, type puning
       simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
       // Fetch act from MCed memory:
       // HACK, type puning
       simgrid::mc::Remote<simgrid::kernel::activity::Comm> temp_comm;
@@ -178,7 +178,7 @@ bool request_is_enabled(smx_simcall_t req)
 
   case SIMCALL_MUTEX_LOCK: {
     smx_mutex_t mutex = simcall_mutex_lock__get__mutex(req);
 
   case SIMCALL_MUTEX_LOCK: {
     smx_mutex_t mutex = simcall_mutex_lock__get__mutex(req);
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
     simgrid::mc::Remote<simgrid::simix::Mutex> temp_mutex;
     if (mc_model_checker != nullptr) {
       mc_model_checker->process().read(temp_mutex.getBuffer(), remote(mutex));
     simgrid::mc::Remote<simgrid::simix::Mutex> temp_mutex;
     if (mc_model_checker != nullptr) {
       mc_model_checker->process().read(temp_mutex.getBuffer(), remote(mutex));
@@ -188,7 +188,7 @@ bool request_is_enabled(smx_simcall_t req)
 
     if(mutex->owner == nullptr)
       return true;
 
     if(mutex->owner == nullptr)
       return true;
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
     else if (mc_model_checker != nullptr) {
       simgrid::mc::Process& modelchecked = mc_model_checker->process();
       // TODO, *(mutex->owner) :/
     else if (mc_model_checker != nullptr) {
       simgrid::mc::Process& modelchecked = mc_model_checker->process();
       // TODO, *(mutex->owner) :/
index 67bebd4..621f502 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <simgrid/sg_config.h>
 
 
 #include <simgrid/sg_config.h>
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 #include "src/mc/mc_safety.h"
 #include "src/mc/mc_private.h"
 #endif
 #include "src/mc/mc_safety.h"
 #include "src/mc/mc_private.h"
 #endif
@@ -23,7 +23,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_config, mc,
                                 "Configuration of MC");
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_config, mc,
                                 "Configuration of MC");
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 namespace simgrid {
 namespace mc {
 /* Configuration support */
 namespace simgrid {
 namespace mc {
 /* Configuration support */
@@ -32,7 +32,7 @@ simgrid::mc::ReductionMode reduction_mode = simgrid::mc::ReductionMode::unset;
 }
 #endif
 
 }
 #endif
 
-#if !HAVE_MC
+#if !SIMGRID_HAVE_MC
 #define _sg_do_model_check 0
 #endif
 
 #define _sg_do_model_check 0
 #endif
 
@@ -46,7 +46,7 @@ void _mc_cfg_cb_timeout(const char *name)
   _sg_mc_timeout = xbt_cfg_get_boolean(name);
 }
 
   _sg_mc_timeout = xbt_cfg_get_boolean(name);
 }
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 int _sg_do_model_check = 0;
 int _sg_do_model_check_record = 0;
 int _sg_mc_checkpoint = 0;
 int _sg_do_model_check = 0;
 int _sg_do_model_check_record = 0;
 int _sg_mc_checkpoint = 0;
index 1d4dd5f..3d596ab 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "src/simix/ActorImpl.hpp"
 
 
 #include "src/simix/ActorImpl.hpp"
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 #include <libunwind.h>
 #include "src/mc/mc_comm_pattern.h"
 #include "src/mc/mc_request.h"
 #include <libunwind.h>
 #include "src/mc/mc_comm_pattern.h"
 #include "src/mc/mc_request.h"
@@ -55,7 +55,7 @@ std::vector<double> processes_time;
 }
 }
 
 }
 }
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 
 /* Liveness */
 
 
 /* Liveness */
 
index d2c382c..2881f48 100644 (file)
@@ -26,7 +26,7 @@
 #include "src/mc/mc_base.h"
 #include "src/mc/Transition.hpp"
 
 #include "src/mc/mc_base.h"
 #include "src/mc/Transition.hpp"
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 #include "src/mc/mc_request.h"
 #include "src/mc/mc_private.h"
 #include "src/mc/mc_state.h"
 #include "src/mc/mc_request.h"
 #include "src/mc/mc_private.h"
 #include "src/mc/mc_state.h"
@@ -103,7 +103,7 @@ RecordTrace parseRecordTrace(const char* data)
   return res;
 }
 
   return res;
 }
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 
 std::string traceToString(simgrid::mc::RecordTrace const& trace)
 {
 
 std::string traceToString(simgrid::mc::RecordTrace const& trace)
 {
index ead07fe..7974601 100644 (file)
@@ -58,7 +58,7 @@ public:
 
 SG_BEGIN_DECL()
 
 
 SG_BEGIN_DECL()
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 void MC_ignore(void* addr, std::size_t size);
 #endif
 
 void MC_ignore(void* addr, std::size_t size);
 #endif
 
index e50abe0..a52541b 100644 (file)
@@ -7,7 +7,7 @@
 #include "simgrid/s4u/NetZone.hpp"
 #include "src/msg/msg_private.h"
 
 #include "simgrid/s4u/NetZone.hpp"
 #include "src/msg/msg_private.h"
 
-#if HAVE_LUA
+#if SIMGRID_HAVE_LUA
 #include <lua.h>
 #include <lauxlib.h>
 #include <lualib.h>
 #include <lua.h>
 #include <lauxlib.h>
 #include <lualib.h>
index 0248689..cb9f44a 100644 (file)
@@ -201,7 +201,7 @@ void SD_create_environment(const char *platform_file)
   simgrid::s4u::Engine::instance()->loadPlatform(platform_file);
 
   XBT_DEBUG("Host number: %zu, link number: %d", sg_host_count(), sg_link_count());
   simgrid::s4u::Engine::instance()->loadPlatform(platform_file);
 
   XBT_DEBUG("Host number: %zu, link number: %d", sg_host_count(), sg_link_count());
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
   jedule_sd_init();
 #endif
   XBT_VERB("Starting simulation...");
   jedule_sd_init();
 #endif
   XBT_VERB("Starting simulation...");
@@ -247,7 +247,7 @@ double SD_get_clock() {
 void SD_exit()
 {
   TRACE_end();
 void SD_exit()
 {
   TRACE_end();
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
   jedule_sd_exit();
 #endif
   delete sd_global;
   jedule_sd_exit();
 #endif
   delete sd_global;
index 3cf0a0e..e6ee5cf 100644 (file)
@@ -289,7 +289,7 @@ void SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state)
     task->start_time = task->surf_action->getStartTime();
     if (new_state == SD_DONE){
       task->finish_time = task->surf_action->getFinishTime();
     task->start_time = task->surf_action->getStartTime();
     if (new_state == SD_DONE){
       task->finish_time = task->surf_action->getFinishTime();
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
       jedule_log_sd_event(task);
 #endif
     } else
       jedule_log_sd_event(task);
 #endif
     } else
index 9cd87ba..58d88e7 100644 (file)
@@ -12,7 +12,7 @@
 
 #ifndef SIMDAG_PRIVATE_HPP
 #define SIMDAG_PRIVATE_HPP
 
 #ifndef SIMDAG_PRIVATE_HPP
 #define SIMDAG_PRIVATE_HPP
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
 #include "simgrid/jedule/jedule_sd_binding.h"
 #endif
 
 #include "simgrid/jedule/jedule_sd_binding.h"
 #endif
 
index 9b99689..f1434ef 100644 (file)
@@ -208,7 +208,7 @@ static void _sg_cfg_cb_model_check_replay(const char *name) {
     MC_record_path = nullptr;
 }
 
     MC_record_path = nullptr;
 }
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 extern int _sg_do_model_check_record;
 static void _sg_cfg_cb_model_check_record(const char *name) {
   _sg_do_model_check_record = xbt_cfg_get_boolean(name);
 extern int _sg_do_model_check_record;
 static void _sg_cfg_cb_model_check_record(const char *name) {
   _sg_do_model_check_record = xbt_cfg_get_boolean(name);
@@ -375,7 +375,7 @@ void sg_config_init(int *argc, char **argv)
     xbt_cfg_register_string("model-check/replay", nullptr, _sg_cfg_cb_model_check_replay,
         "Model-check path to replay (as reported by SimGrid when a violation is reported)");
 
     xbt_cfg_register_string("model-check/replay", nullptr, _sg_cfg_cb_model_check_replay,
         "Model-check path to replay (as reported by SimGrid when a violation is reported)");
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
     /* do model-checking-record */
     xbt_cfg_register_boolean("model-check/record", "no", _sg_cfg_cb_model_check_record, "Record the model-checking paths");
 
     /* do model-checking-record */
     xbt_cfg_register_boolean("model-check/record", "no", _sg_cfg_cb_model_check_record, "Record the model-checking paths");
 
index 1314c04..c488326 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "smx_private.h"
 #include "xbt/xbt_os_thread.h"
 
 #include "smx_private.h"
 #include "xbt/xbt_os_thread.h"
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 #include "src/mc/mc_private.h"
 #endif
 
 #include "src/mc/mc_private.h"
 #endif
 
index 9e47729..968e7bc 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <xbt/base.h>
 #include "smx_private.h"
 
 #include <xbt/base.h>
 #include "smx_private.h"
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 #include "src/mc/mc_forward.hpp"
 #endif
 
 #include "src/mc/mc_forward.hpp"
 #endif
 
index 90a7d13..712ab9c 100644 (file)
@@ -182,8 +182,8 @@ void *SIMIX_context_stack_new()
 #endif
 
     size_t size = smx_context_stack_size + smx_context_guard_size;
 #endif
 
     size_t size = smx_context_stack_size + smx_context_guard_size;
-#if HAVE_MC
-    /* Cannot use posix_memalign when HAVE_MC. Align stack by hand, and save the
+#if SIMGRID_HAVE_MC
+    /* Cannot use posix_memalign when SIMGRID_HAVE_MC. Align stack by hand, and save the
      * pointer returned by xbt_malloc0. */
     char *alloc = (char*)xbt_malloc0(size + xbt_pagesize);
     stack = alloc - ((uintptr_t)alloc & (xbt_pagesize - 1)) + xbt_pagesize;
      * pointer returned by xbt_malloc0. */
     char *alloc = (char*)xbt_malloc0(size + xbt_pagesize);
     stack = alloc - ((uintptr_t)alloc & (xbt_pagesize - 1)) + xbt_pagesize;
@@ -237,7 +237,7 @@ void SIMIX_context_stack_delete(void *stack)
       XBT_WARN("Failed to remove page protection: %s", strerror(errno));
       /* try to pursue anyway */
     }
       XBT_WARN("Failed to remove page protection: %s", strerror(errno));
       /* try to pursue anyway */
     }
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
     /* Retrieve the saved pointer.  See SIMIX_context_stack_new above. */
     stack = *((void **)stack - 1);
 #endif
     /* Retrieve the saved pointer.  See SIMIX_context_stack_new above. */
     stack = *((void **)stack - 1);
 #endif
index 09313d8..c875ed3 100644 (file)
@@ -30,7 +30,7 @@
 #include "src/kernel/activity/SynchroIo.hpp"
 #include "src/kernel/activity/SynchroRaw.hpp"
 
 #include "src/kernel/activity/SynchroIo.hpp"
 #include "src/kernel/activity/SynchroRaw.hpp"
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 #include "src/mc/mc_private.h"
 #include "src/mc/remote/Client.hpp"
 #include "src/mc/remote/mc_protocol.h"
 #include "src/mc/mc_private.h"
 #include "src/mc/remote/Client.hpp"
 #include "src/mc/remote/mc_protocol.h"
@@ -191,7 +191,7 @@ void SIMIX_set_maestro(void (*code)(void*), void* data)
  */
 void SIMIX_global_init(int *argc, char **argv)
 {
  */
 void SIMIX_global_init(int *argc, char **argv)
 {
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   // The communication initialization is done ASAP.
   // We need to communicate  initialization of the different layers to the model-checker.
   simgrid::mc::Client::initialize();
   // The communication initialization is done ASAP.
   // We need to communicate  initialization of the different layers to the model-checker.
   simgrid::mc::Client::initialize();
@@ -302,7 +302,7 @@ void SIMIX_clean()
 
   xbt_os_mutex_destroy(simix_global->mutex);
   simix_global->mutex = nullptr;
 
   xbt_os_mutex_destroy(simix_global->mutex);
   simix_global->mutex = nullptr;
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   xbt_dynar_free(&simix_global->actors_vector);
 #endif
 
   xbt_dynar_free(&simix_global->actors_vector);
 #endif
 
index 852db10..2da73fd 100644 (file)
@@ -59,7 +59,7 @@ _find_matching_comm(boost::circular_buffer_space_optimized<smx_activity_t>* dequ
       if (remove_matching)
         deque->erase(it);
       comm->ref();
       if (remove_matching)
         deque->erase(it);
       comm->ref();
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
       comm->mbox_cpy = comm->mbox;
 #endif
       comm->mbox = nullptr;
       comm->mbox_cpy = comm->mbox;
 #endif
       comm->mbox = nullptr;
index 9ec2107..f600d35 100644 (file)
@@ -22,7 +22,7 @@ public:
   xbt_dynar_t process_to_run = nullptr;
   xbt_dynar_t process_that_ran = nullptr;
   std::map<aid_t, smx_actor_t> process_list;
   xbt_dynar_t process_to_run = nullptr;
   xbt_dynar_t process_that_ran = nullptr;
   std::map<aid_t, smx_actor_t> process_list;
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   /* MCer cannot read the std::map above in the remote process, so we copy the info it needs in a dynar.
    * FIXME: This is supposed to be a temporary hack.
    * A better solution would be to change the split between MCer and MCed, where the responsibility
   /* MCer cannot read the std::map above in the remote process, so we copy the info it needs in a dynar.
    * FIXME: This is supposed to be a temporary hack.
    * A better solution would be to change the split between MCer and MCed, where the responsibility
index 6dfe3bd..9e91d9a 100644 (file)
@@ -107,7 +107,7 @@ std::unordered_map<int, smpi_key_elem> Datatype::keyvals_;
 int Datatype::keyval_id_=0;
 
 Datatype::Datatype(int size,MPI_Aint lb, MPI_Aint ub, int flags) : name_(nullptr), size_(size), lb_(lb), ub_(ub), flags_(flags), refcount_(1){
 int Datatype::keyval_id_=0;
 
 Datatype::Datatype(int size,MPI_Aint lb, MPI_Aint ub, int flags) : name_(nullptr), size_(size), lb_(lb), ub_(ub), flags_(flags), refcount_(1){
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   if(MC_is_active())
     MC_ignore(&(refcount_), sizeof(refcount_));
 #endif
   if(MC_is_active())
     MC_ignore(&(refcount_), sizeof(refcount_));
 #endif
@@ -115,7 +115,7 @@ Datatype::Datatype(int size,MPI_Aint lb, MPI_Aint ub, int flags) : name_(nullptr
 
 //for predefined types, so in_use = 0.
 Datatype::Datatype(char* name, int size,MPI_Aint lb, MPI_Aint ub, int flags) : name_(name), size_(size), lb_(lb), ub_(ub), flags_(flags), refcount_(0){
 
 //for predefined types, so in_use = 0.
 Datatype::Datatype(char* name, int size,MPI_Aint lb, MPI_Aint ub, int flags) : name_(name), size_(size), lb_(lb), ub_(ub), flags_(flags), refcount_(0){
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   if(MC_is_active())
     MC_ignore(&(refcount_), sizeof(refcount_));
 #endif
   if(MC_is_active())
     MC_ignore(&(refcount_), sizeof(refcount_));
 #endif
@@ -170,7 +170,7 @@ void Datatype::ref(){
 
   refcount_++;
 
 
   refcount_++;
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   if(MC_is_active())
     MC_ignore(&(refcount_), sizeof(refcount_));
 #endif
   if(MC_is_active())
     MC_ignore(&(refcount_), sizeof(refcount_));
 #endif
@@ -184,7 +184,7 @@ void Datatype::unref(MPI_Datatype datatype)
   if (datatype->refcount_ == 0  && !(datatype->flags_ & DT_FLAG_PREDEFINED))
     delete datatype;
 
   if (datatype->refcount_ == 0  && !(datatype->flags_ & DT_FLAG_PREDEFINED))
     delete datatype;
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   if(MC_is_active())
     MC_ignore(&(datatype->refcount_), sizeof(datatype->refcount_));
 #endif
   if(MC_is_active())
     MC_ignore(&(datatype->refcount_), sizeof(datatype->refcount_));
 #endif
index 2b1cfbb..2b2fa3a 100644 (file)
@@ -77,7 +77,7 @@ void surf_network_model_init_IB() {
   xbt_die("Please activate SMPI support in cmake to use the IB network model.");
 }
 #endif
   xbt_die("Please activate SMPI support in cmake to use the IB network model.");
 }
 #endif
-#if !HAVE_NS3
+#if !SIMGRID_HAVE_NS3
 void surf_network_model_init_NS3() {
   xbt_die("Please activate NS3 support in cmake and install the dependencies to use the NS3 network model.");
 }
 void surf_network_model_init_NS3() {
   xbt_die("Please activate NS3 support in cmake and install the dependencies to use the NS3 network model.");
 }
@@ -302,31 +302,31 @@ void sg_version()
   std::printf("This program was linked against %s (git: %s), found in %s.\n",
               SIMGRID_VERSION_STRING, SIMGRID_GIT_VERSION, SIMGRID_INSTALL_PREFIX);
 
   std::printf("This program was linked against %s (git: %s), found in %s.\n",
               SIMGRID_VERSION_STRING, SIMGRID_GIT_VERSION, SIMGRID_INSTALL_PREFIX);
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   std::printf("   Model-checking support compiled in.\n");
 #else
   std::printf("   Model-checking support disabled at compilation.\n");
 #endif
 
   std::printf("   Model-checking support compiled in.\n");
 #else
   std::printf("   Model-checking support disabled at compilation.\n");
 #endif
 
-#if HAVE_NS3
+#if SIMGRID_HAVE_NS3
   std::printf("   NS3 support compiled in.\n");
 #else
   std::printf("   NS3 support disabled at compilation.\n");
 #endif
 
   std::printf("   NS3 support compiled in.\n");
 #else
   std::printf("   NS3 support disabled at compilation.\n");
 #endif
 
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
   std::printf("   Jedule support compiled in.\n");
 #else
   std::printf("   Jedule support disabled at compilation.\n");
 #endif
 
   std::printf("   Jedule support compiled in.\n");
 #else
   std::printf("   Jedule support disabled at compilation.\n");
 #endif
 
-#if HAVE_LUA
+#if SIMGRID_HAVE_LUA
   std::printf("   Lua support compiled in.\n");
 #else
   std::printf("   Lua support disabled at compilation.\n");
 #endif
 
   std::printf("   Lua support compiled in.\n");
 #else
   std::printf("   Lua support disabled at compilation.\n");
 #endif
 
-#if HAVE_MALLOCATOR
+#if SIMGRID_HAVE_MALLOCATOR
   std::printf("   Mallocator support compiled in.\n");
 #else
   std::printf("   Mallocator support disabled at compilation.\n");
   std::printf("   Mallocator support compiled in.\n");
 #else
   std::printf("   Mallocator support disabled at compilation.\n");
index 5890b6e..24892fd 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "src/surf/xml/platf_private.hpp"
 
 
 #include "src/surf/xml/platf_private.hpp"
 
-#if HAVE_LUA
+#if SIMGRID_HAVE_LUA
 extern "C" {
 #include "src/bindings/lua/simgrid_lua.h"
 
 extern "C" {
 #include "src/bindings/lua/simgrid_lua.h"
 
@@ -131,14 +131,14 @@ void parse_after_config() {
 /* This function acts as a main in the parsing area. */
 void parse_platform_file(const char *file)
 {
 /* This function acts as a main in the parsing area. */
 void parse_platform_file(const char *file)
 {
-#if HAVE_LUA
+#if SIMGRID_HAVE_LUA
   int len    = (file == nullptr ? 0 : strlen(file));
   int is_lua = (file != nullptr && len > 3 && file[len - 3] == 'l' && file[len - 2] == 'u' && file[len - 1] == 'a');
 #endif
 
   sg_platf_init();
 
   int len    = (file == nullptr ? 0 : strlen(file));
   int is_lua = (file != nullptr && len > 3 && file[len - 3] == 'l' && file[len - 2] == 'u' && file[len - 1] == 'a');
 #endif
 
   sg_platf_init();
 
-#if HAVE_LUA
+#if SIMGRID_HAVE_LUA
   /* Check if file extension is "lua". If so, we will use
    * the lua bindings to parse the platform file (since it is
    * written in lua). If not, we will use the (old?) XML parser
   /* Check if file extension is "lua". If so, we will use
    * the lua bindings to parse the platform file (since it is
    * written in lua). If not, we will use the (old?) XML parser
index cb8ef6d..5e77a4a 100644 (file)
@@ -24,7 +24,7 @@
 #include "xbt/str.h"
 #include "xbt/module.h"         /* xbt_binary_name */
 #include "src/xbt_modinter.h"       /* backtrace initialization headers */
 #include "xbt/str.h"
 #include "xbt/module.h"         /* xbt_binary_name */
 #include "src/xbt_modinter.h"       /* backtrace initialization headers */
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 #define UNW_LOCAL_ONLY
 #include <libunwind.h>
 #endif
 #define UNW_LOCAL_ONLY
 #include <libunwind.h>
 #endif
@@ -338,7 +338,7 @@ std::vector<std::string> resolveBacktrace(
 }
 }
 
 }
 }
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 int xbt_libunwind_backtrace(void** bt, int size){
   for (int i = 0; i < size; i++)
     bt[i] = nullptr;
 int xbt_libunwind_backtrace(void** bt, int size){
   for (int i = 0; i < size; i++)
     bt[i] = nullptr;
index 9e3da3c..86fd9c3 100644 (file)
@@ -125,7 +125,7 @@ static void xbt_log_connect_categories(void)
   /* The following categories are only defined in libsimgrid */
 
   /* bindings */
   /* The following categories are only defined in libsimgrid */
 
   /* bindings */
-#if HAVE_LUA
+#if SIMGRID_HAVE_LUA
   XBT_LOG_CONNECT(lua);
   XBT_LOG_CONNECT(lua_host);
   XBT_LOG_CONNECT(lua_platf);
   XBT_LOG_CONNECT(lua);
   XBT_LOG_CONNECT(lua_host);
   XBT_LOG_CONNECT(lua_platf);
@@ -150,13 +150,13 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(instr_TI_trace);
 
   /* jedule */
   XBT_LOG_CONNECT(instr_TI_trace);
 
   /* jedule */
-#if HAVE_JEDULE
+#if SIMGRID_HAVE_JEDULE
   XBT_LOG_CONNECT(jedule);
   XBT_LOG_CONNECT(jed_sd);
 #endif
 
   /* mc */
   XBT_LOG_CONNECT(jedule);
   XBT_LOG_CONNECT(jed_sd);
 #endif
 
   /* mc */
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   XBT_LOG_CONNECT(mc);
   XBT_LOG_CONNECT(mc_checkpoint);
   XBT_LOG_CONNECT(mc_comm_determinism);
   XBT_LOG_CONNECT(mc);
   XBT_LOG_CONNECT(mc_checkpoint);
   XBT_LOG_CONNECT(mc_comm_determinism);
@@ -245,7 +245,7 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(surf_lagrange_dichotomy);
   XBT_LOG_CONNECT(surf_maxmin);
   XBT_LOG_CONNECT(surf_network);
   XBT_LOG_CONNECT(surf_lagrange_dichotomy);
   XBT_LOG_CONNECT(surf_maxmin);
   XBT_LOG_CONNECT(surf_network);
-#if HAVE_NS3
+#if SIMGRID_HAVE_NS3
   XBT_LOG_CONNECT(ns3);
 #endif
   XBT_LOG_CONNECT(surf_parse);
   XBT_LOG_CONNECT(ns3);
 #endif
   XBT_LOG_CONNECT(surf_parse);
index f898c39..408e115 100644 (file)
@@ -71,7 +71,7 @@ void xbt_mallocator_initialization_is_done(int protect)
 
 /** used by the module to know if it's time to activate the mallocators yet */
 static inline int xbt_mallocator_is_active(void) {
 
 /** used by the module to know if it's time to activate the mallocators yet */
 static inline int xbt_mallocator_is_active(void) {
-#if HAVE_MALLOCATOR
+#if SIMGRID_HAVE_MALLOCATOR
   return initialization_done && !MC_is_active();
 #else
   return 0;
   return initialization_done && !MC_is_active();
 #else
   return 0;
index dafcbbd..a8962f7 100644 (file)
@@ -51,7 +51,7 @@ xbt_mheap_t mmalloc_set_current_heap(xbt_mheap_t new_heap)
 }
 
 /* Override the malloc-like functions if MC is activated at compile time */
 }
 
 /* Override the malloc-like functions if MC is activated at compile time */
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 
 /* ***** Temporary allocator
  *
 
 /* ***** Temporary allocator
  *
@@ -267,4 +267,4 @@ void free(void *p)
   mfree(mdp, p);
   UNLOCK(mdp);
 }
   mfree(mdp, p);
   UNLOCK(mdp);
 }
-#endif /* HAVE_MC */
+#endif /* SIMGRID_HAVE_MC */
index f23e429..afc6445 100644 (file)
@@ -15,7 +15,7 @@
 namespace simgrid {
 namespace xbt {
 
 namespace simgrid {
 namespace xbt {
 
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
 
 const char string::NUL = '\0';
 
 
 const char string::NUL = '\0';
 
index f042417..9176b29 100644 (file)
@@ -113,7 +113,7 @@ static void xbt_postexit(void)
   xbt_dynar_free(&xbt_cmdline);
   xbt_log_postexit();
   free(xbt_binary_name);
   xbt_dynar_free(&xbt_cmdline);
   xbt_log_postexit();
   free(xbt_binary_name);
-#if HAVE_MC
+#if SIMGRID_HAVE_MC
   mmalloc_postexit();
 #endif
 }
   mmalloc_postexit();
 #endif
 }