Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26758 Discussions

The same code with different results, gfortran vs ifort

Arbabi__Nasser
Beginner
278 Views

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
Arjen_Markus
Valued Contributor III
278 Views

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.

Reply