Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

different results with only a write

diedro
Beginner
678 Views

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.

0 Kudos
3 Replies
Anonymous66
Valued Contributor I
678 Views
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
0 Kudos
diedro
Beginner
678 Views
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?
0 Kudos
Anonymous66
Valued Contributor I
678 Views
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
0 Kudos
Reply