- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm experimenting with the iso_fortran_binding facilities. I have found something that may be a bug.
The compiler Version is:16.0.0.109 Build 20150815
I have written the following C routine:
#include <stdio.h> #include "ISO_Fortran_binding.h" void printarraydesc(const CFI_cdesc_t * vin) { CFI_index_t i; printf("Array\n"); printf("Rank: %d\n", vin-> rank); for(i=0; i<vin->rank; i++) { printf("Dimension: %d ", i); printf("lbounds %d ", vin->dim.lower_bound); printf("extent %d ", vin->dim.extent); printf("stride %d\n", vin->dim.sm); } }
And the following Fortran program:
program smalltest implicit none interface subroutine printarraydesc(vin) bind(C,name="printarraydesc") type(*),intent(in) :: vin(..) endsubroutine end interface real :: a(3,4) call printarraydesc(a) call printarraydesc(a(3,:)) end program
While the first descriptor is correctly written, it seems that the second one is not. The rank is not passed correctly. It prints:
Array Rank: 2 Dimension: 0 lbounds 0 extent 3 stride 4 Dimension: 1 lbounds 0 extent 4 stride 12 Array Rank: 2 Dimension: 0 lbounds 0 extent 4 stride 12 Dimension: 1 lbounds 993324632 extent 2051380828 stride 993324632
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your post. I will investigate and update when I know more.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Development confirmed with me earlier that this was a defect. The compiler should only be passing along details for what is actually a one-dimensional array representing the slice of A being sent. I reported the details to them for eventual repair in a future update. Thank you for reporting this and for the convenient reproducer.
(Internal tracking id: DPD200376759)
(Resolution Update on 02/23/2016): This defect is fixed in the Intel® Parallel Studio XE 2016 Update 2 Release (PSXE 2016.2.062/ CnL 2016.2.181 - Linux)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This defect is fixed in the latest Intel® Parallel Studio XE 2016 Update 2 release (PSXE 2016.2.062/ CnL 2016.2.181 - Linux).
![](/skins/images/E799062D82CA2A220ED12C6FD1960495/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page