|
From: Tom E. <tep...@ll...> - 2007-12-11 23:46:57
|
ber...@or... wrote:
> 2) The Babel folks need to understand whether what's been proposed for
> F2008 really covers everything they've been getting from Chasm thus
> far. (Also, I guess the previous draft stuff that some vendors have
> already implemented.)
>
I've downloaded the latest draft for the next Fortran standard
(2007-Sep-27), and I've read the relevant section on C interoperability
(15). It seems largely like what I read in the F2003 standard. *The
Fortran 2008 standard as currently proposed DOES NOT provide the level
of interoperability that Babel requires and that Chasm provides.* Even a
complete implementation of the F2003 or F2008 standard would not be
sufficient to provide the level of interoperability that Babel needs. In
particular, the existing F2003 standard *and *the proposed F2008
standard do not provide sufficient capabilities to:
1. Allow passing array slices without copying data. For example, if I
take a 2-D slice of a 3-D array in Babel, I can end up with an
array where no dimension is stride one. With CHASM and Babel, I
can pass that array back and forth between Fortran 90/95 and any
other supported language without requiring copying. As far as I
can see, the bind C approach requires arrays that are passed
between Fortran and C to be dense and column-major ordered. Babel
needs access to the internals of the array descriptor to pass
other kinds of arrays without copying.
2. The C_F_POINTER subroutine forces every array lower bound to be 1
regardless of what the Babel array's lower bound is. In general,
the bind C feature doesn't give us control of the lower and upper
bounds like CHASM does.
3. Note 15.17 says "A polymorphic, allocatable, or pointer array is
never interoperable." This seems to be a problem too because
that's basically what Babel arrays are.
> 3) Assuming the F2008 stuff is an appropriate replacement, Babel needs
> to extended to support it -- testing the compiler for support in
> autoconf, and generating the appropriate code.
>
This assumption is completely and utterly incorrect. The
interoperability provided by the F2003/F2008 standards (as they
currently exist) is insufficient for (at least) the reasons enumerated
above. To be utterly clear, we cannot provide Babel users the level of
Fortran interoperability that they're accustomed to in Babel's F90/95
binding using the features available in F2003/F2008 standard as they
exist today.
> 4) We need for Chasm to be maintained until users upgrade to compiler
> versions supporting the F2008 features. Just because a site has a
> compiler version that does support the needed features, doesn't
> mean the users are actually using that version. Many sites,
> especially large centers, maintain multiple compiler versions
> simultaneously.
>
We need a library, such as Chasm, to provide access to internals of the
Fortran dope vectors, so we have direct access to the lower bound, upper
bound, and stride information about arrays. Until a Fortran standard
comes out and is implemented to provide that level of access to the
internals of Fortran arrays, we will need the capabilities that Chasm
currently provides.
Tom Epperly
Babel Architect
https://computation.llnl.gov/casc/components/
|