From 3bbb17f117e8facc76c1ee8b64b4740c8bf612a1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 12 Jun 2007 17:28:08 +0000 Subject: [PATCH] - client: when I changed the length of benchmark intervals from 20 to 10 seconds, this broke things on ultra-slow CPUs. I think this is because a single loop of the FP benchmark took so long that the end time of the int benchmark had already come and gone. Fixed this (I hope) by reducing the loop length by a factor of 10. client/ cs_benchmark.C dhrystone.C whetstone.C svn path=/trunk/boinc/; revision=12908 --- checkin_notes | 14 ++++++++++++++ client/cs_benchmark.C | 4 ++-- client/dhrystone.C | 4 +++- client/whetstone.C | 5 +++-- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/checkin_notes b/checkin_notes index 321ae9d3c9..eb54a94a5f 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6123,3 +6123,17 @@ David 12 June 2007 client/ client_state.C cs_statefile.C + +David 12 June 2007 + - client: when I changed the length of benchmark intervals + from 20 to 10 seconds, this broke things on ultra-slow CPUs. + I think this is because a single loop of the FP + benchmark took so long that the end time of the int + benchmark had already come and gone. + Fixed this (I hope) by reducing the loop length + by a factor of 10. + + client/ + cs_benchmark.C + dhrystone.C + whetstone.C diff --git a/client/cs_benchmark.C b/client/cs_benchmark.C index a007167f10..f55e7c5935 100644 --- a/client/cs_benchmark.C +++ b/client/cs_benchmark.C @@ -19,8 +19,8 @@ // Manage a (perhaps multi-processor) benchmark. // Because of hyperthreaded CPUs we can't just benchmark 1 CPU; -// we have to run parallel benchmarks, -// and we have to ensure that they run more or less concurrently. +// we must run parallel benchmarks +// and ensure that they run more or less concurrently. // Here's our scheme: // - the main program forks N benchmarks threads or processes // - after FP_START seconds it creates a file "do_fp" diff --git a/client/dhrystone.C b/client/dhrystone.C index 91bdf33134..7f67d44206 100644 --- a/client/dhrystone.C +++ b/client/dhrystone.C @@ -109,7 +109,9 @@ void dhrystone( Arr_2_Glob [8][7] = 10; - Loops = 160000; // determines runtime + Loops = 16000; // determines runtime + // This must be small enough that, on the slowest CPU, + // one loop completes within 10 seconds. benchmark_wait_to_start(BM_TYPE_INT); diff --git a/client/whetstone.C b/client/whetstone.C index 64e382f848..146a7a7585 100644 --- a/client/whetstone.C +++ b/client/whetstone.C @@ -87,9 +87,10 @@ void whetstone(double& flops) { double startsec, finisec; double KIPS; int xtra, ii; - int x100 = 10000; // chosen to make each pass take about 1 sec + int x100 = 1000; // chosen to make each pass take about 0.1 sec // on my current computer (2.2 GHz celeron) - // Non-critical. + // This must be small enough that one loop finishes + // in 10 sec on the slowest CPU extern_array[11] = 1; benchmark_wait_to_start(BM_TYPE_FP);