| Author: | Pearu Peterson <pearu@cens.ioc.ee> |
|---|---|
| Web-site: | http://cens.ioc.ee/projects/f2py2e/ |
| Date: | 2005-09-16 |
| Revision: | 1.191 |
:Date:24 February 2004
| Date: | 11 September 2003 |
|---|
| Date: | 5 August 2003 |
|---|
General
setup.py
auxfuncs.py
tests/f77/callback.py
Introduced some basic tests.
src/fortranobject.{c,h}
cfuncs.py
f2py2e.py
Undocumented --f90compiler.
crackfortran.py
docs
Documented -DF2PY_REPORT_ATEXIT feature.
diagnose.py
Added CPU information and sys.prefix printout.
tests/run_all.py
Added cwd to PYTHONPATH.
tests/f??/return_{real,complex}.py
Pass "infinity" check in SunOS.
rules.py
tests/mixed/
Introduced tests for mixing Fortran 77, Fortran 90 fixed and free format codes in one module.
f90mod_rules.py
| Date: | 8 December 2002 |
|---|
docs/usersguide/
Complete revision of F2PY Users Guide
tests/run_all.py
Removed files: buildmakefile.py, buildsetup.py.
tests/f77/
f2py_testing.py
setup.py
f90modrules.py
tests/f90/
func2subr.py
Added optional signature argument to createfuncwrapper.
In f2pywrappers routines, declare external, scalar, remaining arguments in that order. Fixes compiler error 'Invalid declaration' for:
real function foo(a,b) integer b real a(b) end
crackfortran.py
f2py2e.py
cb_rules.py
capi_maps.py
__init__.py
src/fortranobject.c
src/fortranobject.h
rules.py
cfuncs.py
*** Fixed missing includes when wrapping F90 module data. *** Fixed typos in docs of build_flib options. *** Implemented prototype calculator if no callstatement or callprotoargument statements are used. A warning is issued if callstatement is used without callprotoargument. *** Fixed transposing issue with array arguments in callback functions. *** Removed -pyinc command line option. *** Complete tests for Fortran 77 functions returning scalars. *** Fixed returning character bug if --no-wrap-functions. *** Described how to wrap F compiled Fortran F90 module procedures with F2PY. See doc/using_F_compiler.txt. *** Fixed the order of build_flib options when using --fcompiler=... *** Recognize .f95 and .F95 files as Fortran sources with free format. *** Cleaned up the output of 'f2py -h': removed obsolete items, added build_flib options section. *** Added --help-compiler option: it lists available Fortran compilers as detected by scipy_distutils/command/build_flib.py. This option is available only with -c option.
| Release: | 2.13.175-1250 |
|---|---|
| Date: | 4 April 2002 |
*** Fixed copying of non-contigious 1-dimensional arrays bug. (Thanks to Travis O.).
| Release: | 2.13.175-1242 |
|---|---|
| Date: | 26 March 2002 |
*** Fixed ignoring type declarations. *** Turned F2PY_REPORT_ATEXIT off by default. *** Made MAX,MIN macros available by default so that they can be always used in signature files. *** Disabled F2PY_REPORT_ATEXIT for FreeBSD.
| Release: | 2.13.175-1233 |
|---|---|
| Date: | 13 March 2002 |
*** Fixed Win32 port when using f2py.bat. (Thanks to Erik Wilsher). *** F2PY_REPORT_ATEXIT is disabled for MACs. *** Fixed incomplete dependency calculator.
| Release: | 2.13.175-1222 |
|---|---|
| Date: | 3 March 2002 |
*** Plugged a memory leak for intent(out) arrays with overwrite=0. *** Introduced CDOUBLE_to_CDOUBLE,.. functions for copy_ND_array. These cast functions probably work incorrectly in Numeric.
| Release: | 2.13.175-1212 |
|---|---|
| Date: | 23 February 2002 |
*** Updated f2py for the latest scipy_distutils. *** A nasty bug with multi-dimensional Fortran arrays is fixed (intent(out) arrays had wrong shapes). (Thanks to Eric for pointing out this bug). *** F2PY_REPORT_ATEXIT is disabled by default for __WIN32__.
| Release: | 2.11.174-1161 |
|---|---|
| Date: | 14 February 2002 |
*** Updated f2py for the latest scipy_distutils.
*** Fixed raise error when f2py missed -m flag.
*** Script name `f2py' now depends on the name of python executable.
For example, `python2.2 setup.py install' will create a f2py
script with a name `f2py2.2'.
*** Introduced 'callprotoargument' statement so that proper prototypes
can be declared. This is crucial when wrapping C functions as it
will fix segmentation faults when these wrappers use non-pointer
arguments (thanks to R. Clint Whaley for explaining this to me).
Note that in f2py generated wrapper, the prototypes have
the following forms:
extern #rtype# #fortranname#(#callprotoargument#);
or
extern #rtype# F_FUNC(#fortranname#,#FORTRANNAME#)(#callprotoargument#);
*** Cosmetic fixes to F2PY_REPORT_ATEXIT feature.
| Release: | 2.11.174-1146 |
|---|---|
| Date: | 3 February 2002 |
*** Reviewed reference counting in call-back mechanism. Fixed few bugs. *** Enabled callstatement for complex functions. *** Fixed bug with initializing capi_overwrite_<varname> *** Introduced intent(overwrite) that is similar to intent(copy) but has opposite effect. Renamed copy_<name>=1 to overwrite_<name>=0. intent(overwrite) will make default overwrite_<name>=1. *** Introduced intent(in|inout,out,out=<name>) attribute that renames arguments name when returned. This renaming has effect only in documentation strings. *** Introduced 'callstatement' statement to pyf file syntax. With this one can specify explicitly how wrapped function should be called from the f2py generated module. WARNING: this is a dangerous feature and should be used with care. It is introduced to provide a hack to construct wrappers that may have very different signature pattern from the wrapped function. Currently 'callstatement' can be used only inside a subroutine or function block (it should be enough though) and must be only in one continuous line. The syntax of the statement is: callstatement <C-expression>;
| Release: | 2.11.174 |
|---|---|
| Date: | 18 January 2002 |
*** Fixed memory-leak for PyFortranObject.
*** Introduced extra keyword argument copy_<varname> for intent(copy)
variables. It defaults to 1 and forces to make a copy for
intent(in) variables when passing on to wrapped functions (in case
they undesirably change the variable in-situ).
*** Introduced has_column_major_storage member function for all f2py
generated extension modules. It is equivalent to Python call
'transpose(obj).iscontiguous()' but very efficient.
*** Introduced -DF2PY_REPORT_ATEXIT. If this is used when compiling,
a report is printed to stderr as python exits. The report includes
the following timings:
1) time spent in all wrapped function calls;
2) time spent in f2py generated interface around the wrapped
functions. This gives a hint whether one should worry
about storing data in proper order (C or Fortran).
3) time spent in Python functions called by wrapped functions
through call-back interface.
4) time spent in f2py generated call-back interface.
For now, -DF2PY_REPORT_ATEXIT is enabled by default. Use
-DF2PY_REPORT_ATEXIT_DISABLE to disable it (I am not sure if
Windows has needed tools, let me know).
Also, I appreciate if you could send me the output of 'F2PY
performance report' (with CPU and platform information) so that I
could optimize f2py generated interfaces for future releases.
*** Extension modules can be linked with dmalloc library. Use
-DDMALLOC when compiling.
*** Moved array_from_pyobj to fortranobject.c.
*** Usage of intent(inout) arguments is made more strict -- only
with proper type contiguous arrays are accepted. In general,
you should avoid using intent(inout) attribute as it makes
wrappers of C and Fortran functions asymmetric. I recommend using
intent(in,out) instead.
*** intent(..) has new keywords: copy,cache.
intent(copy,in) - forces a copy of an input argument; this
may be useful for cases where the wrapped function changes
the argument in situ and this may not be desired side effect.
Otherwise, it is safe to not use intent(copy) for the sake
of a better performance.
intent(cache,hide|optional) - just creates a junk of memory.
It does not care about proper storage order. Can be also
intent(in) but then the corresponding argument must be a
contiguous array with a proper elsize.
*** intent(c) can be used also for subroutine names so that
-DNO_APPEND_FORTRAN can be avoided for C functions.
*** IMPORTANT BREAKING GOOD ... NEWS!!!:
From now on you don't have to worry about the proper storage order
in multi-dimensional arrays that was earlier a real headache when
wrapping Fortran functions. Now f2py generated modules take care
of the proper conversations when needed. I have carefully designed
and optimized this interface to avoid any unnecessary memory usage
or copying of data. However, it is wise to use input arrays that
has proper storage order: for C arguments it is row-major and for
Fortran arguments it is column-major. But you don't need to worry
about that when developing your programs. The optimization of
initializing the program with proper data for possibly better
memory usage can be safely postponed until the program is working.
This change also affects the signatures in .pyf files. If you have
created wrappers that take multi-dimensional arrays in arguments,
it is better to let f2py re-generate these files. Or you have to
manually do the following changes: reverse the axes indices in all
'shape' macros. For example, if you have defined an array A(n,m)
and n=shape(A,1), m=shape(A,0) then you must change the last
statements to n=shape(A,0), m=shape(A,1).
| Release: | 2.8.172 |
|---|---|
| Date: | 13 January 2002 |
*** Fixed -c process. Removed pyf_extensions function and pyf_file class. *** Reorganized setup.py. It generates f2py or f2py.bat scripts depending on the OS and the location of the python executable. *** Started to use update_version from scipy_distutils that makes f2py startup faster. As a side effect, the version number system changed. *** Introduced test-site/test_f2py2e.py script that runs all tests. *** Fixed global variables initialization problem in crackfortran when run_main is called several times. *** Added 'import Numeric' to C/API init<module> function. *** Fixed f2py.bat in setup.py. *** Switched over to scipy_distutils and dropped fortran_support. *** On Windows create f2py.bat file. *** Introduced -c option: read fortran or pyf files, construct extension modules, build, and save them to current directory. In one word: do-it-all-in-one-call. *** Introduced pyf_extensions(sources,f2py_opts) function. It simplifies the extension building process considerably. Only for internal use. *** Converted tests to use scipy_distutils in order to improve portability: a,b,c *** f2py2e.run_main() returns a pyf_file class instance containing information about f2py generated files. *** Introduced `--build-dir <dirname>' command line option. *** Fixed setup.py for bdist_rpm command. *** Added --scipy-setup command line option. *** Fixed crackfortran that did not recognized capitalized type specification with --no-lower flag. *** `-h stdout' writes signature to stdout. *** Fixed incorrect message for check() with empty name list.
| Release: | 2.4.366 |
|---|---|
| Date: | 17 December 2001 |
*** Added command line option --[no-]manifest. *** `make test' should run on Windows, but the results are not truthful. *** Reorganized f2py2e.py a bit. Introduced run_main(comline_list) function that can be useful when running f2py from another Python module. *** Removed command line options -f77,-fix,-f90 as the file format is determined from the extension of the fortran file or from its header (first line starting with `!%' and containing keywords free, fix, or f77). The later overrides the former one. *** Introduced command line options --[no-]makefile,--[no-]latex-doc. Users must explicitly use --makefile,--latex-doc if Makefile-<modulename>, <modulename>module.tex is desired. --setup is default. Use --no-setup to disable setup_<modulename>.py generation. --overwrite-makefile will set --makefile. *** Added `f2py_rout_' to #capiname# in rules.py. *** intent(...) statement with empty namelist forces intent(...) attribute for all arguments. *** Dropped DL_IMPORT and DL_EXPORT in fortranobject.h. *** Added missing PyFortran_Type.ob_type initialization. *** Added gcc-3.0 support. *** Raising non-existing/broken Numeric as a FatalError exception. *** Fixed Python 2.x specific += construct in fortran_support.py. *** Fixed copy_ND_array for 1-rank arrays that used to call calloc(0,..) and caused core dump with a non-gcc compiler (Thanks to Pierre Schnizer for reporting this bug). *** Fixed "warning: variable `..' might be clobbered by `longjmp' or `vfork'": - Reorganized the structure of wrapper functions to get rid of `goto capi_fail' statements that caused the above warning.
| Release: | 2.3.343 |
|---|---|
| Date: | 12 December 2001 |
*** Issues with the Win32 support (thanks to Eric Jones and Tiffany Kamm):
- Using DL_EXPORT macro for init#modulename#.
- Changed PyObject_HEAD_INIT(&PyType_Type) to PyObject_HEAD_INIT(0).
- Initializing #name#_capi=NULL instead of Py_None in cb hooks.
*** Fixed some 'warning: function declaration isn't a prototype', mainly
in fortranobject.{c,h}.
*** Fixed 'warning: missing braces around initializer'.
*** Fixed reading a line containing only a label.
*** Fixed nonportable 'cp -fv' to shutil.copy in f2py2e.py.
*** Replaced PyEval_CallObject with PyObject_CallObject in cb_rules.
*** Replaced Py_DECREF with Py_XDECREF when freeing hidden arguments.
(Reason: Py_DECREF caused segfault when an error was raised)
*** Impl. support for `include "file"' (in addition to `include 'file'')
*** Fixed bugs (buildsetup.py missing in Makefile, in generated MANIFEST.in)
| Release: | 2.3.327 |
|---|---|
| Date: | 4 December 2001 |
*** Sending out the third public release of f2py. *** Support for Intel(R) Fortran Compiler (thanks to Patrick LeGresley). *** Introduced `threadsafe' statement to pyf-files (or to be used with the 'f2py' directive in fortran codes) to force Py_BEGIN|END_ALLOW_THREADS block around the Fortran subroutine calling statement in Python C/API. `threadsafe' statement has an effect only inside a subroutine block. *** Introduced `fortranname <name>' statement to be used only within pyf-files. This is useful when the wrapper (Python C/API) function has different name from the wrapped (Fortran) function. *** Introduced `intent(c)' directive and statement. It is useful when wrapping C functions. Use intent(c) for arguments that are scalars (not pointers) or arrays (with row-ordering of elements).
| Release: | 2.3.321 |
|---|---|
| Date: | 3 December 2001 |
*** f2py2e can be installed using distutils (run `python setup.py install'). *** f2py builds setup_<modulename>.py. Use --[no-]setup to control this feature. setup_<modulename>.py uses fortran_support module (from SciPy), but for your convenience it is included also with f2py as an additional package. Note that it has not as many compilers supported as with using Makefile-<modulename>, but new compilers should be added to fortran_support module, not to f2py2e package. *** Fixed some compiler warnings about else statements.