- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It can change optimization choices and data layout.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page