Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

The same fortran 77 code produce different results with different compilers

wyliao
Beginner
177 Views
Hello,
I am a newcomer here, hope can get help from you guys.
Recently, I am bothered by a strange and weird problem.
I have fortran 77 code, see test.f, if I compile it with ifort and run it, I got something, but if I change to other compilers, such as g77 and lahey, I got different results.
The difference is kind of large, for instance, the difference is about 10 percent between ifort and g77, and 5 percent between ifort and lahey. Can anybody tell me what is the possible reason? Thanks

-Liao
0 Kudos
1 Reply
TimP
Honored Contributor III
177 Views
The most common reason is that you have un-initialized variables, or array subscript over-runs. Each of these compilers has options to help diagnose them, for example ifort -C You could look up previous discussions on similar topics on this forum.
0 Kudos
Reply