From 2eceda0180a326aeae3eeefd4d5f937109e4153b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 16 Mar 2009 15:53:35 +0000 Subject: [PATCH] - scheduler: in get_app_version() we check if our current best app version is a CUDA app and we don't need more CUDA work. Need to do this for CPU as well. svn path=/trunk/boinc/; revision=17598 --- checkin_notes | 8 ++++++++ sched/sched_send.cpp | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/checkin_notes b/checkin_notes index 8766cb27ec..be18f6fbea 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3022,3 +3022,11 @@ Rom 13 Mar 2009 ViewResources.cpp win_build/ boincmgr_curl.vcproj + +David 16 Mar 2009 + - scheduler: in get_app_version() we check if our current best + app version is a CUDA app and we don't need more CUDA work. + Need to do this for CPU as well. + + sched/ + sched_send.cpp diff --git a/sched/sched_send.cpp b/sched/sched_send.cpp index dd23c5cfae..0a116447f6 100644 --- a/sched/sched_send.cpp +++ b/sched/sched_send.cpp @@ -247,6 +247,23 @@ BEST_APP_VERSION* get_app_version(WORKUNIT& wu, bool check_req) { g_wreq->best_app_versions.erase(bavi); break; } + + // same, CPU + // + if (check_req + && g_wreq->rsc_spec_request + && !bavp->host_usage.ncudas + && !g_wreq->need_cpu() + ) { + if (config.debug_version_select) { + log_messages.printf(MSG_NORMAL, + "[version] have CPU version but no more CPU work needed\n" + ); + } + g_wreq->best_app_versions.erase(bavi); + break; + } + return bavp; } bavi++;