- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using module:variable gives syntax error.
two colons :: are needed not one :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have posted the local window.
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.
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page