[Numpy-discussion] How to test f2py?
Dag Sverre Seljebotn
Fri Feb 26 02:44:44 CST 2010
David Cournapeau wrote:
> Kurt Smith wrote:
>> I'm the developer of fwrap. It is coming along, but will be at least
>> a month, likely two before the first release. (The main areas that
>> need some TLC are the fortran parser and the build system; the build
>> system will leverage numpy's distutils unless waf is easy to get
>> working.) The first release will cover a large portion of f2py's
>> current functionality, but I don't plan on having python callbacks
>> working then. Callbacks will be a part of the second release.
>> An issue that you should be aware of is that fwrap will not work with
>> f77, and requires gfortran 4.3.3 or greater, since it uses C
>> interoperability features not available in f77. (Fwrap will work with
>> any 'modern' fortran compiler that has the basic C interoperability
>> features implemented. Looking around it appears that all of them do
>> have the basic set necessary, see . So this only excludes f77.)
> By f77, do you mean g77, i.e. the fortran compiler in the GNU gcc 3.x
> suite ?
> If so, that's quite a bummer for scipy. I don't see us removing support
> for g77 in the short or even mid term (many distributions depend on it,
> and that's not counting windows where there is still no gcc 4.x official
> support from MinGW).
> Do you have a list somewhere of what exactly is required for fwrap from
> the fortran compiler ?
I think f77 means Fortran 77 in general, including g77. (Of course, g77
that might be the only compiler left in daily use which only supports
Fortran 77 and not also more modern Fortran.)
Long-term: While Fortran 77 is not something fwrap targets today, I
think it should be possible to add in some special-casing for f77-only
support. Basically a command-line flag to fwrap to tell it not to use
ISO C BINDING and assume Fortran 77 feature-level only. Kurt, what do
you say? Do you chance on an estimate on how long would it take for
(somebody else) to do that?
(I'd think one basically has to make the same blatant assumptions that
f2py makes about type conversion, name mangling etc., but that is also
much less dangerous/error-prone for Fortran 77.)
More information about the NumPy-Discussion