From: "Dr. David Kirkby" <drkirkby@ntlworld.com>
Subject: Re: Free UNIX for non-commerical use.
Date: Sun, 03 Aug 2003 11:15:41 +0100 [thread overview]
Message-ID: <3F2CE0CD.F7F6E3BF@ntlworld.com> (raw)
In-Reply-To: bghlv4$hpc$01$1@news.t-online.com
Uli Link wrote:
> > Automated testing can do a lot to help this.
>
> Agree. Let's take a closer look.
>
> > In an application I wrote,
> > http://atlc.sourceforge.net/
> > a number of programs are used to automatically generate bitmaps. The
> > md5 checksums of those bitmaps are then compared to what's expected.
> >
>
> That's even closer.
I think that is pretty close, given that
a) I can visually check any bitmap at this point - they are simple,
consisting of at most 3 colours, with straight lines or circles.
b) Using Gimp to measure distances/diameters, makes it possible to
ensure the bitmaps are what's expected. Sure, Gimp has bugs, but the
chances of measuring a diameter in Gimp and it agreeing with what I
expect, means its highly likely there no errors.
The 1st, 3rd and 4th examples here
http://atlc.sourceforge.net/
show the sort of thing I generate.
So then I generate an md5 checksum of those. That's the easy bit.
> > Once the bitmaps are generated, another floating point intensive
> > program performs a numerically intensive finite difference computation
> > on these bitmaps, generating some answers as text and some more
> > bitmaps. The numerical answers are checked against those expected. The
> > md5 checksums of the bitmaps are checked against those expected.
> >
> > When I say against 'what is expected' I'm comparing the results on a
> > number of platforms, running a number of different operating systems
> > using a number of different compilers at a number of different
> > optimisation levels.
>
> Sounds like many, many hours of hard work needed before you know what is
> expected.
Yes, it is. I have probably spent 10x longer verifying the code than
writing it! Of course while verifying it, bugs became appernt, so the
two work in parallel to a certain extent.
But one needs check carefully numerical/scientific programs as it's
easy to generate data that is wrong and you not know it. I know of a
student who was asked to re-submit his PhD after testing his code - he
never re-submitted.
If you build a word processor and it has a bug, it usually becomes
very apparent. Do the same for a numerical simulation and it's often
not the case. So careful testing is really important.
I should have said I don't make a conserted effort to check the effect
of optimistation on other than SPARC. If someone runs it on another
platform and the results differ, then its up to them to play with the
optimisation. But I verify the code passes all tests on all platforms
I can. That has spotted a bug that was only apparent on 64-bit
platforms and another only apperent when the default char was
unsigned.
First I set up some test cases, where exact analytical results can be
computed - see
http://atlc.sourceforge.net/accuracy.html
if interested.
If the numerical results of the program are close to the exact
analytical results (1% errors are more than acceptable here. Better
accuracy takes more CPU time, and is of no practical use.)
So that allows me to check the numerical results. So I generate
checksums for the important numerical results.
The bitmaps generated here are less important, as they are only for
visual inspection. They don't contain any scientifically accurate
information. Binary data is written to contain accurate data. Testing
that is more of a problem, and one I've not fully addressed.
Once the bitmaps are generated, I generate checksums on a SPARC. Then
test on other systems to see if the checksums agree. When they don't,
I verify the the data is not too far off. In each case, only one pixel
has been affected, so its easy to accept 2 different checksums.
Obviously if there were lots, this would be impossible.
> The other way round: expect _and_ accept insignificant differences. This
> means defining borders within a result is accepted.
Sort of. But by printing data to 4 significant figures with printf,
that is quite easily. For the bitmaps, I need a bit more work.
> Real problem are often more complex as at a first thought. Needs a lot of
> investigation finding bitmaps similar but you cannot easy compare by
> checksum. I know a lot of programmers avoiding floating point arithmetics
> for much easier getting exact measurable results.
>
Fixed point is fine, but in my case not practical.
> > However, it is easy to not think to write a specific test - only after
> > you found a bug and realised my tests don't check for that problem. So
> > I add a test to the testsuite.
>
> Every engineer must lern to check the fault bandwith together with the
> measured results.
True. But sometimes you don't easily realise the fault bandwidth, or
know it is too large. If a program has 10 command line options, its
easy to check those 10 in isolation. More difficult to test all 2^10
possible combinations.
> It is impossible the prove a non-trivial programm as fault free, if built by
> faulty compilers, complex programming languages, and libs by human.
True, but by careful testing on one platform and checking the results
on others don't differ significantly, one has a high degree of
confidence in the results.
> To my expierience the greatest problem in software projects is, that there
> are no expected results specified, before delivery to test.
I avoid that. I can compute analytical results in some case, as
described at
http://atlc.sourceforge.net/accuracy.html
So many tests are against these analytical results.
> All this is complex enough with a single thread, and then you will need to
> test with mass data for deadlocks between threads.
One of the issues I came across was when using different algorithms
for single and multi-threaded cases. The multi-threaded case would
always converge to a very slightly different result. Not much, perhaps
0.001%, but when that happens on a lots of tests, it makes testing
impossible. The other issue was the results on multi-threaded case
depended on the number of threads run. Again, very small, but it would
have made sensible testing impossible, when numerous pixels in
numerous bitmaps would depend on how many CPUs the system had.
Hence I changed the algorithm to one where the results are entirely
identical on single-threaded and multi-threaded and the results are
independent of the number of threads run. I loose a bit of speed
because of this, but its the only way to make testing practical.
> Don't believe in missile guidance systems or a recent
> upperclass automobile, not even those from Germany.
> Too much secrets and too much political-strategic-struggles concerning
> individuals career to give quality a chance. And (too much)
> formalism _can_
> kill the individuals responsibility for the quality of its work.
> The absence of those factors is perhaps the greatest influence on the
> quality of open source development.
I can believe that, although I've never worked in such an environment,
I have no experience of it.
--
Dr. David Kirkby,
Senior Research Fellow,
Department of Medical Physics,
University College London,
11-20 Capper St, London, WC1E 6JA.
Tel: 020 7679 6408 Fax: 020 7679 6269
Internal telephone: ext 46408
e-mail davek@medphys.ucl.ac.uk
next prev parent reply other threads:[~2003-08-03 10:15 UTC|newest]
Thread overview: 290+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-27 2:44 Free UNIX for non-commerical use Dr. David Kirkby
2003-07-27 3:16 ` Dave Uhring
2003-07-27 5:53 ` Anthony Mandic
2003-07-27 8:41 ` Volker Borchert
2003-07-27 9:48 ` Anthony Mandic
2003-07-27 10:21 ` James Wilson
2003-07-28 10:48 ` Jonathan
2003-07-28 12:37 ` Dr. David Kirkby
2003-07-28 13:28 ` Uli Link
2003-07-28 16:03 ` Greg Menke
2003-07-28 17:39 ` Douglas Siebert
2003-08-02 17:35 ` Uli Link
2003-08-02 22:12 ` Dr. David Kirkby
2003-08-03 0:45 ` Uli Link
2003-08-03 10:15 ` Dr. David Kirkby [this message]
2003-08-04 19:05 ` Bob Jenkins
2003-07-28 22:39 ` Uli Link
2003-07-29 0:58 ` mike
2003-07-29 1:10 ` Greg Menke
2003-07-29 10:08 ` Uli Link
2003-07-29 1:59 ` Dr. David Kirkby
2003-07-29 9:01 ` Andrew Gabriel
2003-07-29 9:29 ` Alexis Cousein
2003-07-29 12:31 ` Jamie Bowden
2003-07-29 12:56 ` Jay Maynard
2003-07-29 23:00 ` Joerg Schilling
2003-07-30 0:14 ` Jay Maynard
2003-07-30 9:04 ` Joerg Schilling
2003-07-30 19:22 ` Peter da Silva
2003-07-31 12:52 ` Dr. David Kirkby
2003-07-31 21:16 ` Chris Quayle
2003-08-09 14:36 ` Peter da Silva
2003-07-28 11:40 ` Paul Repacholi
2003-07-27 18:24 ` Dr. David Kirkby
2003-07-27 10:02 ` Yuan
2003-07-27 10:23 ` Anthony Mandic
2003-07-27 11:32 ` Yuan
2003-07-27 12:07 ` Anthony Mandic
2003-07-27 15:13 ` Thomas Dickey
2003-07-27 16:57 ` <<>>
2003-07-27 18:23 ` Yuan
2003-07-27 22:15 ` Bob Hoekstra
2003-07-28 1:23 ` Yuan
2003-07-28 1:57 ` Cameron Laird
2003-07-29 21:46 ` John D Groenveld
2003-08-03 14:54 ` Glenn
2003-08-03 22:59 ` Dr. David Kirkby
2003-08-04 10:35 ` Frank Arnold
2003-08-04 10:36 ` Frank Arnold
2003-07-27 12:38 ` Dr. David Kirkby
2003-07-27 12:50 ` Kjetil Torgrim Homme
2003-07-27 17:51 ` Bob Hoekstra
2003-07-27 22:44 ` Kjetil Torgrim Homme
2003-07-27 23:05 ` Bob Hoekstra
2003-07-27 18:28 ` Yuan
2003-07-28 11:36 ` Paul Repacholi
2003-07-28 18:59 ` Kjetil Torgrim Homme
2003-07-29 16:12 ` John D Groenveld
2003-07-30 16:44 ` Kjetil Torgrim Homme
2003-07-30 18:50 ` John D Groenveld
2003-07-27 11:59 ` Dr. David Kirkby
2003-07-27 12:23 ` Anthony Mandic
2003-07-29 22:30 ` John D Groenveld
2003-07-29 23:08 ` Dr. David Kirkby
2003-07-29 23:12 ` Dr. David Kirkby
2003-07-28 17:27 ` Bill Gunshannon
2003-07-28 20:22 ` Thomas Dehn
2003-07-29 12:34 ` Bill Gunshannon
2003-07-29 22:02 ` John D Groenveld
2003-07-27 8:13 ` Doug Dingus
2003-07-27 9:51 ` Anthony Mandic
2003-07-27 18:52 ` Bob Hoekstra
2003-07-27 22:28 ` Dr. David Kirkby
2003-07-27 23:13 ` Bob Hoekstra
2003-07-27 23:44 ` Dr. David Kirkby
2003-07-28 0:06 ` Bob Hoekstra
2003-07-28 9:59 ` Casper H.S. Dik
2003-07-28 1:36 ` Anthony Mandic
2003-07-28 16:00 ` Lord Isildur
2003-07-28 16:33 ` Dennis Clarke
2003-07-28 21:43 ` Ken Farmer
2003-08-02 20:11 ` Glenn
2003-08-03 15:18 ` David J. Dachtera
2003-08-02 6:56 ` Anthony Mandic
2003-08-02 8:18 ` Per Ekman
2003-08-02 8:52 ` Tony 'Nicoya' Mantler
2003-07-28 20:18 ` Bob Hoekstra
2003-07-29 0:14 ` Dr. David Kirkby
2003-08-01 15:02 ` Anthony Mandic
2003-07-27 19:27 ` Doug Dingus
2003-07-28 1:28 ` Anthony Mandic
2003-07-28 6:51 ` Doug Dingus
2003-08-02 9:03 ` Anthony Mandic
2003-08-07 22:14 ` Doug Dingus
2003-08-08 1:52 ` Dr. David Kirkby
2003-08-08 5:51 ` Tony 'Nicoya' Mantler
2003-08-08 8:27 ` Ken Green
2003-08-08 9:37 ` Dr. David Kirkby
2003-08-08 13:05 ` Joerg Schilling
2003-08-08 18:00 ` Tony 'Nicoya' Mantler
2003-08-08 19:57 ` Dr. David Kirkby
2003-08-08 20:21 ` Tony 'Nicoya' Mantler
2003-08-08 21:51 ` Peter da Silva
2003-08-08 23:40 ` Dr. David Kirkby
2003-08-09 0:06 ` Alan Johnson
2003-08-09 0:02 ` Tony 'Nicoya' Mantler
2003-08-09 0:06 ` Alan Johnson
2003-08-09 14:01 ` Peter da Silva
2003-08-09 18:31 ` Tony 'Nicoya' Mantler
2003-08-09 22:04 ` Peter da Silva
2003-08-10 3:41 ` Richard Tomkins
2003-08-09 0:06 ` Alan Johnson
2003-08-09 4:20 ` Jack Hamilton
2003-08-09 10:16 ` Anthony Mandic
2003-08-09 13:04 ` Vu
2003-08-09 14:03 ` Peter da Silva
2003-08-09 15:03 ` Uli Link
2003-08-08 23:11 ` Dr. David Kirkby
2003-08-08 21:27 ` Rich Teer
2003-08-09 0:06 ` Alan Johnson
2003-08-09 1:14 ` Rich Teer
2003-08-09 16:55 ` Alan Johnson
2003-08-09 22:06 ` Peter da Silva
2003-08-10 13:59 ` Vu
2003-08-08 21:47 ` Peter da Silva
2003-08-08 21:35 ` Peter da Silva
2003-08-08 7:04 ` Doug Dingus
2003-08-08 10:37 ` Dr. David Kirkby
2003-08-08 3:03 ` Anthony Mandic
2003-08-08 17:13 ` Doug Dingus
2003-08-09 2:41 ` Anthony Mandic
2003-08-09 5:15 ` Doug Dingus
2003-08-09 10:18 ` Anthony Mandic
2003-08-09 13:15 ` Vu
2003-08-09 16:22 ` Rich Teer
2003-08-09 16:51 ` Greg Menke
2003-08-09 21:57 ` Peter da Silva
2003-08-09 22:30 ` Greg Menke
2003-08-10 2:23 ` Peter da Silva
2003-08-10 5:34 ` Tony 'Nicoya' Mantler
2003-08-11 15:03 ` Chris Mattern
2003-08-11 15:58 ` Peter da Silva
2003-08-12 19:07 ` Rich Teer
2003-08-12 19:48 ` Chris Mattern
2003-08-13 7:32 ` Ken Green
2003-08-13 8:07 ` Mikko Nahkola
2003-08-14 1:23 ` Peter da Silva
2003-08-14 7:51 ` Mikko Nahkola
2003-08-14 18:33 ` Peter da Silva
2003-08-11 17:50 ` Greg Menke
2003-08-12 8:51 ` Mikko Nahkola
2003-08-12 12:19 ` Greg Menke
2003-08-12 12:30 ` Dr. David Kirkby
2003-08-12 13:06 ` Dave Uhring
2003-08-12 18:22 ` mike
2003-08-13 9:34 ` Beardy
2003-08-12 13:50 ` Peter da Silva
2003-08-12 18:56 ` Avi Bercovich
2003-08-13 3:15 ` Peter da Silva
2003-08-12 14:33 ` Greg Menke
2003-08-12 22:05 ` Staffan Thomen
2003-08-13 0:12 ` Greg Menke
2003-08-13 8:07 ` Mikko Nahkola
2003-08-12 13:56 ` Anthony Mandic
2003-08-12 14:40 ` Greg Menke
2003-08-13 3:22 ` Peter da Silva
2003-08-13 11:33 ` Greg Menke
2003-08-13 4:09 ` Anthony Mandic
2003-08-09 22:54 ` Jay Maynard
2003-08-10 2:24 ` Peter da Silva
2003-08-10 3:31 ` Richard Tomkins
2003-08-10 10:24 ` Peter da Silva
2003-08-10 14:26 ` Jay Maynard
2003-08-10 14:32 ` Peter da Silva
2003-08-10 4:01 ` Anthony Mandic
2003-08-10 14:07 ` Vu
2003-08-10 14:12 ` Anthony Mandic
2003-08-11 12:32 ` mike
2003-08-12 8:34 ` Anthony Mandic
2003-08-12 22:21 ` Staffan Thomen
2003-07-28 11:25 ` Paul Repacholi
2003-07-28 15:14 ` Lord Isildur
2003-07-30 6:33 ` Doug Dingus
2003-07-27 8:46 ` Uli Link
2003-07-27 12:17 ` Dr. David Kirkby
2003-07-27 13:18 ` Uli Link
2003-07-27 22:07 ` Rich Teer
2003-07-27 23:02 ` Uli Link
2003-07-29 1:42 ` Dr. David Kirkby
2003-07-27 17:17 ` <<>>
2003-07-27 9:28 ` Joerg Schilling
2003-07-27 12:20 ` Dr. David Kirkby
2003-07-27 13:53 ` Joerg Schilling
2003-07-27 16:33 ` Dave Uhring
2003-07-27 17:17 ` Thomas Dehn
2003-07-27 17:37 ` Dave Uhring
2003-07-27 19:22 ` Thomas Dehn
2003-07-27 19:48 ` Dave Uhring
2003-07-28 9:54 ` Casper H.S. Dik
2003-07-28 15:49 ` Lord Isildur
2003-07-31 15:25 ` Anthony Mandic
2003-08-02 19:27 ` Jerry Feldman
2003-08-02 20:23 ` Alan Johnson
2003-08-02 23:18 ` Charles Richmond
2003-08-07 12:54 ` Peter da Silva
[not found] ` <3f32a255$0$1311$c3e8da3@news.astraweb.com>
2003-08-07 19:27 ` Dave Uhring
2003-08-08 3:20 ` Anthony Mandic
[not found] ` <3f32ec05$0$1295$c3e8da3@news.astraweb.com>
2003-08-08 17:49 ` Peter da Silva
[not found] ` <pan.2003.08.08.01.12.49.191538@yahoo.com>
[not found] ` <3f3412c1$0$1266$c3e8da3@news.astraweb.com>
2003-08-09 0:06 ` Alan Johnson
2003-07-27 22:19 ` Rich Teer
2003-07-27 23:05 ` Dave Uhring
2003-07-28 0:27 ` Nico Kadel-Garcia
2003-07-28 10:04 ` Casper H.S. Dik
2003-07-28 18:54 ` Carl Perkins
2003-07-28 21:44 ` Rich Teer
2003-07-28 23:31 ` Dennis Clarke
2003-07-28 23:55 ` Dave Uhring
2003-07-31 15:19 ` Anthony Mandic
2003-07-31 15:25 ` Dragan Cvetkovic
2003-07-31 15:49 ` Anthony Mandic
2003-07-31 15:46 ` Dave Uhring
2003-07-31 15:54 ` Dragan Cvetkovic
2003-07-31 16:22 ` Dave Uhring
2003-07-31 15:56 ` Anthony Mandic
2003-07-31 16:36 ` Dave Uhring
2003-08-01 12:36 ` Anthony Mandic
2003-08-01 15:28 ` Dave Uhring
[not found] ` <bgbli6$rs1$1@blackhelicopter.databasix.com>
2003-07-31 20:22 ` Lord Isildur
2003-07-28 23:54 ` Dr. David Kirkby
2003-07-29 6:26 ` Charles Richmond
2003-07-29 10:59 ` Dr Ivan D. Reid
2003-07-31 15:21 ` Anthony Mandic
2003-07-27 17:53 ` Andrew Gabriel
2003-07-27 21:37 ` Nico Kadel-Garcia
2003-07-29 6:04 ` Benjamin Gawert
2003-07-27 11:07 ` Martin Stenzel
2003-07-27 11:30 ` Anthony Mandic
2003-07-27 13:04 ` Oscar del Rio
2003-07-28 0:18 ` Dr. David Kirkby
2003-07-29 15:32 ` John D Groenveld
2003-07-29 17:13 ` Dr. David Kirkby
2003-07-29 18:27 ` David Michaels
2003-07-29 19:57 ` Jay Maynard
2003-07-27 18:19 ` Alain
2003-07-31 5:16 ` Dr. David Kirkby
2003-07-28 1:30 ` Free UNIX for non-commerical use.- shut up, pls GT Jeff Cherer
2003-07-28 8:02 ` Dr. David Kirkby
2003-07-28 11:15 ` Free UNIX for non-commerical use Paul Repacholi
2003-07-29 5:55 ` Benjamin Gawert
2003-07-29 14:59 ` Dr. David Kirkby
2003-07-30 4:56 ` Benjamin Gawert
2003-07-30 8:27 ` Bob Hoekstra
2003-07-31 17:52 ` Paul Repacholi
2003-07-31 19:06 ` Dave Uhring
2003-07-31 21:36 ` Dr. David Kirkby
2003-08-01 7:15 ` Benjamin Gawert
2003-07-30 14:47 ` Dr. David Kirkby
2003-07-30 22:34 ` Nat Echols
2003-07-31 4:00 ` Benjamin Gawert
2003-07-31 7:51 ` Mikko Nahkola
2003-07-31 16:17 ` Rich Teer
2003-07-31 17:31 ` Benjamin Gawert
2003-07-31 17:44 ` Dave Uhring
2003-07-31 17:56 ` Rich Teer
2003-07-31 19:14 ` Dr. David Kirkby
2003-07-31 21:32 ` Rich Teer
2003-07-31 22:19 ` Dr. David Kirkby
2003-07-31 22:53 ` Ivan Jager
2003-08-01 8:28 ` Philip Brown
2003-08-01 11:45 ` Dr. David Kirkby
2003-08-07 22:37 ` Jack Hamilton
2003-08-08 1:07 ` Dr. David Kirkby
2003-08-08 1:45 ` Matthew Day
2003-08-08 5:48 ` Jack Hamilton
2003-08-08 12:46 ` Dr. David Kirkby
2003-08-08 5:42 ` Jack Hamilton
2003-08-01 7:48 ` Benjamin Gawert
2003-08-01 16:20 ` Rich Teer
2003-08-01 17:36 ` Benjamin Gawert
2003-08-04 11:07 ` Mikko Nahkola
2003-08-08 17:54 ` Peter da Silva
2003-07-31 17:44 ` Ivan Jager
2003-08-01 7:39 ` Benjamin Gawert
2003-08-01 14:08 ` Leach
2003-07-31 11:09 ` Ken Green
2003-08-01 10:07 ` Anthony Mandic
2003-08-01 13:25 ` Ken Green
2003-08-01 13:26 ` Anthony Mandic
2003-08-03 16:47 ` Glenn
2003-08-03 14:23 ` Dr. David Kirkby
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox