| Author |
Automatic testing of numerical output
|
|
| Neilen Marais 2005-04-02, 8:57 am |
| Hi!
I'm trying to set up some tests for a f90 code that I am working on.
I'd like to compare the results of known test-problems across
different versions and platforms. The code generates output in text
files.
Since floating point results tend not to match exactly, I can't
just diff output files to see what's going on. Software that will
compare floating point numbers to a specified tolerance level would be
quite useful.
Do generally applicable software exist to set up such tests, or do
people just roll their own? I'm quite interested to hear how other
people approach this presumably common problem.
Thanks
Neilen
--
you know its kind of tragic
we live in the new world
but we've lost the magic
-- Battery 9 (www.battery9.co.za)
| |
|
| Neilen Marais wrote:
> Hi!
>
> I'm trying to set up some tests for a f90 code that I am working on.
> I'd like to compare the results of known test-problems across
> different versions and platforms. The code generates output in text
> files.
>
> Since floating point results tend not to match exactly, I can't
> just diff output files to see what's going on. Software that will
> compare floating point numbers to a specified tolerance level would be
> quite useful.
>
> Do generally applicable software exist to set up such tests, or do
> people just roll their own? I'm quite interested to hear how other
> people approach this presumably common problem.
>
> Thanks
> Neilen
>
>
>
I tend to 'roll my own' using Python. (Python because it is quick to whip
up such a script to do it!)
--
Ray
| |
| beliavsky@aol.com 2005-04-02, 8:57 am |
| Neilen Marais wrote:
> Hi!
>
> I'm trying to set up some tests for a f90 code that I am working on.
> I'd like to compare the results of known test-problems across
> different versions and platforms. The code generates output in text
> files.
>
> Since floating point results tend not to match exactly, I can't
> just diff output files to see what's going on. Software that will
> compare floating point numbers to a specified tolerance level would
be
> quite useful.
Jim Veale recently mentioned a "fuzzy number comparison utility" in the
thread "writing sequences to a file" -- the site is
http://world.std.com/~jdveale .
| |
|
| Neilen Marais wrote:
> Hi!
>
> I'm trying to set up some tests for a f90 code that I am working on.
> I'd like to compare the results of known test-problems across
> different versions and platforms. The code generates output in text
> files.
>
> Since floating point results tend not to match exactly, I can't
> just diff output files to see what's going on. Software that will
> compare floating point numbers to a specified tolerance level would be
> quite useful.
>
> Do generally applicable software exist to set up such tests, or do
> people just roll their own? I'm quite interested to hear how other
> people approach this presumably common problem.
>
The Polyhedron Benchmarks (see our web site) includes a program called
PBValid that does that sort of comparison. I use it to confirm that the
output from executables produced by different compilers is within
specified tolerances. It deals with fuzziness from variation in both
floating point arithmetic and formatted output.
--
John Appleyard - (send email to john!news@.. rather than spamtrap@..)
Polyhedron Software
Programs for Programmers - QA, Compilers, Graphics, Consultancy
********* Visit our Web site on http://www.polyhedron.co.uk/ *********
| |
| Herman D. Knoble 2005-04-06, 12:21 pm |
| Neilen: Using Fortran 90 functions Epsilon(x) (or Spacing(x)) one
can change the "fuzz = " and get what I think you want. Example (with
sample driver): http://ftp.cac.psu.edu/pub/ger/fortran/hdk/eps.f90
Skip Knoble
On Sat, 02 Apr 2005 11:59:38 +0200, Neilen Marais <junkmail@chatsubo.lagged.za.net> wrote:
-|Hi!
-|
-|I'm trying to set up some tests for a f90 code that I am working on.
-|I'd like to compare the results of known test-problems across
-|different versions and platforms. The code generates output in text
-|files.
-|
-|Since floating point results tend not to match exactly, I can't
-|just diff output files to see what's going on. Software that will
-|compare floating point numbers to a specified tolerance level would be
-|quite useful.
-|
-|Do generally applicable software exist to set up such tests, or do
-|people just roll their own? I'm quite interested to hear how other
-|people approach this presumably common problem.
-|
-|Thanks
-|Neilen
| |
| David J Worth 2005-04-06, 12:21 pm |
| Neilen Marais wrote:
> Hi!
>
> I'm trying to set up some tests for a f90 code that I am working on.
> I'd like to compare the results of known test-problems across
> different versions and platforms. The code generates output in text
> files.
>
> Since floating point results tend not to match exactly, I can't
> just diff output files to see what's going on. Software that will
> compare floating point numbers to a specified tolerance level would be
> quite useful.
>
> Do generally applicable software exist to set up such tests, or do
> people just roll their own? I'm quite interested to hear how other
> people approach this presumably common problem.
>
> Thanks
> Neilen
>
>
>
Have you tried ndiff?
http://www.math.utah.edu/~beebe/software/ndiff/
David
| |
| Neilen Marais 2005-04-06, 12:21 pm |
| Hi David
On Tue, 05 Apr 2005 13:26:50 +0100, David J Worth wrote:
> Have you tried ndiff?
>
> http://www.math.utah.edu/~beebe/software/ndiff/
Thanks. This looks good. I'll give it a bash. Was a little at
first, since debian contains a package named ndiff which relates to
network usage!
Thanks
Neilen
>
> David
--
you know its kind of tragic
we live in the new world
but we've lost the magic
-- Battery 9 (www.battery9.co.za)
|
|
|
|