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

Watching Allocatable Things

Intel_C_Intel
Employee
735 Views
TYPE tTest
INTEGER(1), DIMENSION(:), POINTER :: a
INTEGER :: b
REAL(8), DIMENSION(:), POINTER :: c
INTEGER :: d
REAL(8), DIMENSION(:), POINTER :: e
INTEGER :: f, g
END TYPE tTest

TYPE (tTest), DIMENSION(:), POINTER :: Test


Is there anyway to watch the contents of 'Test' after it has been allocated / set...? Nothing I try in the debugger seems to work...must I resort to the 'Memory' window?
0 Kudos
8 Replies
Steven_L_Intel1
Employee
735 Views
Which compiler and version are you using? This works fine for me in CVF 6.6, for example.

If you're using CVF, be sure you have run Per-User Setup from Start..Programs..Compaq Visual Fortran 6.

Steve
0 Kudos
Intel_C_Intel
Employee
735 Views
Steve, I'm using CVF 6.6B.

Test and tTest are private memebers of a MODULE, does that make a difference?

If I put 'Test' in the watch window I just get 'Undefined variable Test'
0 Kudos
Intel_C_Intel
Employee
735 Views
Running 'Per User Setup' doesn't help...
0 Kudos
Intel_C_Intel
Employee
735 Views
The module is also SAVEd...
0 Kudos
Steven_L_Intel1
Employee
735 Views
Ah, it does make a difference if it's in a module. As explained in the manual, you need to use the syntax modulename::variablename in the watch window for module variables.

Steve
0 Kudos
Intel_C_Intel
Employee
735 Views
Thanks Steve, I figured it might be something like that, since I new about imported common block names in DLLs (commmonname.variablename etc.). I even tried module.variable, module%variable etc. ... just couldn't get the syntax.

I appreciate the very polite 'RTFM' too :) My bad :)
0 Kudos
mike_gaitens
Novice
735 Views
Steve,
Thanks much for your reply. You've just cured my #1 reason for avoiding modules.

However, your "explained in the Manual" comment leaves me puzzled. I can't find this tidbit anywhere in the Version 6.6B documentation. Could you please either give me a reference so I can start trying to find out why my "Entire Collection" isn't complete, or include your manual in the Ver. 6.6C release.
0 Kudos
Steven_L_Intel1
Employee
735 Views
Programmer's Guide..Debugging Fortran Programs..Viewing Fortran Data Types in the Debugger..Specifying Module Variables:

To view a module variable in the Watch window, specify the module name, followed by "::", followed by the variable name.

For example, to watch variable "bar" of module "foo", specify the following expression:

foo::bar

0 Kudos
Reply