- Before there existed any tool for wrapping Fortran codes to Python, Python C/API modules for interfacing Fortran programs had to be written by hand. In 1999 I had to create several modules in such a way to wrap various Fortran tools from the Netlib. This work was tedious (some of functions had more than 20 arguments, only few of them made sense for the problems that they solved). I realized that most of the writing could be done automatically.
- On 9th of July, 1999, the first lines of the tool was written. A prototype of the tool was ready to use in only three weeks. During this time Travis Oliphant joined to the project and shared his valuable knowledge and experience; the call-back mechanism was his major contribution. Then I gave the tool to public under the name FPIG - Fortran to Python Interface Generator. The tool contained only one file f2py.py. This code is available here.
- By autumn, 1999, it was clear that a better implementation was needed as the debugging process became very tedious. So, I reserved some time and rewrote the tool from scratch. The most important result of this rewriting was that the code was able to read real Fortran codes and determines the signatures of the Fortran routines. The main attention was concentrated in this particular part so that the tool could read arbitrary Fortran 77/90/95 codes. On the other hand, the other important task of the tool, that is, generating Python C/API functions, needed some work. In public, this version of the tool was called f2py2e - Fortran to Python C/API generator, the Second Edition.
- So, a month before The New Year 2000, I started the third iteration of the f2py development. Now the main attention was to have a good C/API module constructing code. By 21st of January, 2000, the tool of generating wrapper functions for Fortran routines was ready. It had many new features and was more robust than ever.
- In 25th of January, 2000, the first public release of f2py was announced (version 1.116).
- Starting from 20th of June, 2000, f2py users could discuss about f2py in a newly created mailing list, f2py-users at cens dot ioc dot ee, that is still active. The arvhives are available here.
- In 12th of September, 2000, the second public release of f2py was announced (version 2.264). It now has among other changes a support for Fortran 90/95 module routines. The old f2py User Guide is available here.
- During the period of 2000-2002 f2py was actively developed and three more public releases was made. The history of this period is available here.
- By the sixth public release of f2py in December 8, 2002, the f2py users guide was completely revised. From that date until January 30, 2005, f2py was actively maintained as the code base was rather stable.
- In October 28, 2005, the f2py2e code base (f2py version 2.46.243.2022) from the CENS CVS server was copied to SciPy SVN server under the numpy source tree (f2py version 2.1381). From that moment on all the development of f2py was assuming numpy array backend, the support for Numeric and numarray backends where dropped as obsolete and numpy array protocols handled these old array objects. The old f2py2e code is kept in the CVS server for backwards compatipility.
- By the spring of 2006 the f2py was stable and well suited for wrapping Fortran 77, simple Fortran 95 and even C codes. The only feature that f2py was missing was wrapping Fortran 95 derived types. Though I got some patches from f2py users that implemented some basic support for derived types but they never got applied to the f2py code base due to lack of time of reviewing them and my gut feeling that it would be too tedious and difficult with the current f2py code base - f2py never had a strict Fortran parser that would be necessary for interpreting Fortran codes.
- In May 2006, I started to write Fortran 77/90/95/2000 code parser code in Python. By now the code is stable but still under active development. The code is available in numpy/f2py/lib directory. The work is supported by the Enthought Inc.
Monday, July 24, 2006
f2py history and future
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment