[Clam-devel] [PATCH] fftw3-wisdom again and SConstruct imrovements
Roman Goj
roman.goj at gmail.com
Wed Jun 20 10:45:09 PDT 2007
David García Garzón wrote:
> Anyway I was thinking, that the wisdom is a single one for the whole program,
> isn't it? So if you create two FFT's, and destroy one (an easy thing to do in
> the NetworkEditor) maybe you are forgeting the wisdom of both of them, and
> loading the wisdom twice!!
>
> I'll commit it anyway. But, could you investigate how does it really works?
> Has the library a counter, does it load once or again for every time we do?
Turns out every time we import system wisdom all other acumulated wisdom
is forgotten. (I thought it only added to the wisdom that was already
there, so - we actually forget all previous wisdom by loading some new
wisdom)
I haven't found a nice solution (checked the user
manual/faq/tutorial...) Maybe somebody here knows more?
I can't find a way of checking whether there is any wisdom ready.
(except maybe for a dirty hack, which should work in the newest version
of fftw - compute a temporary plan with the new FFTW_WISDOM_ONLY flag...
this would return NULL if no wisdom was present... but this is a
strange way of doing this and would only work in the newest version...)
I'm not sure though that the current patch requires modification...
The concern here is the time required to load the wisdom? I guess it's
pretty small - shouldn't be a problem...
Or is it that we could actually be forgeting all the wisdom accumulated
while the program ran? This for now should not be a problem, since using
FFTW_ESTIMATE we aren't really adding to existing wisdom (except if
there's no system wisdom, then FFTW_ESTIMATE adds all the wisdom there
is, but it takes so little time, maybe this isn't worth the hassle
necessary to correct this forgetting-wisdom-issue)
Maybe the solution would be to take import_system_wisdom and
fftw_forget_wisdom away from the FFT constructors/destructors and into
the global places - in the program init... but this would mean that
every clam application would need to do this on it's own, not very nice
I guess :(
or maybe we could be using non-system wisdom like "~/.clam/wisdom" -
this would allow us to save the wisdom without root priviliges and
accumulate all the wisdom even while calling forget_wisdom... but this
place for wisdom is not fftw standard...
Or are you concerned that we could destroy one FFT's wisdom while it's
running by destroying another instance's wisdom? This would be
happening... but as long it doesn't happen before the plan gets computed
(and the code for computing the plan is right under importing wisdom
now), this should be no problem, since, AFAIK the wisdom is not used
after the plan gets computed...
or are there other problems?
roman
More information about the clam-devel
mailing list