- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
w_fc_pc_8.0.050_pe053.1
Had one of those nasty cases where my program kept falling over with the release version, but ran to completion (with incorrect results) whenever I tried to debug it (either interactively, or double clicking the debug version of the exe outside of the IDE).
Eventually identified the problem as per below. Not certain if this is a generic issue, or was specific to the idiosyncrasies of my particular code?
David
Code snippets illustrating nature of problem:
============================================
SUBROUTINE ATTENUATION_MODELS ( )
...
character(*) tectonic
...
ENTRY ATTENUATION_fParam (typ, dc, tectonic) ! Fault & tectonic parameters
...
if (tectonic(:1) == 's' ) then ! This is OK - "tectonic" dummy argument in ENTRY stmt
...
ENTRY ATTENUATION_fDist( )
...
if (tectonic(:1) == 's' ) path_term = TAK_SSL * log(fd) ! This NOT - Release exe fails at this point, but Debug exe sails straight trough (with incorrect results)
...
END SUBROUTINE ATTENUATION_MODELS
Had one of those nasty cases where my program kept falling over with the release version, but ran to completion (with incorrect results) whenever I tried to debug it (either interactively, or double clicking the debug version of the exe outside of the IDE).
Eventually identified the problem as per below. Not certain if this is a generic issue, or was specific to the idiosyncrasies of my particular code?
David
Code snippets illustrating nature of problem:
============================================
SUBROUTINE ATTENUATION_MODELS ( )
...
character(*) tectonic
...
ENTRY ATTENUATION_fParam (typ, dc, tectonic) ! Fault & tectonic parameters
...
if (tectonic(:1) == 's' ) then ! This is OK - "tectonic" dummy argument in ENTRY stmt
...
ENTRY ATTENUATION_fDist( )
...
if (tectonic(:1) == 's' ) path_term = TAK_SSL * log(fd) ! This NOT - Release exe fails at this point, but Debug exe sails straight trough (with incorrect results)
...
END SUBROUTINE ATTENUATION_MODELS
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure why you think this has to do with the debugger itself.
Your code is not legal Fortran - you are not allowed to reference the argument tectonic unless you're on a code path that entered through an entry point with tectonic in the argument list. The behavior is unpredictable and can change with optimization (the debug version is unoptimized.
I would also comment that 8.0.050 is quite old at this point - 8.1.030 is the current version.
Your code is not legal Fortran - you are not allowed to reference the argument tectonic unless you're on a code path that entered through an entry point with tectonic in the argument list. The behavior is unpredictable and can change with optimization (the debug version is unoptimized.
I would also comment that 8.0.050 is quite old at this point - 8.1.030 is the current version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I realised that it was an error in the code.
The release version correctly crashes, but gives no indication of where the problem is.
The difficulty is that the debugger does not fail, making it very hard to find the error.
Because this was so clearly an error in the code, I would have expected the debugger to detect it (ie. to aid debugging the program). Hence my questioning the debugger (ie. did not detect the error in the program)
(In my defence!) I would note that this is part of a largish program written & revised / extended extensively over the last 5 years or so. The faulty line of code is part of a large number of recent changes. The large majority of variables are declared in modules & accessed via multiple USE statements & I thought that included 'tectonic' - hence the error.
(Yes I realise the compiler is not the latest, but I am a little nervous about making major changes in the middle of critical / urgent project development work - especially given the problems some have experienced in the past. Then of course there is the old issue of "time" to do the change-over).
David
The release version correctly crashes, but gives no indication of where the problem is.
The difficulty is that the debugger does not fail, making it very hard to find the error.
Because this was so clearly an error in the code, I would have expected the debugger to detect it (ie. to aid debugging the program). Hence my questioning the debugger (ie. did not detect the error in the program)
(In my defence!) I would note that this is part of a largish program written & revised / extended extensively over the last 5 years or so. The faulty line of code is part of a large number of recent changes. The large majority of variables are declared in modules & accessed via multiple USE statements & I thought that included 'tectonic' - hence the error.
(Yes I realise the compiler is not the latest, but I am a little nervous about making major changes in the middle of critical / urgent project development work - especially given the problems some have experienced in the past. Then of course there is the old issue of "time" to do the change-over).
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sblionel wrote:
I would also comment that 8.0.050 is quite old at this point - 8.1.030 is the current version.
Sorry, I am still not clear about which update versions are applicable for me.
The description for 8.1.030 includes "Itanium Compiler Build 20050409" so I assumed it was not applicable in my case (having just an ordinary PC). I have received a number of notifications of compiler updates over recent months all of which I assumed did not apply because of either "Itanium" or "64 bit" appearing in the description.
Your comment suggests that the 8.1.030 build is applicable, despite the "Itanium" in the description ??
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These 8.1 full compiler installation tar files contain both the 32-bit and the Itanium release. The patch files were separate for each compiler, the confusion is understandable, but there haven't been patches lately. 9.0 files so far include 3 in 1: 32-bit, 64-bit Xeon and Itanium.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The purpose of the debugger is not to catch errors in your code, but rather for you to be able to examine the behavior of the program in detail, helping you locate errors.

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