From d1a3243f57e83ad945206355dd1d1c3521a95209 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 27 Jan 2010 19:06:40 +0000 Subject: [PATCH] - client: fix small bug that could interfere with work fetch on hosts with both NVIDIA and ATI GPU svn path=/trunk/boinc/; revision=20283 --- checkin_notes | 7 +++++++ client/work_fetch.cpp | 16 +++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/checkin_notes b/checkin_notes index 09aec95cb3..8c19c893d8 100644 --- a/checkin_notes +++ b/checkin_notes @@ -734,3 +734,10 @@ Charlie 27 Jan 2010 clientgui/ mac/ MacAccessiblity.cpp + +David 27 Jan 2010 + - client: fix small bug that could interfere with work fetch + on hosts with both NVIDIA and ATI GPU + + client/ + work_fetch.cpp diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index 859efa848a..d60d0eb6b8 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -308,12 +308,6 @@ PROJECT* RSC_WORK_FETCH::choose_project(int criterion) { } if (!pbest) return NULL; - if (log_flags.work_fetch_debug) { - msg_printf(pbest, MSG_INFO, - "chosen: %s %s", criterion_name(criterion), rsc_name(rsc_type) - ); - } - // decide how much work to request from each resource // work_fetch.clear_request(); @@ -343,6 +337,14 @@ PROJECT* RSC_WORK_FETCH::choose_project(int criterion) { return 0; } + if (log_flags.work_fetch_debug) { + msg_printf(pbest, MSG_INFO, + "chosen: %s %s: %.2f inst, %.2f sec", + criterion_name(criterion), rsc_name(rsc_type), + req_instances, req_secs + ); + } + return pbest; } @@ -816,7 +818,7 @@ PROJECT* WORK_FETCH::choose_project() { if (cuda_usable) { p = cuda_work_fetch.choose_project(FETCH_IF_IDLE_INSTANCE); } - if (ati_usable) { + if (!p && ati_usable) { p = ati_work_fetch.choose_project(FETCH_IF_IDLE_INSTANCE); } if (!p) {