Acces to Fortran module variables while debugging

Acces to Fortran module variables while debugging


Since my update to Visual Studio 2012 with Intet Fortran 2013, I no longer have acces to all my modules variables in the display windows while debubbing under idb.

I managed to create a small program which leads to the same bug (at the end of my post). If I execute it in debug mode, let's say with a break point at the "write" line, I can check the values of arrays X and Z but no Y (error : "Undefined variable Y"). I think it's beacuse "X" is used in the main program to define variable "TOTO" and "Z" because the compiler "sees" it in the "IMPLICIT REAL*8(A-H,O-Z)" during compiling.

I know it worked under VS2008 with Intel Fortran 2011 (my previous VS version), and I wondered if something has changed or if I made mistakes ?

Thank you so much in advance for your answers.

Best regards,


PS : the code exemple (and the log file in .docx format).


    ALLOCATABLE :: X(:),Y(:),Z(:)

    ALLOCATE (X(100),Y(100),Z(100))
    X = 1.d0
    Y = 2.d0
    Z = 3.d0
    program TestMod
    use monmod

    TOTO = X(1)
    WRITE(*,*) TOTO

    end program TestMod

Downloadapplication/vnd.openxmlformats-officedocument.wordprocessingml.document BuildLog_0.docx15.03 KB
7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Mathieu,

what has changed is that in Microsoft Visual Studio 2012 the symbol information handling and debugger backend architecture has changed considerably.

We have made quite a few updates to our Fortran Expression Evaluator that plugs into Visual Studio  as well as the symbol info handling in our Fortran compiler with the latest Parallel Studio XE / Fortran Compose XE 2013 SP1 release in late September. Thus I am optimistic that what you observe is already addressed.

Could you test against this latest version of our Parallel Studio XE product in the context of VS2012?

If the problem persists I may have to escalate and file a defect with our development team.

Thanks, Rob

Hi Robert,

Thank you very much for you answer !

Actually, I didn't know there was a update available because my Intel Software Manager seems to not work correctly...(I'm under a professional network...).

Well, I still managed to download the update and upgrade from Fortran Compose XE 2013 version 13 to SP1 version 14.0 but I still have the same issue with the same small program I sent...

I double checked that VS2012 does use the new SP1 compiler and not the version 13.

I'll be very glad if you have any solutions ? Or any workarounds ? The thing is I really don't know where to begin my investigation... (I thought about pdb files issues for instance ?)

Thanks again.




Hi Mathieu,

our Fortran symbol info expert had a closer look at this issue for me:

The situation is that our compiler emits symbol information only for those module variables that are referenced in the source code.

Hence the module variable Y is not accessible from the main program TestMod because it is not referenced there.

However you can still display that variable in the debugger using MONMOD::Y expression.

Does this behavior meet your usage needs?

If not I can file a feature request with our Fortran compiler development team. It would however be a slightly bigger effort to implement such a change.

Thanks, Rob



Hi Rob,

Thank you very much for your quick answer ! I tried your solution with the MONMOD::Y in the watch window and it worked perfectly ! I didn't know the "::" trick...

I guess my team and I will have to get used to this new behaviour, because we were used to the previous Fortran Compiler version where it worked directly by using only the name of the variable without the module name followed by the "::" sign (even if the variable wasn't referenced in the source code). It might have changed with this new version 2013...

So thanks again for the support (and thanks to your Fortran Symbol expert also)



Thanks Mathieu,

please feel free to let us know if you run into any other issues or have additionl questions.


I have a related question which I believe follows naturally from the above discussion. Is it possible to go the other way round with the MONMOD::Y syntax? Namely I have a variable and would like to list the parent module(s)...

Leave a Comment

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