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 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

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

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen