Opened 13 years ago

Closed 12 years ago

#124 closed defect (fixed)

Numeric Differences in verification tests between 64bit and 32bit compilation

Reported by: simon.guest@… Owned by: MatthewWhiting
Priority: normal Milestone: Release-1.2
Component: other Version: 1.1.13
Severity: normal Keywords:
Cc:

Description

On both 32bit and 64bit Ubuntu 10 and using GCC/G++ to compile

  • wcslib-4.7 ,
  • cfitsio-3.27
  • duchamp 1.1.13

The verification tests report success. However on closer inspection, I noticed a significant difference in the results files, in the Std.Dev. field. i.e. the field marked with an asterisk below.

Full stats:
Mean   = 0.0279632	Std.Dev. = 1.04723*
Median = 0.0148019	MADFM    = 0.68074 (= 1.00927 as std.dev.)

The below information is different between 32 bit and 64 bit

[Test] [32bit Mean StdDev] [StdResults StdDev]    [64bit Std Dev]
    1            0.680671             1.04723            1.04723   
    2            0.680671             1.04723            1.04723       
    3            0.680671             1.04723            1.04723   
    4            0.956848             0.956515           0.956515 
    5            1.04174              1.10346            1.10346  
    6            0.960761             0.960753           0.960753
    7            0.680671             1.04723            1.04723

As you can see the 64 bit Std Dev values are exactly the same as those values from stdResults<x>.txt whereas the 32 bit values are consistently different. Of note is that the values of tests 1,2,3,5 and 7 are significantly different between 32bit and 64bit.

Note that I had previously compiled both 32bit and 64bit versions of 1.1.11 and not produced any differences in this value.

Also, all other values in the files are the identical, except for a minor rounding difference in the velocity of the 5th object in test 2 (1439.595 instead of 1439.596).

Change History (2)

comment:1 Changed 12 years ago by MatthewWhiting

Milestone: Release-1.1.14
Status: newassigned

Thanks for letting me know about this Simon - I've not had much time to do pure Duchamp development over the past year, but trying to get it back up to speed now.

I have been testing this recently, and think I have located the main source of problem. The summing in calculating mean & stddev was done using floats, which is less precise than using doubles. And differently so for the different architectures.

I will incorporate these changes into the next upcoming release (called 1.1.14 most likely, being mostly bug fixes), although there's a little more testing I'd like to do first.

comment:2 Changed 12 years ago by MatthewWhiting

Resolution: fixed
Status: assignedclosed

These issues have been fixed, so closing this ticket. Version 1.2 will be released soon.

Note: See TracTickets for help on using tickets.