d@0: d@0: d@0: Caveats in Using Wisdom - FFTW 3.2.1 d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0:
d@0:

d@0: d@0: Previous: Words of Wisdom-Saving Plans, d@0: Up: Other Important Topics d@0:


d@0:
d@0: d@0:

3.4 Caveats in Using Wisdom

d@0: d@0:

d@0:

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

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

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

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

     int fftw_import_system_wisdom(void);
d@0: 
d@0:

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