Adjust some #include consequently.
#include <simgrid/engine.h>
#include <simgrid/host.h>
#include <simgrid/mailbox.h>
-#include <xbt/asserts.h>
#include <xbt/log.h>
+#include <xbt/sysdep.h>
// This declares a logging channel so that XBT_INFO can be used later
XBT_LOG_NEW_DEFAULT_CATEGORY(actor_create, "The logging channel used in this example");
#include "bittorrent-peer.h"
#include "tracker.h"
#include <simgrid/forward.h>
+#include <xbt/ex.h>
#include <limits.h>
#include <stdio.h> /* snprintf */
#include "simgrid/engine.h"
#include "simgrid/forward.h"
#include "simgrid/mailbox.h"
-#include "xbt/asserts.h"
#include "xbt/log.h"
#include "xbt/str.h"
+#include "xbt/sysdep.h"
#define FINALIZE 221297 /* a magic number to tell people to stop working */
#include "simgrid/plugins/live_migration.h"
#include "simgrid/vm.h"
-#include "xbt/asserts.h"
#include "xbt/log.h"
#include "xbt/str.h"
+#include "xbt/sysdep.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(cloud_masterworker, "Messages specific for this example");
#include "simgrid/engine.h"
#include "simgrid/forward.h"
#include "simgrid/mailbox.h"
-#include "xbt/asserts.h"
#include "xbt/log.h"
#include "xbt/str.h"
+#include "xbt/sysdep.h"
#include <stdio.h> /* snprintf */
#include "simgrid/engine.h"
#include "simgrid/mailbox.h"
-#include "xbt/asserts.h"
#include "xbt/log.h"
#include "xbt/str.h"
+#include "xbt/sysdep.h"
#include <stdio.h>
#include "simgrid/host.h"
#include "simgrid/mailbox.h"
-#include "xbt/asserts.h"
#include "xbt/log.h"
#include "xbt/str.h"
+#include "xbt/sysdep.h"
#include <stdio.h> /* snprintf */
#include "simgrid/engine.h"
#include "simgrid/forward.h"
#include "simgrid/mailbox.h"
-#include "xbt/asserts.h"
#include "xbt/log.h"
#include "xbt/str.h"
+#include "xbt/sysdep.h"
#include <stdio.h> /* snprintf */
#include "simgrid/mailbox.h"
#include "xbt/dynar.h"
+#include "xbt/ex.h"
#include "xbt/log.h"
#include "xbt/str.h"
#include "xbt/sysdep.h"
#include "simgrid/exec.h"
#include "simgrid/host.h"
#include "simgrid/plugins/energy.h"
-#include "xbt/asserts.h"
#include "xbt/config.h"
#include "xbt/log.h"
+#include "xbt/sysdep.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(energy_exec_ptask, "Messages specific for this example");
#include "simgrid/exec.h"
#include "simgrid/host.h"
-#include "xbt/asserts.h"
#include "xbt/log.h"
+#include "xbt/sysdep.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(exec_waitany, "Messages specific for this example");
#include "simgrid/host.h"
#include "simgrid/mailbox.h"
-#include "xbt/asserts.h"
#include "xbt/log.h"
#include "xbt/str.h"
+#include "xbt/sysdep.h"
#include <stdio.h> /* snprintf */
#ifndef XBT_ASSERTS_H
#define XBT_ASSERTS_H
-#include <xbt/ex.h>
+#include <stdlib.h>
+#include <xbt/base.h>
#include <xbt/log.h>
-#include <xbt/misc.h>
SG_BEGIN_DECL
XBT_PUBLIC_DATA int xbt_log_no_loc; /* Do not show the backtrace on failed backtrace when doing our tests */
/**
* @addtogroup XBT_error
+ *
+ * @{
+ */
+/** @brief Kill the program in silence */
+XBT_ATTRIB_NORETURN XBT_PUBLIC void xbt_abort(void);
+
+/**
+ * @brief Kill the program with an error message
+ * @param ... a format string and its arguments
+ *
+ * Things are so messed up that the only thing to do now, is to stop the program.
+ *
+ * The message is handled by a CRITICAL logging request, and may consist of a format string with arguments.
+ */
+#define xbt_die(...) \
+ do { \
+ XBT_CCRITICAL(root, __VA_ARGS__); \
+ xbt_abort(); \
+ } while (0)
+
+/**
* @brief Those are the SimGrid version of the good ol' assert macro.
*
* You can pass them a format message and arguments, just as if it where a printf.
* It is converted to a XBT_CRITICAL logging request.
* Be careful: the boolean expression that you want to test should not have side effects, because assertions are
* disabled at compile time if NDEBUG is set.
- *
- * @{
*/
#ifdef NDEBUG
#define xbt_assert(...) ((void)0)
#else
- /** @brief The condition which failed will be displayed.
- @hideinitializer */
+/** @brief The condition which failed will be displayed.
+ @hideinitializer */
#define xbt_assert(...) \
_XBT_IF_ONE_ARG(_xbt_assert_ARG1, _xbt_assert_ARGN, __VA_ARGS__)(__VA_ARGS__)
#define _xbt_assert_ARG1(cond) _xbt_assert_ARGN((cond), "Assertion %s failed", #cond)
#include <stdarg.h>
#include <stddef.h> /* NULL */
#include <stdio.h> /* FILE */
-#include <xbt/misc.h>
+#include <xbt/base.h>
SG_BEGIN_DECL
/**@brief Log priorities
* @ingroup XBT_log
#include <xbt/asserts.h>
#include <xbt/log.h>
-#include <xbt/misc.h>
#include <simgrid/config.h>
SG_BEGIN_DECL
-/* They live in asserts.h, but need to be declared before this module.
- double declaration to cut dependency cycle */
-/**
- * @addtogroup XBT_error
- *
- * @{
- */
-/** @brief Kill the program in silence */
-XBT_ATTRIB_NORETURN XBT_PUBLIC void xbt_abort(void);
-
-/**
- * @brief Kill the program with an error message
- * @param ... a format string and its arguments
- *
- * Things are so messed up that the only thing to do now, is to stop the program.
- *
- * The message is handled by a CRITICAL logging request, and may consist of a format string with arguments.
- */
-#define xbt_die(...) \
- do { \
- XBT_CCRITICAL(root, __VA_ARGS__); \
- xbt_abort(); \
- } while (0)
-/** @} */
-
#ifdef XBT_LOG_LOCALLY_DEFINE_XBT_CHANNEL
XBT_LOG_NEW_CATEGORY(xbt, "All XBT categories (simgrid toolbox)");
XBT_LOG_NEW_SUBCATEGORY(xbt_help, xbt, "Help messages");
/* 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. */
-#include "xbt/asserts.h"
#include "simgrid/jedule/jedule.hpp"
+#include "simgrid/config.h"
+#include "xbt/asserts.h"
#if SIMGRID_HAVE_JEDULE
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/jedule/jedule.hpp"
+#include "simgrid/config.h"
#include "simgrid/s4u/NetZone.hpp"
#include "xbt/asserts.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/jedule/jedule.hpp"
+#include "simgrid/config.h"
#include "simgrid/host.h"
#include "simgrid/s4u/NetZone.hpp"
#include "xbt/asserts.h"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/NetZone.hpp"
#include "src/simdag/simdag_private.hpp"
+#include "xbt/virtu.h"
#if SIMGRID_HAVE_JEDULE
#include "simgrid/s4u/Link.hpp"
#include "src/surf/surf_interface.hpp"
#include "xbt/asserts.h"
+#include "xbt/ex.h"
#include "xbt/mallocator.h"
#include <boost/intrusive/list.hpp>
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/xbt/log_private.hpp"
-#include "xbt/asserts.h"
#include "xbt/string.hpp"
+#include "xbt/sysdep.h"
#include "xbt/xbt_modinter.h"
#include <algorithm>
#include <array>
#include <boost/tokenizer.hpp>
+#include <cstring>
#include <mutex>
#include <string>
#include <vector>
#endif
#include <stdio.h>
-#include "xbt/sysdep.h" /* xbt_abort() */
#include "src/internal_config.h" /* Do we need vasprintf? */
+#include "xbt/asserts.h" /* xbt_abort() */
+#include "xbt/misc.h"
#if !HAVE_VASPRINTF
#include <assert.h>
#include <cerrno>
#include <cstdio>
#include <cstring>
+#include <string>
static void append_file(const s_xbt_log_appender_t* this_, const char* str)
{
#include "simgrid/host.h"
#include "src/xbt/log_private.hpp"
#include "xbt/sysdep.h"
+#include "xbt/virtu.h"
#include <algorithm>
#include <cstdio>
/* 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. */
-#include "xbt/sysdep.h"
#include "src/xbt/log_private.hpp"
+#include "xbt/sysdep.h"
+#include "xbt/virtu.h"
#include "simgrid/engine.h" /* simgrid_get_clock */
#include "simgrid/host.h" /* sg_host_self_get_name */
> [rank 14] -> Ginette
> [rank 15] -> Ginette
> If this is too much, consider sharing allocations for computation buffers.
-> Largest allocation at once from a single process was 64 bytes, at sysdep.h:87. It was called 32 times during the whole simulation.
+> Largest allocation at once from a single process was 64 bytes, at sysdep.h:61. It was called 32 times during the whole simulation.
> Running smpirun with -wrapper "valgrind --leak-check=full" can provide more information
> This can be done automatically by setting --cfg=smpi/auto-shared-malloc-thresh to the minimum size wanted size (this can alter execution if data content is necessary)
> [0.023768] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 31 unfreed MPI handles : display types and addresses (n max) with --cfg=smpi/list-leaks:n.