Hello, Intel team!
I develop an application using MPI technology and run it on one of the supercomputers of theRussianAcademyof Sciences. They have IFC v12.0.3 installed. I may have found a bug in the compiler.
There is a real(4), allocatable, 2-dimensional array in my code (actually there are a lot of them, but only one causes problems). Depending on how many cores I use, the dimensions of the array vary from (81:102, 1:22) for 96 cores to (97:114, 1:18) for 150 cores.
First I set each element of this array individually (in a 2d-cycle), like this:
evap (i,j) = 0.002 +real(j+2*i)/1000000.
and then, after the cycle, I divide the entire array by a constant:
evap = evap/(24.*60.*60.)
After the last operation I get different results for different numbers of cores, but only in a few elements of the array, located not too far from its bounds. And only one bit seems to be different – the least significant in the mantissa, so I get slightly different arrays.
The point is that if the division is performed individually, in another cycle, I get identical values of all of the elements, present in both versions of the array. And everything is fine as well, if the array equals to a constant before the array-wise division.
I don’t know if this is a bug, or a side effect from some kind of optimization (compilation flags are as follows: -fpp2 -assume byterecl -module ./obj -free -fpe0 -check bounds -traceback), but this is really frustrating, since I strive to get identical results to test the correctness of my code.
Please, tell me where I am wrong, if so, and maybe how to fix this. Thank you in advance.
Respectfully, Gleb D.