Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: FFTW 3.3.5: Caveats in Using Wisdom Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42:
Chris@42:

Chris@42: Previous: , Up: Other Important Topics   [Contents][Index]

Chris@42:
Chris@42:
Chris@42: Chris@42:

3.4 Caveats in Using Wisdom

Chris@42: Chris@42: Chris@42:
Chris@42:

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

Chris@42: Chris@42: Chris@42:

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

Chris@42:

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

Chris@42:

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

Chris@42:
Chris@42:
int fftw_import_system_wisdom(void);
Chris@42: 
Chris@42: Chris@42: Chris@42:

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

Chris@42:
Chris@42:
Chris@42:

Chris@42: Previous: , Up: Other Important Topics   [Contents][Index]

Chris@42:
Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: