Chris@19: Chris@19:
Chris@19:Chris@19: Previous: Words of Wisdom-Saving Plans, Chris@19: Up: Other Important Topics Chris@19:
Chris@19: For in much wisdom is much grief, and he that increaseth knowledge Chris@19: increaseth sorrow. Chris@19: [Ecclesiastes 1:18] Chris@19:Chris@19: Chris@19:
There are pitfalls to using wisdom, in that it can negate FFTW's Chris@19: ability to adapt to changing hardware and other conditions. For Chris@19: example, it would be perfectly possible to export wisdom from a Chris@19: program running on one processor and import it into a program running Chris@19: on another processor. Doing so, however, would mean that the second Chris@19: program would use plans optimized for the first processor, instead of Chris@19: the one it is running on. Chris@19: Chris@19:
It should be safe to reuse wisdom as long as the hardware and program Chris@19: binaries remain unchanged. (Actually, the optimal plan may change even Chris@19: between runs of the same binary on identical hardware, due to Chris@19: differences in the virtual memory environment, etcetera. Users Chris@19: seriously interested in performance should worry about this problem, Chris@19: too.) It is likely that, if the same wisdom is used for two Chris@19: different program binaries, even running on the same machine, the Chris@19: plans may be sub-optimal because of differing code alignments. It is Chris@19: therefore wise to recreate wisdom every time an application is Chris@19: recompiled. The more the underlying hardware and software changes Chris@19: between the creation of wisdom and its use, the greater grows Chris@19: the risk of sub-optimal plans. Chris@19: Chris@19:
Nevertheless, if the choice is between using FFTW_ESTIMATE
or
Chris@19: using possibly-suboptimal wisdom (created on the same machine, but for a
Chris@19: different binary), the wisdom is likely to be better. For this reason,
Chris@19: we provide a function to import wisdom from a standard system-wide
Chris@19: location (/etc/fftw/wisdom
on Unix):
Chris@19:
Chris@19:
int fftw_import_system_wisdom(void); Chris@19:Chris@19:
Chris@19: FFTW also provides a standalone program, fftw-wisdom
(described
Chris@19: by its own man
page on Unix) with which users can create wisdom,
Chris@19: e.g. for a canonical set of sizes to store in the system wisdom file.
Chris@19: See Wisdom Utilities.
Chris@19:
Chris@19:
Chris@19:
Chris@19: