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

debug module variables

wstephens
Beginner
1,982 Views
I just upgraded to 2011.3.175

Now in debug mode, when I watch a variable declared in a module I have to use the modname::varname syntax in the watch window. And the value doesn't pop up when I hover over varname.

Wasn't there a fix for this?
0 Kudos
13 Replies
Steven_L_Intel1
Employee
1,982 Views
Yes, it should work. Did you do a full rebuild of the project?
0 Kudos
wstephens
Beginner
1,982 Views
Yes, a full rebuild.

Perhaps I'll try to re-create the project from scratch.

Or any other ideas?
0 Kudos
Steven_L_Intel1
Employee
1,982 Views
If you still can't make it work, attach a ZIP of a small test project that shows the problem.
0 Kudos
wstephens
Beginner
1,982 Views
Well, I just noticed that in debug mode it shows me some of those other module variables, but not all of them.

There must be some pattern to it, but it is unclear. It's like some of the names got on a 'hit' list and disappeared.

Any ideas?
0 Kudos
Steven_L_Intel1
Employee
1,982 Views
No idea. The variable has to be used in the current source to be active, but otherwise it should work. Again, if you can attach a test case that shows a problem, we'll be glad to look.

Are the module variables actually PARAMETER constants, perhaps? For that you have to enable debug info for PARAMETER constants.
0 Kudos
wstephens
Beginner
1,982 Views
They are not PARAMETER constants.

This is taking a good deal of effort to reduce the program to isolate the issue.

One of the two variables did "appear" when debugging in Module "F" after I moved an assignment for the variable to the main program's file from Module "D". The variable is still defined in Module "D".

The other variable, declared right next the first one in Module "D", is still an "Undefined variable" in the watch window when debugging Module "F".
0 Kudos
mecej4
Honored Contributor III
1,982 Views
You have described behavior that we agree "shouldn't be so". However, we need the small example that Steve Lionel asked for to move forward with a fix.

Do note that "undefined" and "declared" are different states. You can have a declared variable (known type, shape, size, and other attributes) that is undefined (no value(s) assigned to some or all components). Conversely, you can have a variable that is undeclared (i.e., declared implicitly) that is defined at a particular line of code.

Finally, the optimizer can cause variables that exist in the source code to have no counterpart in the compiled code. Debugging such code is quite difficult, and often needs working at the assembly level.

0 Kudos
wstephens
Beginner
1,982 Views
The debugger says "Undefined variable".

I assume that this is different than what the compiler refers to as "undefined".

It must be different because the debugger shows the correct value using the modulename::varname syntax in the watch window.
0 Kudos
wstephens
Beginner
1,982 Views
Did anyone get a chance to look at my previously attached project showing the problem?
0 Kudos
Steven_L_Intel1
Employee
1,982 Views
I can reproduce this and can't explain it. I will ask the developers.
0 Kudos
Steven_L_Intel1
Employee
1,982 Views
Escalated as issue DPD200216582.
0 Kudos
Steven_L_Intel1
Employee
1,982 Views
This problem has been fixed in our sources. The fix will appear in a future update or version.
0 Kudos
Steven_L_Intel1
Employee
1,982 Views
I expect the fix to appear in Update 7 of Intel Visual Fortran Composer XE 2011.
0 Kudos
Reply