- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am declaring arrays as u(k,j,i) but while debugging the idb shows arrays as u(1), u(2)....etc.
If i try using print command in idb console:
print u(1,1,1)
it gives me error:
(idb) print u(1,1,1)
Error: u has 1 dimension and 3 were specified.
cannot evaluate u(1, 1, 1)
how so???
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1 more blunder...
This is a loop to read values from a file. nblk=1, so the loop will run only once. and jblk is also 1. the input in the file is: 1,3,10,3,10,3
do n = 1,nblk
read(10,*) (nbc(m), m=1,6)
if (n .eq. jblk) ibc(:) = nbc(:)
enddo
now after this i expected the values to be stored as:
nbc(1)=ibc(1)=1
nbc(2)=ibc(2)=3
nbc(3)=ibc(3)=10
nbc(4)=ibc(4)=3
nbc(5)=ibc(5)=10
nbc(6)=ibc(6)=3
But the idb shows the array in the window "locals" as follows:
nbc(0)=ibc(0)=1
nbc(1)=ibc(1)=3
nbc(2)=ibc(2)=10
nbc(3)=ibc(3)=3
nbc(4)=ibc(4)=10
nbc(5)=ibc(5)=3
What the heck is wrong with idb????
Here i specified the indices as 1-6 explicitly. Still its nt taking it correctly. This is making the code run in wrong way, as when i have a conditional statement:
if (ibc(6)=3)
it doesnt make any sense, as there is some garbage value in ibc(6) and its true value gets stored in ibc(5). This is happening every where in the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The first item (idb) print u(1,1,1) seems to be an issue. I'm investigating this.
However, the second part is not reproducible on my side.The GUI (Locals and Evaluations windows) shows correct values.
Which is your platform (32/64bit), OS, compiler package (11.1.069 would be the newest one).
Hubert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I investiagted also the first issue (print(1,1,1)), but could really find a problem. idb prints multi-dimensional arrays w/o problems. The error message indicates that the array is not defined as multi-dimensional whereas you tried to print it as such.
Please add a reproducible testcase if you still think there is a problem with idb multi-dim arrays print.
Hubert.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page