- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey there.
I'm working on a simulation software which uses time step integration.
I found out, that the simulation results of my written code depend on some compiler settings.
In special the following settings influence the computation results:
In IVF version 11.0.075
Project Settings -> Fortran -> Optimization -> Oprimization set to "Maximize Speed and Higher Level Optimization"
Project Settings ->Fortran -> Optimization ->Global Optimization setto "Yes"
Project Settings -> Fortran -> Optimization -> Internal Procedure Oprimization set to "Single File"
Project Settings -> Fortran -> Run-Time -> "Check Array and String Bounds" set to "Yes"
These mentioned settings confuse me a little bit, esspecially the last on.
Why is the "check array and string bounds" setting influencing the results, this makes no sense!
Are the optimization setting supposed to influence the accuracy of the code (perhaps variables)?
Did you have anysimillar problems so far?
Regards,
Chris
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
They affect assumptions made about your code, and the way in which floating results are rounded/flushed back to memory.
The only one that really puzzles me is the debug option for bounds - but it may be that by switching on some debug code that that does affect, again, the assumptions about floating point optimisations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should have set /assume:protect_parens,minus0 so that any changes which occur with varying level of optimization don't violate Fortran standards. Setting /Qprec-div /Qprec-sqrt also would be preferable, so as to comply with IEEE754 in those respects.
If you limit yourself to the options which are listed in Properties, change the fp:fast setting to fp:source; that will include the settings above, other than minus0, and also prevent vector sum reductions, which are among the optimizations which affect numerical results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot.
By setting the Floating Point Model to Source I could get rid of the problem
Even the Run-Time Check BoundsFlag does not affect the computations anymore.
Nevertheless, the bounds issue still makes me wonder why it affects the folating point model.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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