- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am currently using Intel Visual Fortran w_fcompxe_2013_sp1.0.103.
I am trying to write out the contents of a multi-dimensional allocatable array using array notation. The lower bound of the first dimension is not 1. However, there seems to be an indexing bug in the compiler.
For example, I declare the array
integer, dimension(:,:), allocatable :: itestarray
Then, I allocate the array.
allocate(itestarray(2:5,3)).
I then fill the array with sequential integers from 1 to 12.
I then write the array out using the syntax
write(6,*) itestarray(:,1:3)
I obtain the following result:
1 2 3 4 6 7 8 9 11 12 -1163005939 -1410400530
Apparently, the first column prints alright. However, on subsequent columns, we are skipping one element for each column. Eventually, we get a garbage result for the last two elements.
The array however writes out correctly if we use
write(6,*) itestarray
or
write(6,*) itestarray(:,:)
or
write(6,*) itestarray(lbound(itestarray,1):, 1:3)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-deleted-
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This looks like a bug to me. It's seen only in the compiler for IA-32, not in the one for Intel64 with 64 bit OS. I will escalate to engineering to be fixed. In the meantime, you've already figured out the straightforward workarounds.
Thanks for the report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On further testing, I found that this was already fixed in the first update to the 14.0 compiler, 14.0.1.139, so I don't think there's anything for engineering to do here. If your support is current, you should be able to download the updated compiler from registrationcenter.intel.com.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I have downloaded the update, and everything works fine now.

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