Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

Viewing array components in a derived type in Array Visualizer

larsm
Beginner
597 Views
0 Kudos
3 Replies
Intel_C_Intel
Employee
597 Views
Yes it's true that support for viewing arrays of derived types is not implemented. We currently don't have any plans to implement it; till now I don't think we've had anyone request this feature!
If you would file a feature request with Premier Support, that would help us better track this. (And you will get notified once it's available.)
It is possible to add some code to your program so that arrays of derived types can be displayed with Array Visualizer. See the sample program: Array Visualizer/Samples/Fortran/Simple.
John
0 Kudos
larsm
Beginner
597 Views

Im not sure that we are discussing the same thing.

Just to make it clear:

My concern is to be able to view an array component of a derived type when debugging a normal Fortran program like this:

.

.

.

TYPE mytype

REAL, DIMENSION(1:100) :: a

END TYPE mytype

.

.

.

TYPE(mytype) :: b

.

. Define b somehow here.

.

How can view b%a in the debugger here?

.

.

.

Im sure this must be a common case and will be even more so when the parameterized derived types and object-oriented features from Fortran 2003 will be implemented.

It works very well in CVF (I can just type in b%a). How do you do the corresponding thing here? It seems overkill to have to declare an array of the same type and shape, that is not in a derived type, and assign b%a to it, to be able to view it in the debugger. Have I missed something trivial?

Best wishes

Lars M

0 Kudos
Intel_C_Intel
Employee
597 Views
Yes, we're talking about the same thing. Currently in IVF you can't use "View Array" on any derived type even if the type consists just of an array. I agree that this is a common usage; we'll work on adding support for this in a future release.
As a stop-gap you can add some calls to the AV library to view the array. It's not as convenient as clicking "View Array", but it's not that many lines of code. Take a look at the attachment "derivedtype.f90".
John
0 Kudos
Reply