PDA

View Full Version : Adapting Newer version of FFTW dll


vcmohan
16th July 2007, 21:54
In a thread in the usage, it was mentioned that my plugin fftquiver was giving access violation errors if used with the newer version 3.X of FFTW dll. I checked with FFTW.org In the Faqs section it is mentioned as follows:
FFTW 3 has semantics incompatible with earlier versions: its plans can only be used for a given stride, multiplicity, and other characteristics of the input and output arrays; these stronger semantics are necessary for performance reasons. Thus, it is impossible to efficiently emulate the older interface (whose plans can be used for any transform of the same size). We believe that it should be possible to upgrade most programs without any difficulty, however.
So it appears that the plugin need to be recompiled using the newer interface. However this means users need to upgrade their fftw dll.

Fizick may suggest a course of action as his plugins use the fftw dll. May be include some test to see whether the fftw dll version is the correct one. It will be better if all upgrade and warpenterprises provide a new link.

IanB
17th July 2007, 01:08
You have my sympathy. The fftw.dll made a contract, an api definition, that they have broken. There has always been a weak minded element in the programming community who do not understand how to implement invariance in shared libraries across revisions.

M$ did this to Avisynth with msvcrt.dll in XPsp2 they screwed something to do with SEH handling so that all previously working application using SEH crashed and needed to be rewritten.

The rules are really really simple. If you change the the api for a shared library entry point, rename the entry point! Leave all existing entry point names compliant with the pre-existing api definition. If you need to drasticly change the API then you probably should rename the entire shared library.

A safe, but hacky, solution I use when vendors do this to me, is I take the last good shared library version and rename it. I then link a checkpoint version of my application against that.

Latter I update my application to work with the new shared library api, probably adding a shit load of version validation code, legacy adaptor code and many many rude comments about the vendors parentage.

Hellworm
19th July 2007, 20:56
I don't know where you got your dlls but the ones from their websites have the version in their name and are not simply named fftw.dll. And Afaik they don't change the api between the big versions.

So the best is propably to include it with their official dll and with the same naming scheme as this won't conflict with the old dll.

IanB
19th July 2007, 23:49
Well some of us have egg all over their faceArchive: fftw-3.1.2-dll.zip
Length Date Time Name
------ ---- ---- ----
1397548 07-04-06 14:21 libfftw3-3.dll
1382280 07-04-06 14:29 libfftw3f-3.dll
1080093 07-04-06 14:35 libfftw3l-3.dll
...Rods for ones own back seems to be the appropriate comment here.