"Visual Studio 2005" locals-window show variable twice

"Visual Studio 2005" locals-window show variable twice


I am debugging a old Fortran program in Visual Studio 2005 and 11.1.046 and stop at a break point in a OpenMP task construct I try to debug.
There I try to check the values of my variables/arrays using "call stack", "autos", "watch", "Immediate" window but everywhere it say "Undefined address". If I hover the mouse it say likewise, or even ignore a few of them.

If I use a Write(*,*) statement to print them all seems well though.
Then I used the "locals" window and the topmost ones still report "Undefined address".
But when I scroll down (locals shows about 400 entries in total) I find all those "Undefined address"-variables duplicated at the bottom and here they all have the right value.

Is there another way to get hold of this debug info but to use my huge "locals window" ?
Is this a known feature?

Did I miss a compile parameter for this info?
Below is what this project use.

/nologo /debug:full /Od /fpp /I"..\..\src\incl32" /I"..\..\src\incl" /I"..\..\src\diglib\incl" /I"..\..\dictra\src" /I"..\..\win32ivf\diglib\debug" /I"\tc\vers\trunk\src\diglib\incl" /DWIN32 /D_VF_VERSION_=660 /D_THERMOCALC /Dtcdll /debug-parameters:all /warn:truncated_source /Qtrapuv /iface:cvf /module:"Debug/" /object:"Debug/" /traceback /check:all /libs:static /threads /dbglibs /libdir:noauto /c /Qopenmp /debug:parallel


9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Can you attach a small (if possible) but complete test case?

Retired 12/31/2016

Quoting - Steve Lionel (Intel)
Can you attach a small (if possible) but complete test case?

I made a small VS2005 project its in the ZIP file.
It shows most of the features I believe.

I run untill the breakpoint in the TASK construkt, there I have a look at the locals window and see.

I -1962097533 INTEGER(4)
+ IWS Undefined pointer/array INTEGER(4)
INT 27196004 INTEGER(4)
ID 268473087 INTEGER(4)
I 4187648 INTEGER(4)
NWSG 2000000 INTEGER(4)
I 1024 INTEGER(4)
ID 1308608 INTEGER(4)

In my previous post I said the last variables was correct, that was wrong, only the parameter NWSG has the right value here.
If I insert write(*,*) it gives me what I believe is correct values.



Downloadapplication/zip no-variables.zip4.84 KB

I now tried 11.1 build 51 of the compiler with the same result.
Further, I used this info from the 11.1.51 release notes.
* If you are using Microsoft Visual Studio 2005, there are three Intel-specific exceptions that
must be enabled manually. Select Debug > Exceptions, expand the Win32 Exceptions
tree, and enable items:
a1a01db0 Intel Parallel Debugger Extension Exception 0
a1a01db1 Intel Parallel Debugger Extension Exception 1
a1a01db2 Intel Parallel Debugger Extension Exception 2

As best as I can tell, it is showing you the thread-local versions of each of those variables. On my quad-core system, I had three or even four versions of the variables. Unfortunately, there does not seem to be a way (that I know of offhand) to limit the display to the current thread.

I'll ask our debugging experts what can be done here. I did see the "undefined address" message.

Retired 12/31/2016

Did they get back with any info that can help me reasove (or explain) the "undefined address" I still see.
Is it on the todo list for the debugger?

If I try LOC() in the WATCH window on theese "undefined address"-variable, somtimes the memory address seems resonable somtimes not.
This is a big problem for me trying to debugg my OpenMP parallelized program.

Intel Visual Fortran Compiler XE [IA-32]...

Best Regards,
Magnus Jansson


I don't remember the details from this issue before, though I still see "undefined address" for the FIRSTPRIVATE variable I. Are you also using FIRSTPRIVATE?

Retired 12/31/2016

In my real program I use default(none), firstprivate(), shared() and private(), like below. Was this what you asked for?

!$OMP TASK default(none) firstprivate(NOEQ,LOKE)
!$OMP$ shared(NOERR,JERR,F,F0)
!$OMP$ shared(FF,FF0,PPP,icopy)

Below I describe in detail the problem I find, maybe you notice others.
Could It depend on VisalStudio and/or compiler version?
I indicate sharing status in parentheses.

The problem I experience in the no_variables test code in the first post is if i (in debug mode) break at
line 40: call work(iws,testme)
Here "iws"(shared array) is not recognized as a variable in the debugger, but "testme"(shared) is shown correctly.

line 59: call work2(iws(1,ID),i,int)
value of "ID"(private),"int"(shared) both shown but wrong.
i(firstprivate) and iws(shared) are "Undefined pointer/array"

On Line 73: return in work2()
Debugger shows local variables just fine again. :)

Best Regards,
Magnus Jansson

What I see is that "firstprivate" (and perhaps "lastprivate") variables can't be viewed properly in the debugger. This is not dependent on the Visual Studio version - it is reported as issue DPD200168012.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today