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

idb and derived type values

Wee_Beng_T_
Beginner
1,054 Views
Hi,

I am trying to use the intel debugger to debug my codes. I am using derived types e.g.:

type ghost

integer :: i,j

real :: xy(2)

end type ghost

type (ghost), gg(2)

Compiling is not a problem.

When I tried to use idb to debug,

it can show the values of xy, i,j etc when I hover the cursor next to gg. However, if I choose "on selection" and "evaluate", I can see the i,j etc but not the values.

Since gg can be a big matrix, it's difficult to find the variable I want using the hover mtd. So how can I see the values inside a derived type?

Thanks!
0 Kudos
1 Solution
Ron_Green
Moderator
1,054 Views
Ah, I see what you see and I have a solution. That Evaluations 1 window has a ridiculously wide column for "Expression" - scroll over right using the lower scrollbar on that window OR maximize the window. The values are there, just hidden by the huge first column for Expression
ron

View solution in original post

0 Kudos
9 Replies
Ron_Green
Moderator
1,054 Views
You didn't say which version you are using, so I'll assume the lastest 12.0 aka Composer XE.

Compile with -g -O0 obviously.

set a breakpoint. Go to the breakpoint.

You can use 2 things:

1) View menu, Locals will show gg, you can expand it and array elements (types), expand a particular array element like gg(50), open up and view all the components. Works for me.

2) highlight gg, View -> Evaluations 1 (or 2, or 3, or 4). Think of these as workpads or scrap paper. Now highlight gg and drag it to the Evaluations window. Once on there, it can expand and dive into each and every array element and components.

ron
0 Kudos
Wee_Beng_T_
Beginner
1,054 Views
Hi Ronald,

I tried and for the 1st method, it works, as shown in fig1.

However, the 2nd method does not work, as shown in fig2.

Thanks for the help.

In more complicated codes, I often can't see the derived variable in the local menu. So I can only use the 2nd method but it doesn't work in this case.

So what can I do?

0 Kudos
Ron_Green
Moderator
1,054 Views
remind me what compiler and idb version you are using. Also, what JRE version.

ron
0 Kudos
Wee_Beng_T_
Beginner
1,054 Views
Hi Ron,

I am using JAVA:

OpenJDK Runtime Environment (IcedTea6 1.9.2) (6b20-1.9.2-0ubuntu2)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

IDB:

Intel Debugger for applications running on Intel 64, Version 12.0, Build [1.3842.2.129]

ifort:

Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.0.0.084 Build 20101006
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY

I'm running ubuntu 10.10.

My options during compile is :

-g -O0 -r8 -save -w90 -w -w95 -c

Hope this helps. Thanks.
0 Kudos
Ron_Green
Moderator
1,055 Views
Ah, I see what you see and I have a solution. That Evaluations 1 window has a ridiculously wide column for "Expression" - scroll over right using the lower scrollbar on that window OR maximize the window. The values are there, just hidden by the huge first column for Expression
ron
0 Kudos
Ron_Green
Moderator
1,054 Views
or resize the Expression column to be smaller so that the values appear.
0 Kudos
Wee_Beng_T_
Beginner
1,054 Views
Thanks Ron,

Never expected it to be so simple ;-)
0 Kudos
Ron_Green
Moderator
1,054 Views
I didn't either. Like you, I was looking at that window saying "yes, looks like a bug". Just on a lark I decided to see if maximizing/minimizing would refresh the screen and that's when I saw the values and the scroll bar.

I'll put in a request to reduce the size of the variable column so it's more obvious to the next person.

ron
0 Kudos
Wee_Beng_T_
Beginner
1,054 Views
Hi,

I realised that some of the global variables are actually not found when I am not in the subroutine which is evaluating the variables. For e.g., I use :

print ax

These variables are declared using the allocate syntax

also, in the evaluation window,

I tried to enter something like u(1:10:2) but it doesn't work. Is there anyway to get it to work? It works fine if I use:

print u(1:10:2) in the debugger commands.

Thanks again!
0 Kudos
Reply