diff --git a/api/boinc_api.C b/api/boinc_api.C index 5b8770047f..fe4e48086c 100644 --- a/api/boinc_api.C +++ b/api/boinc_api.C @@ -701,7 +701,7 @@ static void handle_process_control_msg() { #elif defined(__APPLE__) PrintBacktrace(); #endif - exit_from_timer_thread(EXIT_ABORTED_VIA_GUI); + exit_from_timer_thread(EXIT_ABORTED_BY_CLIENT); } } if (match_tag(buf, "")) { diff --git a/checkin_notes b/checkin_notes index 0fae8b6845..2b5fe2632f 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4902,3 +4902,20 @@ David 17 June 2008 boinc_db.inc bossa_db.inc util.inc + +David 18 June 2008 + - change EXIT_ABORTED_VIA_GUI to EXIT_ABORTED_BY_CLIENT + - change ERR_CHILD_FAILED TO EXIT_CHILD_FAILED + (it's an exit code, not a function error code) + - client: reduce severity of benchmark error + - scheduler: compile fix + + api/ + boinc_api.C + client/ + cs_benchmark.C + lib/ + str_util.C + error_numbers.h + sched/ + sched_send.C diff --git a/client/cs_benchmark.C b/client/cs_benchmark.C index 95939ed1db..530a113c86 100644 --- a/client/cs_benchmark.C +++ b/client/cs_benchmark.C @@ -447,7 +447,7 @@ bool CLIENT_STATE::cpu_benchmarks_poll() { } ndone++; if (benchmark_descs[i].error) { - msg_printf(0, MSG_INTERNAL_ERROR, benchmark_descs[i].error_str); + msg_printf(0, MSG_INFO, benchmark_descs[i].error_str); had_error = true; } } @@ -460,7 +460,6 @@ bool CLIENT_STATE::cpu_benchmarks_poll() { if (ndone == bm_ncpus) { double old_p_fpops = host_info.p_fpops; if (had_error) { - msg_printf(NULL, MSG_INTERNAL_ERROR, "CPU benchmarks error"); cpu_benchmarks_set_defaults(); } else { double p_fpops = 0; diff --git a/html/user/bolt_compare.php b/html/user/bolt_compare.php index fc796d823a..8c308fdf23 100644 --- a/html/user/bolt_compare.php +++ b/html/user/bolt_compare.php @@ -15,10 +15,47 @@ function show_results() { } -if (get_str('submit', true)) { - show_results(); -} else { - show_form(); +//if (get_str('submit', true)) { +// show_results(); +//} else { +// show_form(); +//} + +// compute the mean and stdev of an array +// +function mean_stdev($array, &$mean, &$stdev) { + $n = 0; + $m = 0; + $m2 = 0; + + foreach ($array as $x) { + $n++; + $delta = $x - $m; + $m += $delta/$n; + $m2 += $delta*($x-$m); + } + $mean = $m; + $stdev = sqrt($m2/($n-1)); } +// approximate the 90% confidence interval for the mean of an array +// +function conf_int_90($array, &$lo, &$hi) { + $n = count($array); + mean_stdev($array, $mean, $stdev); + + // I'm too lazy to compute the t distribution + $t_90 = 1.7; + $d = $t_90 * $stdev / sqrt($n); + $lo = $mean - $d; + $hi = $mean + $d; +} + +$a = array(1,1,1,1,0,1,1,1,3, 1, 1, 1, 1); +//mean_stdev($a, $mean, $stdev); +//echo "mean: $mean stdev: $stdev\n"; + +conf_int_90($a, $lo, $hi); +echo "lo $lo hi $hi\n"; + ?> diff --git a/lib/error_numbers.h b/lib/error_numbers.h index 1175d6c9f7..1d9a26ed6a 100644 --- a/lib/error_numbers.h +++ b/lib/error_numbers.h @@ -27,7 +27,8 @@ #define EXIT_STATEFILE_WRITE 192 #define EXIT_SIGNAL 193 -#define EXIT_ABORTED_VIA_GUI 194 +#define EXIT_ABORTED_BY_CLIENT 194 +#define EXIT_CHILD_FAILED 195 // Function return values. // NOTE: add new errors to the end of the list and don't change @@ -184,7 +185,6 @@ #define ERR_BAD_FILENAME -225 #define ERR_TOO_MANY_EXITS -226 #define ERR_RMDIR -227 -#define ERR_CHILD_FAILED -228 #define ERR_SYMLINK -229 #define ERR_DB_CONN_LOST -230 diff --git a/lib/str_util.C b/lib/str_util.C index ccd01f5f32..047553b194 100644 --- a/lib/str_util.C +++ b/lib/str_util.C @@ -735,6 +735,8 @@ const char* boincerror(int which_error) { case ERR_BAD_FILENAME: return "file name is empty or has '..'"; case ERR_TOO_MANY_EXITS: return "application exited too many times"; case ERR_RMDIR: return "rmdir() failed"; + case ERR_SYMLINK: return "symlink() failed"; + case ERR_DB_CONN_LOST: return "DB connection lost during enumeration"; case 404: return "HTTP file not found"; case 407: return "HTTP proxy authentication failure"; case 416: return "HTTP range request error"; diff --git a/sched/sched_send.C b/sched/sched_send.C index d915c503a0..1d54e620f5 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -522,7 +522,7 @@ static inline int check_bandwidth( // if n_bwdown is zero, the host has never downloaded anything, // so skip this check // - if (host.n_bwdown == 0) return 0; + if (reply.host.n_bwdown == 0) return 0; double diff = wu.rsc_bandwidth_bound - reply.host.n_bwdown; if (diff > 0) {