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?


-- 
           Summary: Getting different answers for DLSODE demo code
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: byeonguk dot kim at gmail dot com


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

Reply via email to