Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29352 Discussions

Common block variables, debugger, <no value>

oh_moose
Beginner
853 Views
As mentioned in a prior message, the debugger (idb) sometimes cannot access (print the contents of) a local variable, possibly because it has been optimized away (despite the fact that the ifort option -O0 was used). Then I also noticed that access to all local variables disappears if the code was compiles with the ifort option -save. After removing the option -save, I find to my surprise that the debugger can access local variables, but not global variables in a common block. If there is anything that cannot be optimized away, then it is a variable in a common block, especially if all routines accessing this variable are compiled separately.
Has anybody else noticed this problem? Is there a fix?

A bit OT (but maybe not), on VMS I find far too often that the debugger produces the message "%DEBUG-E-INTERR, debugger error in DBGADDEXPDETERMINE_TYPE unknown arg type or session corruption" when I try to access a structure or an element of a structure. But then the VMS debugger can produce the value that had been assigned to a scalar variable of the same common block, while the Linux version cannot. And the VMS debugger has the same problem with structures which have been passed as subroutine argument.

For a while I thought that the Linux-related problem has something to do with a warning from the compiler about a few common block variables , "A common-block-object of a nonsequence derived type is an extension of Standard F90.". But even accessing a scalar variable from a different common block does not work.

Comments, suggestions? I am looking for a fix.

0 Kudos
3 Replies
Steven_L_Intel1
Employee
853 Views
If you're looking for a fix, then submit an issue to Intel Premier Support and include a test case. This isn't the sort of issue that lends itself to paraphrasing.
0 Kudos
oh_moose
Beginner
853 Views
I will submit this issue and others to Intel Premier Support (once I found out how to get access to this elite service). But for now I would be happy if someone else can reproduce the problem, and may have a quick fix at hand, like leaving out the option "-save" to address the debugger problem with local variables.


0 Kudos
Reply