I just got a new Macbook Pro (64-bit, 2 cores) and thought that I would try to take advantage of intel's compiler (v 10.0.016). I have a modest size fluid dynamics code that I am trying to get to run with ifort. The code has been running on intel-64 arch. using gfortran and has also been running on powerpc 32-bit arch. using both gfortran and absoft compilers. The code has run on different machines and we are pretty damn sure that the code is doing what it should. We can test it against other codes and we can compare it to the results of simple pencil and paper calculations.
However, ifort gives completely different results than every other machine/compiler combo that I have tried. This is true even when I compile it with -O0. The code does not produce any compile errors or warnings nor any runtime errors. It just turns out that the results are wrong.
But not all the results. It doesn't seem to be a precision issue. All of the floating-point data is defined by passing in the same precision through a module, i.e.,
my_precision = selected_real_kind(p=15)
and real data is define (for example) via,
Real(my_precision) :: a, b, c
Therefore (I think) there should not be any platform dependent precision problems. Also, anytime that the code reports on its progress and gives simple info, the results are correct. And, when I print out a few matrices that get defined as the code starts up, they are correct.
The big problem is that the code is getting the important calculations wrong. They are not blowing up or giving NaN, the data is reasonable but wrong. Pictures of the results do not look anything like each other.
Anyone have any ideas? I know next to nothing about the details of the million or so ifort flag, but I tried my best to get rid of any optimization for the purpose of testing. Does ifort do anything funny even with -O0?