different results with only a write

different results with only a write

hi everyone,

I am writing fortran code. If a run or not  a simple cycle with or without a WRITE(*,*) i get totally different results. The same thing I a compile in a debug mode.

What is the problem it is only a ewrite in a cycle.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Without seeing your program, it is impossible to know what is causing this difference. If you are using floating point math, this could be due to a change in the order of operations, or this could be a compiler bug.

Could you share your program with us?

Thanks,
Annalee
Intel Developer Support

hi,
I have a long long code.

this is the main things:
DO ip=1,npt
! WRITE(501,55) IP,CC(IP,1),FD(IP,1)
CC(ip,1) = CC(ip,1) + dt*FD(ip,1)
ENDDO

I compute FD in other subroutines
is there the error?

Have you verified that IP is not being changed in the functions CC or FD? Also, do CC and FD use any saved variable that are used in future calls? Either of these things could be causing the difference. I would also suggest checking for uninitialized variables.

Annalee

Leave a Comment

Please sign in to add a comment. Not a member? Join today