Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: FFTW 3.3.8: Caveats in Using Wisdom Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:
Chris@82:

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

Chris@82:
Chris@82:
Chris@82: Chris@82:

3.4 Caveats in Using Wisdom

Chris@82: Chris@82: Chris@82:
Chris@82: Chris@82:

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

Chris@82: Chris@82: Chris@82:

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

Chris@82:

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

Chris@82:

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

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

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

Chris@82:
Chris@82:
Chris@82:

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

Chris@82:
Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: