public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/32057] Random failure on gfortran.dg/secnds.f
Date: Wed, 23 May 2007 14:35:00 -0000	[thread overview]
Message-ID: <20070523143455.10593.qmail@sourceware.org> (raw)
In-Reply-To: <bug-32057-682@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from dominiq at lps dot ens dot fr  2007-05-23 15:34 -------
> I assume the dummy loop is used for delay. I don't think it is that reliable.

I think you are right about the delay, but not about the real problem: you have
the same with secnds-1.f which does not cantain the loop. The goal of the tests
is not to measure some time, but to check that intervals are properly ordered,
i.e., t1<=dat1<=t1a and t2a<=dat2-dat1<= t2.

I have started to investigate the problem, see the thread:

http://gcc.gnu.org/ml/fortran/2007-05/msg00216.html

I have started to prepare a report of my findings, but I got distracted because
gcc is no longer building on Darwin. 

The main cause of failures is because the tests do not account for round off
errors.  This can easily handled for first test by comparing to the nearest
values from below and above: the failure rate seems below a couple ppb (part
per billion) measured on secnds-1.f, using a naive way to measure it. I think
this is due to the fact that t1 and t1a are absolute times.  For the second
test I had to use wider tolerances (such as spacing(24.0*3600.0)) and even so I
get some errors on Pentium machines ~1/10000.

After having removed this main source of failure I have found three more:
(1) the tests do not handle timing around midnight when the counts go from
86400.0 to 0.0,
(2) there is a rounding problem in secnds such that secnds(86400.0) returns
86400.0 during the 3ms before midnight,
(3) on some machine the clock synchronization put the tests in jeopardy when
the clock has a negative "lag": the value returned "after" is before the value
returned "before"! I think this is a detectable but unrecoverable error and,
when detected, the tests should be skipped and repeated.  I have a fix for the
two other cases, although (2) should probably handled at the secnds level.

In top of the report, I have started to prepare a program to do some testing on
platforms I have no access to (I have used PPC Darwin, and AMD64 and Pentium
Linux). I was planning to join it to the report (Encouragements are welcome !-)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32057


  reply	other threads:[~2007-05-23 14:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-23 13:52 [Bug testsuite/32057] New: " hjl at lucon dot org
2007-05-23 14:35 ` dominiq at lps dot ens dot fr [this message]
2007-05-23 15:06 ` [Bug testsuite/32057] " kargl at gcc dot gnu dot org
2007-05-28 19:53 ` dominiq at lps dot ens dot fr
2007-05-28 22:15 ` tkoenig at gcc dot gnu dot org
2007-05-29 20:25 ` dominiq at lps dot ens dot fr
2007-05-30  2:10 ` jvdelisle at gcc dot gnu dot org
2007-05-30  3:37 ` jvdelisle at gcc dot gnu dot org
2007-05-30 21:35 ` dominiq at lps dot ens dot fr
2007-06-03 17:07 ` pinskia at gcc dot gnu dot org
2007-06-04  8:37 ` pinskia at gcc dot gnu dot org
2007-06-04 16:11 ` pinskia at gcc dot gnu dot org
2007-06-06  0:54 ` jvdelisle at gcc dot gnu dot org
2007-06-06  1:26 ` jvdelisle at gcc dot gnu dot org
2007-06-19 17:11 ` rob1weld at aol dot com
2007-06-20 22:33 ` rob1weld at aol dot com
2007-06-21  1:06 ` jvdelisle at gcc dot gnu dot org
2007-06-25  3:03 ` jvdelisle at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070523143455.10593.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).