- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suggest first turning on both array bounds checking and uninitialized variable checking in the release build to see if it shows anything. You can also try gradually increasing the optimization level in a Debug build and see where the change occurs. You can do some debuggiing even with some levels of optimization.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is the assignment of REAL*8 variable to REAL*4 variablewrong and yield incorrect results? I found several places in the code have this kind assignment. I think this is also probably the cause of problem in the release build when optimization is enabled.
Will itset both "Default Real KIND" and "Default Double Precision KIND" to 8 a possible way to go and solve the problem? Or you can offer other suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is not "wrong". You will lose the extra precision of REAL*8 and get the closest REAL*4 value to what the REAL*8 had. This wouldn't change with optimization.
I do not recommend using the option to set the default real kind to 8, though it is certainly worth trying to see if the "problem" goes away. If it does, either you have a coding error somewhere in argument passing (not assignment) or your program is sensitive to small floating point differences.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem went away after I set REAL kind to 8 and set the common element alignment to 8.There are minor precision loss comparing the output from release build with the output from debug build.The output from release build contains maximum speed optimizationand the output from debug build that contains no optimization. Both have same double precision settings.
I appreciate your help in getting the problem solved. Reading all the posts, I feel your contributionsare so important for the FORTRAN community. Thanks again.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page