From: Arnaud Giersch Date: Mon, 30 Apr 2018 16:30:40 +0000 (+0200) Subject: Fix build with SimGrid 3.12. X-Git-Tag: sg_v3_12 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/f581799445893c1b953c365fbfb025e3dbcc775a?ds=inline Fix build with SimGrid 3.12. Drop compatibility with older versions. --- diff --git a/communicator.cpp b/communicator.cpp index 40752c5..2df6d76 100644 --- a/communicator.cpp +++ b/communicator.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(comm); diff --git a/communicator.h b/communicator.h index 8f3f6bf..c123b1b 100644 --- a/communicator.h +++ b/communicator.h @@ -4,7 +4,7 @@ #define COMMUNICATOR_H #include -#include +#include #include "hostdata.h" #include "messages.h" #include "msg_thread.h" diff --git a/deployment.cpp b/deployment.cpp index 0a5db8c..287ca4f 100644 --- a/deployment.cpp +++ b/deployment.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include diff --git a/hostdata.h b/hostdata.h index aa7884c..2c5379a 100644 --- a/hostdata.h +++ b/hostdata.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include "simgrid_features.h" // Helper class that associates instances of itself with each host. diff --git a/main.cpp b/main.cpp index e148574..af47c64 100644 --- a/main.cpp +++ b/main.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include // Creates log categories @@ -234,7 +234,6 @@ int main(int argc, char* argv[]) "Compiled on " << version::date << "\n\n"; if (!parse_res || opt::help_requested) opt::usage(); - res = MSG_clean(); exit(parse_res ? EXIT_NO_FAILURE : EXIT_FAILURE_ARGS); } XBT_INFO("%s v%s (%s)", opt::program_name.c_str(), version::num.c_str(), @@ -308,11 +307,6 @@ int main(int argc, char* argv[]) // Clean the MSG simulation. hostdata::destroy(); - res = MSG_clean(); - if (res != MSG_OK) { - XBT_ERROR("MSG_clean() failed with status %#x", res); - exit_status |= EXIT_FAILURE_CLEAN; - } // Report final simulation status. if (simulated_time >= 0.0) { diff --git a/messages.h b/messages.h index cc6efbc..925047d 100644 --- a/messages.h +++ b/messages.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include "simgrid_features.h" #include "synchro.h" #include "sync_queue.h" diff --git a/misc.h b/misc.h index 557bed5..8700b96 100644 --- a/misc.h +++ b/misc.h @@ -20,7 +20,7 @@ namespace misc { /* Defines XBT_XCLOG(...) which behave like XBT_CLOG(...), except that the * given category is not passed through _XBT_LOGV before use. */ -#define XBT_XCLOG(c, p, ...) XBT_CLOG_((*(c)), p, __VA_ARGS__) +#define XBT_XCLOG(c, p, ...) XBT_CLOG((*(c)), p, __VA_ARGS__) #endif // !MISC_H diff --git a/msg_thread.h b/msg_thread.h index 69ce02b..5196c62 100644 --- a/msg_thread.h +++ b/msg_thread.h @@ -2,7 +2,7 @@ #define MSG_THREAD_H #include -#include +#include #include "simgrid_features.h" #include "synchro.h" diff --git a/neighbor.cpp b/neighbor.cpp index e0925da..c3ea8c8 100644 --- a/neighbor.cpp +++ b/neighbor.cpp @@ -1,5 +1,5 @@ #include -#include +#include XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(proc); // needed to compile neighbor.h diff --git a/process.h b/process.h index c9873e0..55ee792 100644 --- a/process.h +++ b/process.h @@ -14,7 +14,7 @@ # define MAP_TEMPLATE std::map #endif #include -#include +#include #include #include "communicator.h" #include "misc.h" diff --git a/simgrid_features.h b/simgrid_features.h index 00ff3a7..3de11a0 100644 --- a/simgrid_features.h +++ b/simgrid_features.h @@ -3,19 +3,9 @@ #include -#if !defined(SIMGRID_VERSION) || SIMGRID_VERSION < 30700UL // == SG < 3.7 == // -# error "Unsupported SimGrid version. Need version >= 3.7" -#endif // ================================================================== // - -#if SIMGRID_VERSION < 30800UL // ============================== SG < 3.8 === // -# define MSG_init(argc, argv) MSG_global_init(argc, argv) -# define msg_error_t MSG_error_t -# define msg_host_t m_host_t -# define msg_process_t m_process_t -# define msg_task_t m_task_t -#else // =================================================================== // -# define MSG_clean() MSG_OK -#endif // ================================================================== // +#if !defined(SIMGRID_VERSION) || SIMGRID_VERSION < 31200UL // == SG < 3.12 == // +# error "Unsupported SimGrid version. Need version >= 3.12" +#endif // =================================================================== // #endif // !SIMGRID_FEATURES_H