Bug 29447 - Getting different answers for DLSODE demo code
Summary: Getting different answers for DLSODE demo code
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-13 00:04 UTC by Byeong-Uk Kim
Modified: 2006-10-14 11:13 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Byeong-Uk Kim 2006-10-13 00:04:29 UTC
I tried to run DLSODE and its demo code that I got directly off from netlib.
Surprisingly, I got different answers for some examples. Compiling option matters but I finally could get the idential numbers out of gfortran and g77 compared with what the demo code produced.
At this point, I am not sure if the exactly same answer from gfortrn as the output of original demo code ensures its correctness. If so, can pgf90 (v. 5.2) and ifort (intel's fortran compiler) be wrong?
Following are the example lines showing differences. These are specifically line 313 of the demo outputs.
In the demo code (or text) says (note that I replaced original "E" with "D" in number expressions for my own convenience):
    0.10000D+03     0.908D-08    1     0.992D+02
gfortran with -static -O1:
    0.10000D+03     0.908D-08    1     0.992D+02
pgf90 with -pc 64 -O1 -Bstatic:
    0.10000D+03     0.335D-09    1     0.251D+02
ifort without any option:
    0.10000D+03     0.333D-08    1     0.225D+02

Does anyone know what the best way is to ensure minimizing numerical errors (or differences) between compilers? Or, a way to check if my compiled binary is indeed more accurate than others?
Comment 1 Paul Thomas 2006-10-14 11:13:22 UTC
Please send a question of this type to comp.lang.fortran or, indeed, to the gfortran list.  We would be happy accept bug reports from you on Bugzilla but not general numerical analysis questions.

Paul