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

watching global variables

wg205
Beginner
2,729 Views

Hi,

I'm using IFC10.0 and Visual Studio 2005 Profesional. During debugging of the code I'm able to watch local variables but not the global ones. Is there a way to watch them?

0 Kudos
20 Replies
Steven_L_Intel1
Employee
2,701 Views

If they are module variables, you can use the syntax modname::varname in a watch window.

0 Kudos
Kevin_D_Intel
Employee
2,701 Views

Can you provide some additional source code context or perhaps small example that offers insight into the declaration of these global variables?

It would be helpful to know the package id for your 10.0 compiler, or the Build Date of the actual compiler (disable: Properties > Fortran > General > Suppress Startup Banner) and re-compile a single source file, or at least the version of the Intel Visual Fortran compiler integrations with Visual Studio accessible via: Help >About (under the MSVS IDE)

If it is convenient, you might also try a newer IVF 10.1 release (specifically 10.1.025) available from the Intel Registration here.

0 Kudos
wg205
Beginner
2,701 Views

After some trials I found that I can watch global variables if the module where they are declared is plugged directly into subroutine instead of having use statement for whole module. eg

I can watch variables declared in config_module in such construction:

module boggitt_module
implicit none
contains
subroutine set_boggitt(idnode)
use config_module
implicit none

(...)

end subroutine set_boggitt

end module boggitt_module

and I can't do that if use statment is outside the subroutine:

module boggitt_module

use config_module
implicit none
contains
subroutine set_boggitt(idnode)
implicit none

(...)

end subroutine set_boggitt

end module boggitt_module


In this way variables declared module wide are not watchable.


This solution: modname::varname in a watch window allows me to track module variables, although it is not that convenient like the ones for local variables.

Thanks for your help.







0 Kudos
Steven_L_Intel1
Employee
2,701 Views

Up through version 10.1, you could not view "uplevel referenced" variables in the debugger. This is fixed in version 11.0, to be released in November.

0 Kudos
Antoon
Beginner
2,701 Views
Hi,
I am strugging with the same problem, all my global arrays are defined in a module, but I can't watch the arrays.
I moved the use assoc from the module header to the subroutine body (same as you did), but I still can't watch the global data, apart from inserting the module name before the array name. Does this work in general or is it by accident that you can watch now your data.
Any idea what I am doing wrong ?
Bye,
Antoon
0 Kudos
sjors
Beginner
2,701 Views

Up through version 10.1, you could not view "uplevel referenced" variables in the debugger. This is fixed in version 11.0, to be released in November.

Dear Steve,

I just tried the latest version of 11.0 (i.e. 11.0.066) to see whether this problem is indeed solved. Me and many of my collegues find it impractical not to be able to view "uplevel referenced" variables during debugging. Since we bought version 10.1 I could only install 11.0 only as an evaluation version, but the problem still seems to be present. Are additional settings required? And will there also be a fix for version 10.1?

Regards Arjen

0 Kudos
Steven_L_Intel1
Employee
2,701 Views

The problem is fixed in 11.0. It's possible that you are not using the 11.0 compiler - go to Tools > Options > Intel Visual Fortran > Compilers and make sure that 11.0 is selected. This fix required major changes to several parts of the compiler and will not be retrofitted to 10.1.

If you have a test case where this still doesn't work, I'd like to see it.

0 Kudos
eos_pengwern
Beginner
2,701 Views

The problem is fixed in 11.0. It's possible that you are not using the 11.0 compiler - go to Tools > Options > Intel Visual Fortran > Compilers and make sure that 11.0 is selected. This fix required major changes to several parts of the compiler and will not be retrofitted to 10.1.

If you have a test case where this still doesn't work, I'd like to see it.

I upgraded to V11.0 last week on the advice of Premier Support, precisely because of this issue. I found that, in V11.0, the issue was fixed for my simple test program which had a small number of variables held in a single module.

However, for my main application (a multi-module DLL), I find that I can view scalar module variables but not arrays. I have checked carefully to see that the V11.0 compiler is invoked, and the behavior is certainly different from before because in 10.1 I couldn't even view scalar module variables in the debugger.

I'm wondering if it's something to do with the fact that my project was automatically converted to a V11.0 project, whereas my test program was built as a 'native' V11.0 project. I suggested this possibility to Premier Support when I wrote up the issue on Tuesday last week, but so far I haven't heard back from them. For the time being I'm doing my normal workaround, which is to make local copies of allthe module variables that I want to watch. It's ugly, but it gets me there for now.

0 Kudos
Steven_L_Intel1
Employee
2,701 Views

Conversion of the project is not relevant. Did you supply to Premier Support a test case that shows the problem in 11.0?

0 Kudos
eos_pengwern
Beginner
2,701 Views

Conversion of the project is not relevant. Did you supply to Premier Support a test case that shows the problem in 11.0?


Not yet; I haven't been able to come up with a medium-size application that shows the problem; I'll send them the whole DLL if they ask, but only if they ask.

0 Kudos
sjors
Beginner
2,701 Views

The problem is fixed in 11.0. It's possible that you are not using the 11.0 compiler - go to Tools > Options > Intel Visual Fortran > Compilers and make sure that 11.0 is selected. This fix required major changes to several parts of the compiler and will not be retrofitted to 10.1.

If you have a test case where this still doesn't work, I'd like to see it.

Dear Steve,

I already uninstalled the test version of 11.0 but I tried again, and it seems I checked a couple of global variables that were actually parameters; the rest seems to work fine. If we decide to switch from 10.1 to 11.0 we need to buy update support again, of which we just ran out. If I have to convince my manager to buy about 10 licenses I need to come up with a bit more than the ability to finally watch your global variables. The list of new features don't show me things that we specifically use, but I sometimes use the Module Wizard and we are interested in using the two CPU's of our duo core computers. The module wizard has been updated, but what are the differences? The answers to these questions might help me convince my manager to buy new support again, but if I should ask the questions somewhere else, let me know.

Cheers Arjen

0 Kudos
Steven_L_Intel1
Employee
2,701 Views

I am not aware of any general changes to the Module Wizard. We did fix a problem (if I recall correctly) in the automation library where INTEGER*1 arguments were not supported.

We made a long list of improvements, including performance, as well as bug fixes in version 11. We're no longer fixing bugs in version 10.1 except for extremely serious problems that block major applications from building, so if you encounter problems with 10.1 your options will be limited (actually more limited since your support expired). You'll have to make the case to your manager as to whether or not to extend the support term.

0 Kudos
alexrozen
Beginner
2,701 Views

The problem is fixed in 11.0.
If you have a test case where this still doesn't work, I'd like to see it.


We have checked this issue yesterday. After 10.1 -> 11.0 upgrade (10.1 compiler was totally uninstalled) we got out, that about half of module variablesare nowshowing their values during debug. But not all of them. I can't find the criteria.
I have attached the screenshot and the smalltest case.
0 Kudos
alexrozen
Beginner
2,701 Views
FE1.F90
Quoting - alexrozen
I have attached the screenshot and the smalltest case.

Sorry, did not attached files in the previous message :(
0 Kudos
Steven_L_Intel1
Employee
2,701 Views
Hmm - seems to work for me using 11.0.066.


0 Kudos
alexrozen
Beginner
2,701 Views
Hmm - seems to work for me using 11.0.066.

Really strange... The same I have installed.

0 Kudos
alexrozen
Beginner
2,701 Views
Hmm - seems to work for me using 11.0.066.


Ok. I have got the trick. Aftersolution rebuilding all began to work fine. The test case was imported from Fortran-10.1-charged PC, so it was my shame.

But now I have the sample with alittle more tricky behaviour. "Here it works, but there does not".

0 Kudos
Steven_L_Intel1
Employee
2,701 Views
Interesting. I can reproduce that and will send it on to the developers for them to look at.
0 Kudos
alexrozen
Beginner
2,701 Views
Interesting. I can reproduce that and will send it on to the developers for them to look at.

We still hope it to be fixed.
0 Kudos
Steven_L_Intel1
Employee
2,539 Views
It will be fixed in the upcoming version 11.1.
0 Kudos
Reply