#define NOT_YET_IMPLEMENTED_NOFAIL \
{ \
- static bool warning_todo = true; \
- if (warning_todo) \
+ if (static bool warned_todo = false; not warned_todo) { \
XBT_WARN("Not yet implemented: %s. " \
"Please contact the SimGrid team if support is needed. " \
"Run with --log=smpi_mpi.thresh:error to hide", \
__func__); \
- warning_todo = false; \
+ warned_todo = true; \
+ } \
return MPI_SUCCESS; \
}
XBT_DEBUG("\tLink (%s) bw:%fbps lat:%fs", link->get_cname(), link->get_bandwidth(), link->get_latency());
ns3_add_direct_route(src, dst, link->get_bandwidth(), link->get_latency(), link->get_sharing_policy());
- } else {
- static bool warned_about_long_routes = false;
-
- if (not warned_about_long_routes)
- XBT_WARN("Ignoring a route between %s and %s of length %zu: Only routes of length 1 are considered with ns-3.\n"
- "WARNING: You can ignore this warning if your hosts can still communicate when only considering routes "
- "of length 1.\n"
- "WARNING: Remove long routes to avoid this harmless message; subsequent long routes will be silently "
- "ignored.",
- src->get_cname(), dst->get_cname(), link_list.size());
+ } else if (static bool warned_about_long_routes = false; not warned_about_long_routes) {
+ XBT_WARN("Ignoring a route between %s and %s of length %zu: Only routes of length 1 are considered with ns-3.\n"
+ "WARNING: You can ignore this warning if your hosts can still communicate when only considering routes "
+ "of length 1.\n"
+ "WARNING: Remove long routes to avoid this harmless message; subsequent long routes will be silently "
+ "ignored.",
+ src->get_cname(), dst->get_cname(), link_list.size());
warned_about_long_routes = true;
}
}