- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Intel fortran 19.1.0055.15 on Visual Studio 2017 in windows 10 and I cannot see the right information in the watch window for this simple derived type.
PROGRAM MAIN
IMPLICIT NONE
TYPE state_vector
REAL(8),ALLOCATABLE,DIMENSION(:)::y
END TYPE state_vector
TYPE STATES
TYPE(state_vector)::q,qp
END TYPE STATES
TYPE(STATES)::coord
ALLOCATE(coord%q%y(5))
coord%q%y=1.d0
ALLOCATE(coord%qp%y(3))
coord%qp%y=0.d0
PRINT *,coord%q%y
PRINT *,coord%qp%y
END PROGRAM MAIN
When I run the code, the console offers the right result, which is:
1.00000000000000 1.00000000000000 1.00000000000000
1.00000000000000 1.00000000000000
0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000
Nevertheless, if I try to see these variables in the watch window, I get exactly the same dimensions for coord%q and coord%qp:
Nombre | Valor | Tipo | |
---|---|---|---|
◢ | coord | {...} | TYPE(STATES) |
◢ coord%Q | {...} | TYPE(STATE_VECTOR) | |
◢ coord%Q%Y | (1:5) | REAL(8) | |
coord%Q%Y(1) | 1.00000000000000 | REAL(8) | |
coord%Q%Y(2) | 1.00000000000000 | REAL(8) | |
coord%Q%Y(3) | 1.00000000000000 | REAL(8) | |
coord%Q%Y(4) | 1.00000000000000 | REAL(8) | |
coord%Q%Y(5) | 1.00000000000000 | REAL(8) | |
◢ coord%QP | {...} | TYPE(STATE_VECTOR) | |
◢ coord%QP%Y | (1:5) | REAL(8) | |
coord%QP%Y(1) | 1.00000000000000 | REAL(8) | |
coord%QP%Y(2) | 1.00000000000000 | REAL(8) | |
coord%QP%Y(3) | 1.00000000000000 | REAL(8) | |
coord%QP%Y(4) | 1.00000000000000 | REAL(8) | |
coord%QP%Y(5) | 1.00000000000000 | REAL(8) |
Any advice or idea on what's happening?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See this thread: https://community.intel.com/t5/Intel-Fortran-Compiler/Nested-allocatable-type-with-allocatable-components/td-p/1163698
My hunch is what you're noticing is another aspect of a long-standing issue with Intel Parallel Studio and Fortran compiler integration with Visual Studio where working with ALLOCATABLE objects, particularly components of derived types and especially nested derived types, are not handled reliably in the debugger.
You may want to submit another support request to Intel Support, chances are starting with some recent reincarnation of Visual Studio 2019 and Intel software revamping, there will be some progress on this matter - your case will be good for Intel to include in their checking.
In the meantime, as shown in the link to the other thread, you can try the ASSOCIATE construct as a workaround to help with your debugging.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much Fan, I'll have a look at that thread and workaround.
I have put a ticket yesterday and they aswered this (I paste it here because it has nothing confidential, I guess, I hope Barbara is not going to be mad at me), they added it to some other open bug:
The problem is that I am stuck in version 2019 update 2 due to other bugs that I submitted before to Intel (not corrected until 2020 update 1).
It is quite annoying, it seems that not many people are working on the fortran compiler nowadays, I currently have 7 open bugs with them...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Fortran Fan, at least the ASSOCIATE workaround works. It seems that the problem comes from way before than I thought, because I checked the Intel 2019 update 2 and already has the issue, so it does not solve my problem, I think you have to go until Intel 2018 to get the right debugger information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apparently the issue has been fixed in the recently released Intel Fortran Compiler (the say). I didn't have time to check it though.
Let's hope this and other debugging issues are fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can confirm that at least this issue was fixed in the mentioned release.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page