Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

write statement

rsampson
Beginner
612 Views
I am developing a Fortran program that performs computations and generates numerical output. I have noticed that adding, deleting or making any changes to any write statement results in a change in the numerical output. For example, adding the simple statement, write(6,*) 'qwerty', any where in the program causes the numerical results to be modified. It appears that the write statements are encroaching on areas of the codethat are important to the numerical calculations. I am running with all compilation and run time checks on, including bounds checking. Any thoughts on how to correct this problem?
0 Kudos
3 Replies
TimP
Honored Contributor III
613 Views
We've been discussing this on another thread. Using an SSE code generation option, such as -QxW, along with -fp:precise, may help to minimize numerical variations associated with enabling/disabling optimizations.
0 Kudos
rsampson
Beginner
613 Views
I found the source of the problem. I neglected to reset an integer array to zeros on successive passes througha region ofmy code. This resulted in differentnumerical resultsdepending on the presence/absence ofa write statement. Just how the presence/absence of a simple write statement, far removed from this location in the code, could affect theresultsI will never know.
0 Kudos
Steven_L_Intel1
Employee
613 Views
It can change optimization choices and data layout.
0 Kudos
Reply