This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Two glitches while testing gcc version 4.3.0 20070216


Steve Kargl wrote:
On Sat, Feb 17, 2007 at 12:12:36PM -0800, Brooks Moses wrote:
Steve Kargl wrote:
It's simply a timing problem.  secnds.exe is trying to make a timing
measurement and the tolerance is IMHO too strict.
Theoretically, though, the patch he's referring to (which I put in) should have fixed that problem, by eliminating tolerances -- it calls SECNDS, calls DATEANDTIME, and calls SECNDS again, and checks that the DATEANDTIME value is between the two SECNDS values. So it shouldn't be doing that any more.


I'm not convinced. :)


However, after submitting the patch, I did discover with my "instrumented" version of the testcase that it will very occasionally still fail; the intermediate DATEANDTIME result was 40ms ahead of the first SECNDS result, but the SECNDS result was only 20ms ahead. Since it's never happened again for me, I haven't looked closer to see if there's a "real" reason for it, but my guess is that it's a rounding issue.

You can make 3 system calls in less than 20 ms, and we're rounding to ms resolution.

Maybe I should put a loop into the testcase to run it two or three times and only abort if all of the passes fail.

Yep. The old-time spin loop.


For the fun of it: secnds-1.f

I put the tests in a do loop. The numbers below represent how many passes through before a failure (abort).

4060 76 3163 530 2489 3103 2971 1641 62 2913 310 974 3690 214 3456 1665 1161

4709 1539 1817 196 635 1005 31 1009 189 1708 367 224 1036 189 1155 1657 471

128 15 2567 18 1145 318 754

Looks kind of random. :)

Jerry




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]