Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
svn path=/trunk/boinc/; revision=3406
  • Loading branch information
davidpanderson committed May 19, 2004
1 parent ac8c13f commit 1c30f40
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 44 deletions.
11 changes: 11 additions & 0 deletions checkin_notes
Original file line number Diff line number Diff line change
Expand Up @@ -12409,3 +12409,14 @@ David May 19 2004

sched/
handle_request.C

David May 19 2004
- Changed dhry/whetstone to use fixed # of iterations instead
of dynamically adapting.
This hopefully will make multiple CPUs run more in lockstep

client
cpu_benchmark.h
cs_benchmark.C
dhrystone.C
whetstone.C
4 changes: 2 additions & 2 deletions client/cpu_benchmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ extern int run_mem_bandwidth_test(double num_secs, double &bytes_per_sec);
extern int set_benchmark_timer(double num_secs);
extern int destroy_benchmark_timer();

extern void dhrystone(double min_time, double& dps, double& vax_mips);
extern void whetstone(double min_time, double& flops);
extern void dhrystone(double& dps, double& vax_mips);
extern void whetstone(double& flops);
4 changes: 2 additions & 2 deletions client/cs_benchmark.C
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ int cpu_benchmarks(BENCHMARK_DESC* bdp) {
double x, y;

host_info.clear_host_info();
whetstone(3.0, host_info.p_fpops);
dhrystone(3.0, x, y);
whetstone(host_info.p_fpops);
dhrystone(x, y);
host_info.p_iops = y*1e6;
host_info.p_membw = 1e9;
//host_info.p_fpop_err = run_double_prec_test(fpop_test_secs, host_info.p_fpops);
Expand Down
38 changes: 5 additions & 33 deletions client/dhrystone.C
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ int getinput = 1;


void dhrystone(
double min_time,
double& Dhrystones_Per_Second, double& Vax_Mips
){
OneToFifty IntLoc1;
Expand All @@ -233,8 +232,6 @@ void dhrystone(

register unsigned long i;

int count = 10;


/***********************************************************************
* Change for compiler and optimisation used *
Expand All @@ -251,13 +248,10 @@ void dhrystone(

//printf ("Dhrystone Benchmark, Version 1.1 (Language: C or C++)\n");

Loops = 5000;
Loops = 16000000; // determines runtime

do
{

Loops = Loops * 2;
count = count - 1;
Array2Glob[8][7] = 10;

/*****************
Expand Down Expand Up @@ -299,32 +293,10 @@ void dhrystone(
benchtime = dtime() - startclock;

//printf ("%12.0f runs %6.2f seconds \n",(double) Loops, benchtime);
if (benchtime > min_time)
{
count = 0;
}
else
{
if (benchtime < 0.1)
{
Loops = Loops * 5;
}
}
} /* calibrate/run do while */
while (count >0);

for (i = 0; i < Loops; ++i)
{
count = count +1;
}

#if 0
printf ("Array2Glob8/7: ");
if (Array2Glob[8][7] == count + 10)
printf ("O.K. ");
else printf ("WRONG ");
printf ("%12.0f\n", (double) Array2Glob[8][7]);
#endif

}
while (0);

Dhrystones_Per_Second = (double) Loops / benchtime;
Vax_Mips = Dhrystones_Per_Second / 1757.0;
#if 0
Expand Down
9 changes: 2 additions & 7 deletions client/whetstone.C
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void P3(double X, double Y, double *Z);
double T,T1,T2,E1[5];
int J,K,L;

void whetstone(double min_time, double& flops) {
void whetstone(double& flops) {

/* used in the FORTRAN version */
long I;
Expand All @@ -104,9 +104,8 @@ void whetstone(double min_time, double& flops) {
double startsec, finisec;
double KIPS;

II = 1;
II = 32;

restart:
loopstart = 1000; /* see the note about LOOP below */
/*
C
Expand Down Expand Up @@ -323,10 +322,6 @@ C
C where TIME is in seconds.
C--------------------------------------------------------------------
*/
if (finisec-startsec <= min_time) {
II *= 2;
goto restart;
}

#if 0
printf("Loops: %ld, Iterations: %d, Duration: %f sec.\n",
Expand Down

0 comments on commit 1c30f40

Please sign in to comment.