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

write statement

rsampson
Débutant
612 Visites
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 Compliments
3 Réponses
TimP
Contributeur émérite III
613 Visites
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 Compliments
rsampson
Débutant
613 Visites
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 Compliments
Steven_L_Intel1
Employé
613 Visites
It can change optimization choices and data layout.
0 Compliments
Répondre