# FFTW Plans and Wisdom

**URL:** <https://discourse.julialang.org/t/fftw-plans-and-wisdom/3053>\
**Category:** New to Julia\
**Tags:** fftw\
**Created:** [April 4, 2017, 8:11pm UTC](https://discourse.julialang.org/t/fftw-plans-and-wisdom/3053 "2017-04-04T20:11:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wibble](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wibble/32/906_2.png) [@wibble](https://discourse.julialang.org/u/wibble)\
**Post date:** [April 4, 2017, 8:11pm UTC](https://discourse.julialang.org/t/fftw-plans-and-wisdom/3053/1 "2017-04-04T20:11:59Z")

</div>

Hello,

Pretty new to Julia, trying to get an FFT/spectrogram code working with the FFTW interface. I’ve used FFTW in C before, and I’m a bit confused as to how this works regarding plans and wisdom. Is there any provision for saving and reusing wisdom, especially saving/load wisdom files? Can I just save a Plan object to a file using JLD? The FFTing Julia processes will often be short-lived, and so I’d like to reduce re-planning overhead as much as possible.

Thanks!

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [April 5, 2017, 12:48am UTC](https://discourse.julialang.org/t/fftw-plans-and-wisdom/3053/2 "2017-04-05T00:48:15Z")

</div>

Yes. It’s undocumented, but you can use [FFTW.export\_wisdom and FFTW.import\_wisdom](https://github.com/JuliaLang/julia/blob/master/base/fft/FFTW.jl#L119-L127) to export/import wisdom (saved plans) to/from a file: `FFTW.export_wisdom(filename)` and `FFTW.import_wisdom(filename)`.

You can’t save a `Plan` object to a JLD file, however. (A `Plan` object is just a wrapper around an `fftw_plan` pointer, which will not be a valid pointer in a subsequent Julia run.)

---

<div class="post-metadata">

**Author:** ![wibble](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wibble/32/906_2.png) [@wibble](https://discourse.julialang.org/u/wibble)\
**Post date:** [April 5, 2017, 5:10pm UTC](https://discourse.julialang.org/t/fftw-plans-and-wisdom/3053/3 "2017-04-05T17:10:38Z")

</div>

Perfect. Thanks!
