cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: FFTW 3.3.8: Caveats in Using Wisdom cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167:
cannam@167:

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

cannam@167:
cannam@167:
cannam@167: cannam@167:

3.4 Caveats in Using Wisdom

cannam@167: cannam@167: cannam@167:
cannam@167: cannam@167:

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

cannam@167: cannam@167: cannam@167:

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

cannam@167:

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

cannam@167:

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

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

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

cannam@167:
cannam@167:
cannam@167:

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

cannam@167:
cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: