Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28701 Discussions

Dope vector: how does the data structure for a Fortran array look like?

hgeorge
Beginner
1,038 Views
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
0 Kudos
1 Solution
Dave_Allured
New Contributor I
1,038 Views

I find a lot of information about this in the compiler manual, under "Compiler Reference" and "Mixed Language Programming".

http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/fortran/lin/index.htm

--Dave

View solution in original post

0 Kudos
2 Replies
Dave_Allured
New Contributor I
1,039 Views

I find a lot of information about this in the compiler manual, under "Compiler Reference" and "Mixed Language Programming".

http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/fortran/lin/index.htm

--Dave

0 Kudos
hgeorge
Beginner
1,038 Views
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
0 Kudos
Reply