From c5924b80457f948981567ae0f8c3e86921a82ea8 Mon Sep 17 00:00:00 2001 From: Eric Heien Date: Tue, 1 Jul 2003 23:16:53 +0000 Subject: [PATCH] benchmark error reporting svn path=/trunk/boinc/; revision=1632 --- client/client_state.C | 6 +++--- client/hostinfo.C | 21 +++++++++++++++++++++ client/hostinfo.h | 3 +++ sched/server_types.C | 6 ++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/client/client_state.C b/client/client_state.C index 34a40b25af..6435dc183c 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -377,7 +377,7 @@ int CLIENT_STATE::cpu_benchmarks() { fpop_test_secs ); } - run_double_prec_test(fpop_test_secs, host_info.p_fpops); + host_info.p_fpop_err = run_double_prec_test(fpop_test_secs, host_info.p_fpops); if (log_flags.measurement_debug) { printf( @@ -385,7 +385,7 @@ int CLIENT_STATE::cpu_benchmarks() { iop_test_secs ); } - run_int_test(iop_test_secs, host_info.p_iops); + host_info.p_iop_err = run_int_test(iop_test_secs, host_info.p_iops); if (log_flags.measurement_debug) { printf( @@ -393,7 +393,7 @@ int CLIENT_STATE::cpu_benchmarks() { mem_test_secs ); } - run_mem_bandwidth_test(mem_test_secs, host_info.p_membw); + host_info.p_membw_err = run_mem_bandwidth_test(mem_test_secs, host_info.p_membw); // need to check cache!! host_info.m_cache = 1e6; diff --git a/client/hostinfo.C b/client/hostinfo.C index 1b1cd311a7..1cd6b2a955 100644 --- a/client/hostinfo.C +++ b/client/hostinfo.C @@ -63,6 +63,9 @@ void clear_host_info(HOST_INFO& host) { host.p_fpops = 0; host.p_iops = 0; host.p_membw = 0; + host.p_fpop_err = 0; + host.p_iop_err = 0; + host.p_membw_err = 0; host.p_calculated = 0; strcpy(host.os_name, ""); @@ -93,6 +96,9 @@ int HOST_INFO::parse(FILE* in) { else if (parse_double(buf, "", p_fpops)) continue; else if (parse_double(buf, "", p_iops)) continue; else if (parse_double(buf, "", p_membw)) continue; + else if (parse_int(buf, "", p_fpop_err)) continue; + else if (parse_int(buf, "", p_iop_err)) continue; + else if (parse_int(buf, "", p_membw_err)) continue; else if (parse_double(buf, "", p_calculated)) continue; else if (parse_str(buf, "", os_name, sizeof(os_name))) continue; else if (parse_str(buf, "", os_version, sizeof(os_version))) continue; @@ -120,6 +126,9 @@ int HOST_INFO::write(FILE* out) { " %f\n" " %f\n" " %f\n" + " %d\n" + " %d\n" + " %d\n" " %f\n" " %s\n" " %s\n" @@ -138,6 +147,9 @@ int HOST_INFO::write(FILE* out) { p_fpops, p_iops, p_membw, + p_fpop_err, + p_iop_err, + p_membw_err, p_calculated, os_name, os_version, @@ -164,6 +176,9 @@ int HOST_INFO::parse_cpu_benchmarks(FILE* in) { else if (parse_double(buf, "", p_fpops)) continue; else if (parse_double(buf, "", p_iops)) continue; else if (parse_double(buf, "", p_membw)) continue; + else if (parse_int(buf, "", p_fpop_err)) continue; + else if (parse_int(buf, "", p_iop_err)) continue; + else if (parse_int(buf, "", p_membw_err)) continue; else if (parse_double(buf, "", p_calculated)) continue; else if (parse_double(buf, "", m_cache)) continue; else fprintf(stderr, "HOST_INFO::parse(): unrecognized: %s\n", buf); @@ -177,12 +192,18 @@ int HOST_INFO::write_cpu_benchmarks(FILE* out) { " %f\n" " %f\n" " %f\n" + " %d\n" + " %d\n" + " %d\n" " %f\n" " %f\n" "\n", p_fpops, p_iops, p_membw, + p_fpop_err, + p_iop_err, + p_membw_err, p_calculated, m_cache ); diff --git a/client/hostinfo.h b/client/hostinfo.h index 80e498ddf9..31192679ff 100644 --- a/client/hostinfo.h +++ b/client/hostinfo.h @@ -41,6 +41,9 @@ struct HOST_INFO { double p_fpops; double p_iops; double p_membw; + int p_fpop_err; + int p_iop_err; + int p_membw_err; double p_calculated; //needs to be initialized to zero char os_name[256]; diff --git a/sched/server_types.C b/sched/server_types.C index f9e14ae577..402e2dde96 100644 --- a/sched/server_types.C +++ b/sched/server_types.C @@ -309,8 +309,11 @@ int RESULT::parse_from_client(FILE* fin) { return 1; } +// TODO: put the benchmark errors into the DB +// int HOST::parse(FILE* fin) { char buf[256]; + int p_fpop_err, p_iop_err, p_membw_err; while (fgets(buf, 256, fin)) { if (match_tag(buf, "")) return 0; @@ -324,6 +327,9 @@ int HOST::parse(FILE* fin) { else if (parse_double(buf, "", p_fpops)) continue; else if (parse_double(buf, "", p_iops)) continue; else if (parse_double(buf, "", p_membw)) continue; + else if (parse_int(buf, "", p_fpop_err)) continue; + else if (parse_int(buf, "", p_iop_err)) continue; + else if (parse_int(buf, "", p_membw_err)) continue; else if (parse_double(buf, "", p_calculated)) continue; else if (parse_str(buf, "", os_name, sizeof(os_name))) continue; else if (parse_str(buf, "", os_version, sizeof(os_version))) continue;