- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello !
I'm trying to use VS2012 as a debugger for my Fortran library, and can't see the variables in watch window.
On theThe particular thing is that I'm compiling a *.pyd library callable in Python with f2py, which generates a C Interface and calls the C and Fortran compiler (see the attached file with a little test project, and f2py_vs.py which enables to compile every thing from visual Studio with a Custom build step).
I set debug mode in ifort and linker, so far I can get the pdb file vc110.pdb for the Fortran, and "link.pdb", for the link (see the zip file attached). I don't have generated the C wrapper debug symbols, because in that case I failed to link (because I should recompile Python interpreter in debug...). No matter, I can run my library in VS and stop to breakpoints ( setting "C:\Python27\Python.exe" in Fortran Project Properties -> Debugging -> Command, "myScript.py' as command argument, and the output folder as working directory).
But I cannot seeing the proper value of variables in watch window and that's my point (most of the time, I got "undefined pointer/array" for arrays, and wrong values for variables)
I looked throught that forums and checked these topics, I'm running VS2012 Update 3, and fee.dll on 13.0.2225.2 version, and Enable native and continue is off, so this problem should be fixed.
https://software.intel.com/en-us/forums/topic/392429
https://software.intel.com/en-us/forums/topic/508718
Thx for your help
Ferdinand
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't figure out how to use the Python script you provided. I get as far as:
Traceback (most recent call last):
File "f2py_vs.py", line 12, in <module>
from numpy.distutils.core import Extension
ImportError: No module named numpy.distutils.core
I am not conversant with Python.
Can you provide a walkthrough of the steps needed to show the problem? The symptom suggests that the Fortran debug support isn't loading, but you have so many variables here it's hard to know where to start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What I have found in VS2013 is that Fortran variables are REQUIRED to be all in CAPITALS in order to watch them! Ridiculous because Fortran is, generally, a case insensitive language in contrast to C++. In Fortran, iWalkT is the same variable as IWALKT but try and gfet VS2013 to figure that out!
In VS2010, I was used hovering the mouse over a variable name to get the contents (arrays or structures included) or Selecting the variable, Right click and Add Watch would get the variable, array or structure added.
Not so in VS2013! Now I get for iWalkT being 0:
IWALKT 0 long
iWalkT CXX0017: Error: symbol "iWalkT" not found
Does anyone have a solution for this or is Microsoft excluding Fortran from their Managed code stuff?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, what you have found is that you aren't getting the Fortran debug support loaded. Are you calling Fortran from managed code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Brian C. wrote:
What I have found in VS2013 is that Fortran variables are REQUIRED to be all in CAPITALS in order to watch them! Ridiculous because Fortran is, generally, a case insensitive language in contrast to C++. In Fortran, iWalkT is the same variable as IWALKT but try and gfet VS2013 to figure that out!
In VS2010, I was used hovering the mouse over a variable name to get the contents (arrays or structures included) or Selecting the variable, Right click and Add Watch would get the variable, array or structure added.
Not so in VS2013! Now I get for iWalkT being 0:
IWALKT 0 long
iWalkT CXX0017: Error: symbol "iWalkT" not found
Does anyone have a solution for this or is Microsoft excluding Fortran from their Managed code stuff?
Brian C.,
As I mentioned in your other post (https://software.intel.com/en-us/forums/topic/358992), I have no such issues with managed code interoperating with Fortran; albeit I'm using Intel Fortran compiler 15 version. It appears something may be amiss with your Intel Fortran installation. By the way, I assume you've turned on "Enable native code debugging" in your .NET project(s) - can you confirm?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello !
Sorry for the delay in answering. I tried to reproduce my problem with a more simple solution (f2py_vs.py is my "makefile" which enables to take a vfproj and to compile it with f2py). Here's a zip file containing :
1. readme.docx and install binaries to reproduce my developping environment on my machine
2. the solution, compiling a *.pyd file in build\lib.win-amd64-2.7. This script contains also the script myScript.py, which launch the "copy" subroutine. To run it in debug, configure in Project Properties > Debugging
- Command : C:Python27\Python.exe
- Command arguments "myScript.py"
- Working dir : build\lib.win-amd64-2.7
I still got the same error, and upper/ lower case don't change anything. Any idear ?
Thanks for your answer,
Ferdinand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FortranFan wrote:
Quote:
Brian C. wrote:
What I have found in VS2013 is that Fortran variables are REQUIRED to be all in CAPITALS in order to watch them! Ridiculous because Fortran is, generally, a case insensitive language in contrast to C++. In Fortran, iWalkT is the same variable as IWALKT but try and gfet VS2013 to figure that out!
In VS2010, I was used hovering the mouse over a variable name to get the contents (arrays or structures included) or Selecting the variable, Right click and Add Watch would get the variable, array or structure added.
Not so in VS2013! Now I get for iWalkT being 0:
IWALKT 0 long
iWalkT CXX0017: Error: symbol "iWalkT" not found
Does anyone have a solution for this or is Microsoft excluding Fortran from their Managed code stuff?
Brian C.,
As I mentioned in your other post (https://software.intel.com/en-us/forums/topic/358992), I have no such issues with managed code interoperating with Fortran; albeit I'm using Intel Fortran compiler 15 version. It appears something may be amiss with your Intel Fortran installation. By the way, I assume you've turned on "Enable native code debugging" in your .NET project(s) - can you confirm?
Brian C.,
The setting should be available in your .NET project where you go to the .NET project's properties, go to the Debug section and look under "Enable Debuggers" (bottom, middle section of the window).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try changing the value of "Tools/Options/Debugging/General/Use Managed Compatibility Mode". For me, working in VB.Net and Fortran, I must have it on for one set of code and off for the other. This is a new problem in VS2012 & 2013.
There does not appear to be a way to have the Watch variables available in both languages at the same time. I posted this problem some months ago, but was told "That's just the way it is."
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page