- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following have helpt me to elliminate differences between debug and release results, and may help you too:
1- Use IMPLICIT NONE and declare all of your variables;
2- Initialize all variables, especially arrays;
3- Do not mix up REAL with REAL*8 and INTEGER in the same calculation;
4- Do use D (for double precision) with your constants if you declare the variables as double precision (e.g. X=0D0, Y=1D0 rather than X=0, Y=1 -- if X and Y are REAL*8);
5- Be carefull with logical results of such comparisons as IF(X-Y == 0D0) THEN... This may behave different for debug vs release if X and Y are calculated values;
6- Read Dave Eklunds 'The Perils of Real Numbers' in CVF Newsletter issues 8, 9 and 10.
Regards,
Sabalan.
1- Use IMPLICIT NONE and declare all of your variables;
2- Initialize all variables, especially arrays;
3- Do not mix up REAL with REAL*8 and INTEGER in the same calculation;
4- Do use D (for double precision) with your constants if you declare the variables as double precision (e.g. X=0D0, Y=1D0 rather than X=0, Y=1 -- if X and Y are REAL*8);
5- Be carefull with logical results of such comparisons as IF(X-Y == 0D0) THEN... This may behave different for debug vs release if X and Y are calculated values;
6- Read Dave Eklunds 'The Perils of Real Numbers' in CVF Newsletter issues 8, 9 and 10.
Regards,
Sabalan.
Link Copied
0 Replies

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