I found some abnormal behaviors of my LBM program. The snippet is as follows, and i paste the code here:http://pastebin.com/mD3TFVhc
do j = 1,ly do i = 1,lx call collision(i,j,omega,eul_f,p, f, fnew) call collision(i,j,omega,eul_f,p, n_hlp, node) end do end do
Here, four arrays 'f,fnew,n_hlp,node' have the same dimensions. 'f' and 'h_hlp' are initialized to be the same and 'fnew' and 'node' store the returning values. If compiling the code with the following command
ifort snip.f90 ./a.out
the data file shows difference between 'fnew' and 'n_hlp', about the order of 1e-17. But uncommenting the four lines 87-90 or adding '-g' to the compiler option will results the same 'fnew' and 'n_hlp'. Is this reasonable?
Thanks in advance.