I need to work on a fortran program that used to be compiled using Microsoft Compaq Visual Fortran 6.6. I would rather work with gfortran, but I met a lot of problems. The main problem is that the generated binaries have different types of behavior. My program takes an input file and then generates an output file. But sometimes, when using a binary file compiled by gfortran, it crashes to the end or gives different numerical results. This is a program written by researchers that uses many floating point numbers.
So my question is: what are the differences between the two compilers that might lead to this problem?
edit: My program calculates the values โโof some parameters and there are many iterations. In the beginning, everything is going well. After several iterations, some NaN values โโappear (only when compiling gfortran).
edit: Think all of you for your answers. Therefore, I used the Intel compiler, which helped me by providing useful error messages. The origin of my problems is that some variables are not initialized properly. It seems that when compiling with visual fortran compaq, these variables automatically take 0 as a value, while with gfortran (and intel) it takes random values โโthat explain some numerical differences that add up to the next iterations. So now the solution is a better understanding of the program to fix these missing initializations.
source share