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