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

Problem in debugging allocatable arrays in MVS 2012

Arash_Rasekh
Beginner
1,782 Views

Hi,
According to Intel® Parallel Studio XE 2013 for Windows* Installation Guide and Release Notes, there was a problem in evaluating expressions during debugging Fortran applications in Microsoft Visual Studio 2012. After updating to Intel® Parallel Studio XE 2013 for Windows* Update 1, this problem solved but new problem occurs during debugging.
Allocatable user defined arrays contents can't be shown in debugging mode. Watch list value for scalar intrinsic contents of these UDTs (like scalar integers, or reals) is undefined address and nested UDTs can not be collapsed.
I attached a screenshot where shows this problem. As you can see, ELEMENT_NUMBER where is a scalar integer has undefined address and other nested allocatable arrays like INTERNAL_NEIGHBORS where is a allocatable integer array can not be collapsed and consequently its contents can not be shown.
Is there a fix for this problem (except using MVS 2010), or i have to wait for next update pack?
Regards
Arash

0 Kudos
9 Replies
Arash_Rasekh
Beginner
1,782 Views
No idea?
0 Kudos
Anonymous57
Beginner
1,782 Views
Hi Arash, This sounds like a bug but before we can confirm this would it be possible to provide a small test case which reproduce the problem you experience? This would speed up our investigations. Best Regards, Bernth
0 Kudos
Arash_Rasekh
Beginner
1,782 Views
Sure. Following test case produce such a result for me. i use Microsoft Visual Studio 2012(11.0.50727.1) with Intel Parallel Studio 2013 XE(2013.1.119). module module_test integer, parameter :: wp = kind(1.0d0) type :: type_node_2d integer :: node_number integer :: local_number real(wp) :: x=0._wp,y=0._wp end type type_node_2d type,abstract :: type_element_base integer :: element_number=10 real(wp) :: volume logical :: flag=.false. ! logical flag type(type_node_2d),allocatable :: nodes(:) integer :: number_of_boundaries=5 integer :: number_of_interfaces=5 integer,allocatable :: internal_neighbors(:) end type type_element_base !------------------------------------------------------------------------------------- type :: type_element_container class(type_element_base),allocatable :: element end type type_element_container !-------------------------------------------------------------------------------------- type,extends(type_element_base) :: type_element_triangle end type !--------------------------------------- type,extends(type_element_base) :: type_element_quadritaeral end type end module module_test !------------------------------------------------------------------------------------ program test use module_test type(type_element_container),allocatable :: elements(:) ! body allocate(elements(10)) do i=1,5 allocate(type_element_triangle :: elements(i).element) allocate(elements(i).element.internal_neighbors(3)) end do do i=6,10 allocate(type_element_quadritaeral :: elements(i).element) allocate(elements(i).element.internal_neighbors(4)) end do end Best Regards, Arash
0 Kudos
osrondon
Beginner
1,782 Views
Arash, I have been having the same problem since I reported it back in February 2012. The debugger is seeing arrays as not being allocated when they are actually allocated and being used in the program. I am still having the same issue so it all looks it has not been fixed yet.
0 Kudos
Arash_Rasekh
Beginner
1,782 Views
I hope they fix this issue soon.
0 Kudos
Steven_L_Intel1
Employee
1,782 Views
Arash, I tried your program with Intel Fortran 13.0.1 and VS20210 and I can see the values of the nested allocatable arrays in the debugger. What are you seeing?
0 Kudos
Arash_Rasekh
Beginner
1,782 Views
Hi Steve, Thank you for your responding. As i mentioned in first post, the problem is within MVS 2012 not 2010.
0 Kudos
Steven_L_Intel1
Employee
1,782 Views
Sorry for missing that.
0 Kudos
Anonymous57
Beginner
1,782 Views
Hi Arash, Thank you for the test case. Yes this is a bug and engineering has implemented a fix which we expect to be included in the next update. Regards, Bernth
0 Kudos
Reply