fortran optimization errors
Jerry DeLisle
jvdelisle@verizon.net
Fri Jun 22 21:58:00 GMT 2007
Sebastian Sandersius wrote:
> Dear Jerry, Steve, Tim and Tobias,
>
> The compiler which is giving all the problems is:
> Target: i386-redhat-linux
> gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)
>
> the os is fedora not red hat, in case that may be the problem.
>
> The optimizations I tried were:
> (1) f95 -g semn17.f90 rng.f90 -o n17
> (2) f95 semn17.f90 rng.f90 -o n17
> (3) f95 -O2 semn17.f90 rng.f90 -o n17
> (4) f95 -O3 semn17.f90 rng.f90 -o n17
>
> An example of the numerical output:
>
> (1) 1.032397734218777E-002
> (2) 1.032397734218777E-002
> (3) 1.035838362773763E-002
> (4) 1.035838362773763E-002
>
> so you can see where the discrepancies are.
>
> I can compile and run the same code on my mac:
> Target: i386-apple-darwin8.8.1
> gcc version 4.3.0 20061230 (experimental)
>
> and there are no discrepancies in the numerical
> output no matter what the optimization is:
>
> (1) 1.032407088285647E-002
> (2) 1.032407088285647E-002
> (3) 1.032407088285647E-002
> (4) 1.032407088285647E-002
>
> I hope that answers all your questions for now.
>
> Regards, Sebastian
>
No not really. If this really is a bug we have to have the code you are
compiling in order to fix it. A reduced example of the problem would also work.
Otherwise we can not fix it.
Like others have said, if you try a later version of gfortran and the problem
goes away, then it is fixed. If not, we can not fix without an example of the
code you are compiling.
You can send to me privately if you do not want it on the public mailing list.
Regards,
Jerry
More information about the Fortran
mailing list