[Shootout-list] Implicitode test
Simon Geard
simon@whiteowl.co.uk
Sat, 09 Apr 2005 09:14:59 +0100
I have spent the last couple of weeks trying to implement this (alpha)
test in fortran90 and thought I'd submit a report on my experience.
This test is performing what should be basic bread-and-butter to fortran
- it is what the language was designed for. However the reference
implementations (python, ml, ocam) make extensive use of language
features that are not really relevant to the task at hand. Automatic
differentiation is a whizzy way of evaluating the derivative of a
rational polynomial at a point but the implementation overhead is
enormous compared to a traditional central-difference approximation and
for a Newton-Raphson solver there is no numerical gain. Passing
functions to functions is a feature that I don't think can be done in
f90 and again is not really relevant to the test. The reference also
contains its own float and complex data types. I could implement these
as well but again the time is large and I don't really see what is
gained by doing it.
Like many people I contribute programs by writing them in my spare time
- this has taken a lot of spare time and it is not finished yet. Tests
must be realistic in what they are trying to measure. If it's a
numerical test then it should be just that and not rely on language
features that irrelevant.
I have added some *.f90 and f90.mak files to the implicitode directory
in bench which implements part of the test in the traditional way
(implicitode_trad.f90) and the automatic-differentiation way
(implicitode.f90). To build it type make -f f90.mk in that directory, it
will build with either intel fortran or g95. I realize that these are
not the standard names but thought it would be ok since it is an alpha test.
Simon Geard