- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I'm currently trying to interface a Fortran subroutine from C. The subroutine accepts an assumed size array as argument. To interface the subroutine from C, I could, of course, wrap it in a subroutine in which I explicitly pass the array bounds an then BIND(C) the subroutine. However, I'd be curious to learn, how the array "metadata" (or dope vector) of a Fortran array looks like.
I imagine, that it should not look too complicated; probably the array bounds and perhaps a pointer to the actual block of data. It seems as if the chasm-interop tools go into this direction, however the last update on the website was in 2005 and it is for gfortran. So my question is: is it possible to peek into the ifort array metadata and to build it by hand?
Thanks and kind regards,
George
I'm currently trying to interface a Fortran subroutine from C. The subroutine accepts an assumed size array as argument. To interface the subroutine from C, I could, of course, wrap it in a subroutine in which I explicitly pass the array bounds an then BIND(C) the subroutine. However, I'd be curious to learn, how the array "metadata" (or dope vector) of a Fortran array looks like.
I imagine, that it should not look too complicated; probably the array bounds and perhaps a pointer to the actual block of data. It seems as if the chasm-interop tools go into this direction, however the last update on the website was in 2005 and it is for gfortran. So my question is: is it possible to peek into the ifort array metadata and to build it by hand?
Thanks and kind regards,
George
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I find a lot of information about this in the compiler manual, under "Compiler Reference" and "Mixed Language Programming".
--Dave
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I find a lot of information about this in the compiler manual, under "Compiler Reference" and "Mixed Language Programming".
--Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for pointing me in the right direction. For the record: The "metadata" of an Intel Fortran array is described on the following page:
http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/fortran/lin/bldaps_for/common/bldaps_hndl_arrdesc.htm
Kind regards,
George
http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/fortran/lin/bldaps_for/common/bldaps_hndl_arrdesc.htm
Kind regards,
George
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page