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

debug variables in user-defined type in a module?

Li_Dong
Beginner
814 Views
Hi, all,

I'm using Intel Visual Fortran in Windows XP, and I wrote a program that has a module with user-defined type, like this

[plain]type cell
real(8) :: x_center
real(8) :: x_left
real(8) :: x_right
real(8) :: dx
real(8), allocatable :: u_left(:)
real(8), allocatable :: u_right(:)
real(8), allocatable :: q_mean(:)
real(8) :: q_left
real(8) :: q_right
real(8) :: integral_flux_left
real(8) :: integral_flux_right
real(8) :: fractional_flux_left
real(8) :: fractional_flux_right
character(10) :: reconstruction_type
real(8) :: slope
end type cell[/plain]
My problem is when I am debugging, I can't watch a variable in "cell" type!

Thanks for help!

DONG Li
0 Kudos
5 Replies
Li_Dong
Beginner
814 Views
By the way, I can watch it in Linux.
0 Kudos
ArturGuzik
Valued Contributor I
814 Views
Quoting - dong_li_1985
By the way, I can watch it in Linux.

Hi,

which version do you use (on Windows). The derived type variables are visible in VS debugger in IVF version 11.X (and perhaps from 10 something, Steve will know the details). If you want to see the variables inside module then the "old" way of doing this was to type (in watch window)

Module_Name::variable_name


A.
0 Kudos
Li_Dong
Beginner
814 Views
Quoting - ArturGuzik

Hi,

which version do you use (on Windows). The derived type variables are visible in VS debugger in IVF version 11.X (and perhaps from 10 something, Steve will know the details). If you want to see the variables inside module then the "old" way of doing this was to type (in watch window)

Module_Name::variable_name


A.
Hi, ArturGuzik,

I'm using 11.0.061. And I have tried with "Module_Name::variable_name" in watch window, it works! But need I do this everytime?

Thanks for replying!
0 Kudos
ArturGuzik
Valued Contributor I
814 Views
Quoting - dong_li_1985
Hi, ArturGuzik,

I'm using 11.0.061. And I have tried with "Module_Name::variable_name" in watch window, it works! But need I do this everytime?

Thanks for replying!

Well, I'm not sure now, but certainly Steve can provide definite answer to that. I have version 11.0.072 and everything works there, I mean, you just use cursor to get info (no typing needed). I recall that the improvements to the debugger (displayed symbols) were introduced "recently", although I'm a bit confused with all that versions, betas etc.

A.
0 Kudos
Steven_L_Intel1
Employee
814 Views
I can't easily test right now using both an 11.0.074 compiler and 11.0.074 VS integration, but I do see that using 11.0.074 compiler and the 11.1 VS integration works - the module variable shows up under locals and I can watch it without naming the module. This requires that the module be USEd and the variable be referenced within the routine where I want to look at it. Otherwise, the modname::varname syntax is needed.
0 Kudos
Reply