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

The same code with different results, gfortran vs ifort


Dear All

I have a F77 code to solve for a system of nonlinear equations. The code works well and gives me correct results when I compile it using gfortran. However, the same code returns me initial guess, when I compile it using ifort. 

It seems the code does not undergo iterations to change the initial guess to the final values.

Any suggestion how to fix this?

0 Kudos
1 Reply
Honored Contributor I

One reason could be that there are uninitialised variables. Such variables can have any value. Quite often that value is zero, but there is no guarantee. It could be anything. And the value these variables have depends on the compiler and the compile options. If this happens to a variable controlling the iteration, that may very well explain the behaviour you're seeing.

0 Kudos