cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: FFTW 3.3.5: Caveats in Using Wisdom cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127:
cannam@127:

cannam@127: Previous: , Up: Other Important Topics   [Contents][Index]

cannam@127:
cannam@127:
cannam@127: cannam@127:

3.4 Caveats in Using Wisdom

cannam@127: cannam@127: cannam@127:
cannam@127:

For in much wisdom is much grief, and he that increaseth knowledge cannam@127: increaseth sorrow. cannam@127: [Ecclesiastes 1:18] cannam@127: cannam@127:

cannam@127: cannam@127: cannam@127:

There are pitfalls to using wisdom, in that it can negate FFTW’s cannam@127: ability to adapt to changing hardware and other conditions. For cannam@127: example, it would be perfectly possible to export wisdom from a cannam@127: program running on one processor and import it into a program running cannam@127: on another processor. Doing so, however, would mean that the second cannam@127: program would use plans optimized for the first processor, instead of cannam@127: the one it is running on. cannam@127:

cannam@127:

It should be safe to reuse wisdom as long as the hardware and program cannam@127: binaries remain unchanged. (Actually, the optimal plan may change even cannam@127: between runs of the same binary on identical hardware, due to cannam@127: differences in the virtual memory environment, etcetera. Users cannam@127: seriously interested in performance should worry about this problem, cannam@127: too.) It is likely that, if the same wisdom is used for two cannam@127: different program binaries, even running on the same machine, the cannam@127: plans may be sub-optimal because of differing code alignments. It is cannam@127: therefore wise to recreate wisdom every time an application is cannam@127: recompiled. The more the underlying hardware and software changes cannam@127: between the creation of wisdom and its use, the greater grows cannam@127: the risk of sub-optimal plans. cannam@127:

cannam@127:

Nevertheless, if the choice is between using FFTW_ESTIMATE or cannam@127: using possibly-suboptimal wisdom (created on the same machine, but for a cannam@127: different binary), the wisdom is likely to be better. For this reason, cannam@127: we provide a function to import wisdom from a standard system-wide cannam@127: location (/etc/fftw/wisdom on Unix): cannam@127: cannam@127:

cannam@127:
cannam@127:
int fftw_import_system_wisdom(void);
cannam@127: 
cannam@127: cannam@127: cannam@127:

FFTW also provides a standalone program, fftw-wisdom (described cannam@127: by its own man page on Unix) with which users can create wisdom, cannam@127: e.g. for a canonical set of sizes to store in the system wisdom file. cannam@127: See Wisdom Utilities. cannam@127: cannam@127:

cannam@127:
cannam@127:
cannam@127:

cannam@127: Previous: , Up: Other Important Topics   [Contents][Index]

cannam@127:
cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: