X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/19c58cbb49a4c58174169566b13aafb2b873fd81..873fe7743b2a9f2eddc53ed3383bdd74bb3fe226:/src/mc/mc_request.cpp diff --git a/src/mc/mc_request.cpp b/src/mc/mc_request.cpp index 9500f33537..1404c21e6f 100644 --- a/src/mc/mc_request.cpp +++ b/src/mc/mc_request.cpp @@ -136,9 +136,6 @@ bool request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2) // Those are MC_state_get_internal_request(state) bool request_depend(smx_simcall_t r1, smx_simcall_t r2) { - if (simgrid::mc::reduction_mode == simgrid::mc::ReductionMode::none) - return true; - if (r1->issuer == r2->issuer) return false; @@ -465,6 +462,27 @@ bool process_is_enabled(smx_process_t process) return simgrid::mc::request_is_enabled(&process->simcall); } +static const char* colors[] = { + "blue", + "red", + "green3", + "goldenrod", + "brown", + "purple", + "magenta", + "turquoise4", + "gray25", + "forestgreen", + "hotpink", + "lightblue", + "tan", +}; + +static inline const char* get_color(int id) +{ + return colors[id % (sizeof(colors) / sizeof(colors[0])) ]; +} + char *request_get_dot_output(smx_simcall_t req, int value) { char *label = nullptr; @@ -602,9 +620,10 @@ char *request_get_dot_output(smx_simcall_t req, int value) THROW_UNIMPLEMENTED; } + const char* color = get_color(issuer->pid - 1); char* str = bprintf("label = \"%s\", color = %s, fontcolor = %s", label, - colors[issuer->pid - 1], colors[issuer->pid - 1]); + color, color); xbt_free(label); return str;