[Beowulf] To the bandwidth junkies

Peter St. John peter.st.john at gmail.com
Thu Jan 29 16:35:36 PST 2009


Hakon,
>From the comment "note-- skip first iteration", I would have guessed that
avgtime[0] had been initialized with the first time (instead of zero) so
that NTIMES instead of NTIMES-1 would have been correct. Or maybe that's
just what someone was thinking when they fumbled :-) So I suggest looking at
the initialization of avgtime[], which isn't in the snippet.

But of course such a typo would account for your error, but I'd check the
initialization before changing the code.
Peter

On 1/29/09, Håkon Bugge <hbugge at platform.com> wrote:
>
> I just ran stream_omp (C code) and noticed the average timing often was
> less than minimum timing.
> Turns out, there is a bug in the code (snip from
> http://www.cs.virginia.edu/stream/FTP/Code/Versions/stream_omp.c):
>
>    for (k=1; k<NTIMES; k++) /* note -- skip first iteration */
>        {
>        for (j=0; j<4; j++)
>            {
>            avgtime[j] = avgtime[j] + times[j][k];
>
> and later:
>
>    for (j=0; j<4; j++) {
>        avgtime[j] = avgtime[j]/(double)NTIMES;
>
> Obviously, the divisor should have been (NTIMES-1).
>
>
> As a curiosity, the first time I corrected a well known and publicly used
> benchmark was in 1986,
> http://mvb.saic.com/freeware/vax88a3/rcas88/nets88/gnucbench.txt
>
> Am I getting too old for this?
>
>
>
> Thanks, Håkon
>
>
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit
> http://www.beowulf.org/mailman/listinfo/beowulf
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.scyld.com/pipermail/beowulf/attachments/20090129/abdfb8a9/attachment.html


More information about the Beowulf mailing list