- 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

svn path=/trunk/boinc/; revision=15423
This commit is contained in:
David Anderson 2008-06-18 16:43:05 +00:00
parent bfa6747467
commit 796a8ef835
7 changed files with 65 additions and 10 deletions

View File

@ -701,7 +701,7 @@ static void handle_process_control_msg() {
#elif defined(__APPLE__) #elif defined(__APPLE__)
PrintBacktrace(); PrintBacktrace();
#endif #endif
exit_from_timer_thread(EXIT_ABORTED_VIA_GUI); exit_from_timer_thread(EXIT_ABORTED_BY_CLIENT);
} }
} }
if (match_tag(buf, "<reread_app_info/>")) { if (match_tag(buf, "<reread_app_info/>")) {

View File

@ -4902,3 +4902,20 @@ David 17 June 2008
boinc_db.inc boinc_db.inc
bossa_db.inc bossa_db.inc
util.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

View File

@ -447,7 +447,7 @@ bool CLIENT_STATE::cpu_benchmarks_poll() {
} }
ndone++; ndone++;
if (benchmark_descs[i].error) { 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; had_error = true;
} }
} }
@ -460,7 +460,6 @@ bool CLIENT_STATE::cpu_benchmarks_poll() {
if (ndone == bm_ncpus) { if (ndone == bm_ncpus) {
double old_p_fpops = host_info.p_fpops; double old_p_fpops = host_info.p_fpops;
if (had_error) { if (had_error) {
msg_printf(NULL, MSG_INTERNAL_ERROR, "CPU benchmarks error");
cpu_benchmarks_set_defaults(); cpu_benchmarks_set_defaults();
} else { } else {
double p_fpops = 0; double p_fpops = 0;

View File

@ -15,10 +15,47 @@ function show_results() {
} }
if (get_str('submit', true)) { //if (get_str('submit', true)) {
show_results(); // show_results();
} else { //} else {
show_form(); // 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";
?> ?>

View File

@ -27,7 +27,8 @@
#define EXIT_STATEFILE_WRITE 192 #define EXIT_STATEFILE_WRITE 192
#define EXIT_SIGNAL 193 #define EXIT_SIGNAL 193
#define EXIT_ABORTED_VIA_GUI 194 #define EXIT_ABORTED_BY_CLIENT 194
#define EXIT_CHILD_FAILED 195
// Function return values. // Function return values.
// NOTE: add new errors to the end of the list and don't change // 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_BAD_FILENAME -225
#define ERR_TOO_MANY_EXITS -226 #define ERR_TOO_MANY_EXITS -226
#define ERR_RMDIR -227 #define ERR_RMDIR -227
#define ERR_CHILD_FAILED -228
#define ERR_SYMLINK -229 #define ERR_SYMLINK -229
#define ERR_DB_CONN_LOST -230 #define ERR_DB_CONN_LOST -230

View File

@ -735,6 +735,8 @@ const char* boincerror(int which_error) {
case ERR_BAD_FILENAME: return "file name is empty or has '..'"; case ERR_BAD_FILENAME: return "file name is empty or has '..'";
case ERR_TOO_MANY_EXITS: return "application exited too many times"; case ERR_TOO_MANY_EXITS: return "application exited too many times";
case ERR_RMDIR: return "rmdir() failed"; 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 404: return "HTTP file not found";
case 407: return "HTTP proxy authentication failure"; case 407: return "HTTP proxy authentication failure";
case 416: return "HTTP range request error"; case 416: return "HTTP range request error";

View File

@ -522,7 +522,7 @@ static inline int check_bandwidth(
// if n_bwdown is zero, the host has never downloaded anything, // if n_bwdown is zero, the host has never downloaded anything,
// so skip this check // 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; double diff = wu.rsc_bandwidth_bound - reply.host.n_bwdown;
if (diff > 0) { if (diff > 0) {