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

Unable to see variable value during debug in VS 2012 with Intel 2015

Wee_Beng_T_
Beginner
1,921 Views

Hi,

I tried to access a variable and check its value during debug in VS 2012 with Intel 2015 update 1

However, it is not possible, stating "undefined variable xxx" but some other variables can be seen. So some works, some not.

However, the same variable can be accessed by the same code in VS 2008 with Intel 2013 in another colleague's computer.

May I know why? Is there some options I can change?

Thanks!

 

0 Kudos
8 Replies
Steven_L_Intel1
Employee
1,921 Views

We need some more information. Do you have a small test program we can look at? A screen shot of the Locals window would also be helpful.

0 Kudos
Andreas_Z_
New Contributor I
1,921 Views

Hi,

Is the variable that states "undefined variable xxx" defined in a module that you use in another program unit? If so, for debugging purposes, you need to also provide the module name (e.g., "modulename::variablename" in a watch statement) in Visual Studio. This was different in older MS Visual Studio / Intel Fortran editions.

Andi

0 Kudos
TimP
Honored Contributor III
1,921 Views
If you haven't set /Od which is default for debug optimization may have removed the store needed for visibility or you may want debug:inline-debug-info
0 Kudos
Wee_Beng_T_
Beginner
1,921 Views

Hi,

my program is rather large with different modules so it'll be difficult to make a small code, cos everything would have changed. I've grabbed a screen capture.

I already have /Od and adding in "debug:inline-debug-info" doesn't change anything.

Using module:variable gives syntax error.

My compile options are:

/nologo /debug:full /Od /fpp /I"Debug/" /I"D:\Lib\petsc-3.5.2_win64_vs2012" /I"D:\Lib\petsc-3.5.2_win64_vs2012/include" /I"D:\Lib\petsc-3.5.2_win64_vs2012/include" /I"D:\Lib\MPICH2/include" /warn:declarations /warn:unused /warn:uncalled /warn:interfaces /Qsave /fpe:0 /module:"C:\Obj_tmp\ibm3d_high_Re_staggered_AB2_mpi\Debug/" /object:"C:\Obj_tmp\ibm3d_high_Re_staggered_AB2_mpi\Debug/" /Fd"C:\Obj_tmp\ibm3d_high_Re_staggered_AB2_mpi\Debug\vc110.pdb" /check:all /libs:static /threads /c

with additional options:

/traceback  /gen-interfaces /warn:interfaces /fpe:0 /Z7 /debug:inline-debug-info

For linker:

/OUT:"C:\Obj_tmp\ibm3d_high_Re_staggered_AB2_mpi\Debug\ibm3d_high_Re_staggered_AB2_mpi.exe" /INCREMENTAL /NOLOGO /LIBPATH:"D:\Lib\petsc-3.5.2_win64_vs2012\lib" /LIBPATH:"D:\Lib\MPICH2\lib" /LIBPATH:"C:\Program Files\Tecplot\Tec360 2011R2\\bin" /MANIFEST /MANIFESTFILE:"C:\Obj_tmp\ibm3d_high_Re_staggered_AB2_mpi\Debug\ibm3d_high_Re_staggered_AB2_mpi.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Obj_tmp\ibm3d_high_Re_staggered_AB2_mpi\Debug/ibm3d_high_Re_wo_hypre.pdb" /SUBSYSTEM:CONSOLE /STACK:920000000 /qnoipo Gdi32.lib User32.lib Advapi32.lib Kernel32.lib Ws2_32.lib mpi.lib fmpich2.lib libpetsc.lib libflapack.lib libfblas.lib kernel32.lib tecio.lib cxx.lib

 

 

0 Kudos
Steven_L_Intel1
Employee
1,921 Views

A Locals screen would have been a bit more useful, but I think the problem is that the Fortran debugger support is not loading. Can you show me a Locals screen that includes the Type column where some variables can be seen and some cannot? Is this a Fortran-only application? Does an uninstall and reinstall of Fortran help?

0 Kudos
andrew_4619
Honored Contributor III
1,921 Views

Using module:variable gives syntax error. 

two colons :: are needed not one : 

0 Kudos
Wee_Beng_T_
Beginner
1,921 Views

Hi,

I have posted the local window.

2015-01-29_092929.jpg

Some variables are shown.

My global variables are all stored in the global_data module. Now using global_data::no_body_pts2 shows the values.

2015-01-29_093509.jpg

This was not required when using VS 2008 + Intel 2013. May I know when was this change implemented?

Also, why do some global variables require using "global_data::", some don't. It's kind of troublesome. Is there anyway to avoid it?

Thanks!

0 Kudos
Steven_L_Intel1
Employee
1,921 Views

From what I can see, the locals window is working just fine. The watch window will show "undefined" if the variable is not defined in the current scope.

Have you tried recompiling the whole program? This will make sure that you have the latest debug support in the executable.

0 Kudos
Reply