From 760c16eb03de31ba87cce2840f90b14967c1b5e9 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 8 Sep 2011 18:55:55 +0000 Subject: [PATCH] - scheduler: in work_needed(), ignore requests for resource types for which we have no app versions - client: if too many elements in cc_config.xml, detect it and inform user svn path=/trunk/boinc/; revision=24144 --- checkin_notes | 16 ++++++++++++++++ client/log_flags.cpp | 10 +++++++++- lib/cc_config.cpp | 1 + lib/coproc.h | 2 ++ samples/client_state_save.xml | 1 - sched/sched_send.cpp | 6 +++--- 6 files changed, 31 insertions(+), 5 deletions(-) diff --git a/checkin_notes b/checkin_notes index 5f87089eeb..dbdb222654 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5709,3 +5709,19 @@ David 7 Sept 2011 app_start.cpp cs_cmdline.cpp app_control.cpp + +David 8 Sept 2011 + - scheduler: in work_needed(), ignore requests for resource + types for which we have no app versions + - client: if too many elements in cc_config.xml, + detect it and inform user + + sched/ + sched_send.cpp + lib/ + coproc.h + cc_config.cpp + samples/ + client_state_save.xml + client/ + log_flags.cpp diff --git a/client/log_flags.cpp b/client/log_flags.cpp index 7d71e18ae9..1847e72bdb 100644 --- a/client/log_flags.cpp +++ b/client/log_flags.cpp @@ -355,7 +355,15 @@ int CONFIG::parse_client(FILE* f) { continue; } if (xp.match_tag("options")) { - parse_options(xp); + int retval = parse_options(xp); + if (retval) { + msg_printf_notice(NULL, false, + "http://boinc.berkeley.edu/manager_links.php?target=notice&controlid=config", + "%s: %s", + _("Error in cc_config.xml options"), + boincerror(retval) + ); + } continue; } if (xp.match_tag("options/")) continue; diff --git a/lib/cc_config.cpp b/lib/cc_config.cpp index d4376e4e4f..88074b85e2 100644 --- a/lib/cc_config.cpp +++ b/lib/cc_config.cpp @@ -298,6 +298,7 @@ int CONFIG::parse_options(XML_PARSER& xp) { retval = c.parse(xp); if (retval) return retval; retval = config_coprocs.add(c); + if (retval) return retval; continue; } if (xp.parse_str("data_dir", data_dir, sizeof(data_dir))) { diff --git a/lib/coproc.h b/lib/coproc.h index 636e8a8217..0716e2da1c 100644 --- a/lib/coproc.h +++ b/lib/coproc.h @@ -71,6 +71,7 @@ #endif #include "miofile.h" +#include "error_numbers.h" #include "parse.h" #include "cal_boinc.h" #include "cl_boinc.h" @@ -391,6 +392,7 @@ struct COPROCS { return (ati.count > 0); } int add(COPROC& c) { + if (n_rsc >= MAX_RSC) return ERR_BUFFER_OVERFLOW; coprocs[n_rsc++] = c; return 0; } diff --git a/samples/client_state_save.xml b/samples/client_state_save.xml index d7498f6c39..4725812cc0 100644 --- a/samples/client_state_save.xml +++ b/samples/client_state_save.xml @@ -28,7 +28,6 @@ output.txt - 1e6 diff --git a/sched/sched_send.cpp b/sched/sched_send.cpp index db504beb39..b79549dad2 100644 --- a/sched/sched_send.cpp +++ b/sched/sched_send.cpp @@ -1055,13 +1055,13 @@ bool work_needed(bool locality_sched) { } #endif if (g_wreq->rsc_spec_request) { - if (g_wreq->need_cpu()) { + if (g_wreq->need_cpu() && ssp->have_cpu_apps) { return true; } - if (g_wreq->need_cuda()) { + if (g_wreq->need_cuda() && ssp->have_cuda_apps) { return true; } - if (g_wreq->need_ati()) { + if (g_wreq->need_ati() && ssp->have_ati_apps) { return true; } } else {