From c4369f16be36158d5f3e7f1381f44b2ac901ce1e Mon Sep 17 00:00:00 2001 From: Bernd Machenschalk Date: Mon, 19 Mar 2012 10:42:24 +0000 Subject: [PATCH] scheduler: indicate which 'locality condition' failed in the log message --- sched/sched_send.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/sched/sched_send.cpp b/sched/sched_send.cpp index 7b72930518..8fa4280b94 100644 --- a/sched/sched_send.cpp +++ b/sched/sched_send.cpp @@ -743,10 +743,34 @@ bool work_needed(bool locality_sched) { // if we've failed to send a result because of a transient condition, // return false to preserve invariant // - if (g_wreq->disk.insufficient || g_wreq->speed.insufficient || g_wreq->mem.insufficient || g_wreq->no_allowed_apps_available) { + if (g_wreq->disk.insufficient) { if (config.debug_send) { log_messages.printf(MSG_NORMAL, - "[send] stopping work search - locality condition\n" + "[send] stopping work search - insufficient disk space\n" + ); + } + return false; + } + if (g_wreq->speed.insufficient) { + if (config.debug_send) { + log_messages.printf(MSG_NORMAL, + "[send] stopping work search - host too slow\n" + ); + } + return false; + } + if (g_wreq->mem.insufficient) { + if (config.debug_send) { + log_messages.printf(MSG_NORMAL, + "[send] stopping work search - insufficient memory\n" + ); + } + return false; + } + if (g_wreq->no_allowed_apps_available) { + if (config.debug_send) { + log_messages.printf(MSG_NORMAL, + "[send] stopping work search - no locality app selected\n" ); } return false;