I don't know if anyone uses the stream_d.c version of the stream
benchmark, but I noticed there was a large variation in the timings
when I ran it. It turns out that the timing routine has what I presume
is a bug. I've commented out (with 'why???') the extra bit of code
that was causing problems.
float utime() {
struct timeval tv;
struct timezone tz;
float utime;
gettimeofday(&tv,&tz);
utime = 1e6 * (tv.tv_sec - tvStart.tv_sec) + tv.tv_usec - tvStart.tv_usec;
/* why???
if (tv.tv_usec < tvStart.tv_usec)
utime += 1e6;
*/
return utime;
}
Note that this had no impact on the results (for me), since there was
always at least one iteration for which the 'if' wasn't triggered and
the bandwidth results are based on the minimum time. Also note that
this bug does not appear in any of the other Fortran or C versions.
ben
-- Ben Gamsa ben@sys.toronto.edu - http://www.eecg.toronto.edu/~ben Dept. of C.S., University of Toronto, Toronto, Ont. CANADA, M5S 1A4
This archive was generated by hypermail 2b29 : Tue Apr 18 2000 - 05:23:04 CDT