RuntimeError: FFTW could not create plans.

655 views
Skip to first unread message

chenji...@gmail.com

unread,
Sep 23, 2016, 6:51:57 AM9/23/16
to Dedalus Users
Hi there,

I'm newbie of the Dedalus. After completed the installation of dedalus package, I encountered problems when trying to run some examples following along with the tutorials:
http://dedalus-project.readthedocs.io/en/latest/getting_started.html#tutorial-notebooks

In **Tutorial 2: Fields and Operators (input 7: f['c'])** and **Example 1: Kelvin Helmholtz Instability**, errors occurred:

Traceback (most recent call last):
File "kh_instability.py", line 77, in <module>
u.differentiate('y',out=uy)
File "Projects/dedalus/dedalus/core/field.py", line 462, in differentiate
return diff_op.evaluate()
File "Projects/dedalus/dedalus/core/future.py", line 130, in evaluate
a.set_scales(self.domain.dealias, keep_data=True)
File "Projects/dedalus/dedalus/core/field.py", line 386, in set_scales
self.require_coeff_space(axis)
File "Projects/dedalus/dedalus/core/field.py", line 445, in require_coeff_space
self.towards_coeff_space()
File "Projects/dedalus/dedalus/core/field.py", line 425, in towards_coeff_space
self.domain.dist.paths[index-1].decrement([self])
File "Projects/dedalus/dedalus/core/distributor.py", line 340, in decrement
self.decrement_single(*fields)
File "Projects/dedalus/dedalus/core/distributor.py", line 325, in decrement_single
self.basis.forward(gdata, cdata, self.axis, field.meta[self.axis])
File "Projects/dedalus/dedalus/core/basis.py", line 749, in _forward_fftw
plan, temp, resize_coeffs = self._fftw_setup(gdata.dtype, gdata.shape, axis)
File "Projects/dedalus/dedalus/tools/cache.py", line 71, in __call__
self.cache[call] = result = self.function(*args, **kw)
File "Projects/dedalus/dedalus/core/basis.py", line 736, in _fftw_setup
plan = fftw.FourierTransform(dtype, gshape, axis, flags=flags)
File "dedalus/libraries/fftw/fftw_wrappers.pyx", line 194, in dedalus.libraries.fftw.fftw_wrappers.FourierTransform.__init__ (dedalus/libraries/fftw/fftw_wrappers.c:4535)
RuntimeError: FFTW could not create plans.

could anyone give me a hand? Thanks.

Jianguo

Daniel Lecoanet

unread,
Sep 26, 2016, 3:31:13 PM9/26/16
to dedalu...@googlegroups.com
Did you install using the install script?  If so, could you attach the dedalus_install.log file?

Thanks,
Daniel




--
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-users+unsubscribe@googlegroups.com.
To post to this group, send email to dedalu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dedalus-users/dfd11ff7-228f-4b74-8b85-f7d6f3597ea7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yopo...@gmail.com

unread,
Sep 3, 2017, 7:15:58 PM9/3/17
to Dedalus Users, leco...@princeton.edu
Hi Daniel,

I am encountering the same problem. Just wander if this problem has been solved.

Yi-Min
> To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.

yopo...@gmail.com

unread,
Sep 4, 2017, 1:28:55 PM9/4/17
to Dedalus Users, chenji...@gmail.com
Hi Jianguo,

I encounter the same problem. Just wander if you have found a solution.

Thanks,

Yi-Min

Daniel Lecoanet

unread,
Sep 4, 2017, 5:22:08 PM9/4/17
to dedalu...@googlegroups.com, chenji...@gmail.com
Hi,

How did you install Dedalus?  Using the install script?  Or was it a manual installation?

Thanks,
Daniel

On Mon, Sep 4, 2017 at 7:28 PM, yopo...@gmail.com <yopo...@gmail.com> wrote:
Hi Jianguo,

I encounter the same problem. Just wander if you have found a solution.

Thanks,

Yi-Min

On Friday, September 23, 2016 at 6:51:57 AM UTC-4, chenji...@gmail.com wrote:
--
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-users+unsubscribe@googlegroups.com.

To post to this group, send email to dedalu...@googlegroups.com.

Yi-Min Huang

unread,
Sep 4, 2017, 6:32:28 PM9/4/17
to Daniel Lecoanet, dedalu...@googlegroups.com
Hi Daniel,

I install it manually. Somehow the install script didn't work for me (complaint about cannot find pip3)

Yi-Min

On Mon, Sep 4, 2017 at 5:23 PM, Daniel Lecoanet <leco...@princeton.edu> wrote:
Opps, don't know why the reply-all didn't also send to you.  Please cc dedalu...@googlegroups.com in your response so the conversation is tracked on the forums.

Thanks,
Daniel

yopo...@gmail.com

unread,
Sep 4, 2017, 6:45:57 PM9/4/17
to Dedalus Users, leco...@princeton.edu, yopo...@gmail.com
It looks like the problem comes from calling



self.forward_plan = cfftw.fftw_plan_guru_dft_r2c(trans_rank,
trans_struct,
vec_rank,
vec_struct_f,
rg_temp,
cc_temp,
intflags|cfftw.FFTW_DESTROY_INPUT)

in fftw_wrappers.pyx.. Interestingly, I temporarily set vec_rank=1 instead of 2, which is fine for 1D problem, then I was able to run the 1d_kdv_burgers example. However, when vec_rank is set to 2, the fftw guru planner will return NULL. I am really puzzled..
> To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.

yopo...@gmail.com

unread,
Sep 6, 2017, 4:48:48 PM9/6/17
to Dedalus Users, leco...@princeton.edu, yopo...@gmail.com
The problem comes from numpy in Anaconda, which uses MKL library. MKL implements FFTW3 API but it is incomplete. The MKL library ends up taking over the FFTW3 installed in the system, causing the problem.

This problem is documented in this thread for pyfftw

https://github.com/pyFFTW/pyFFTW/issues/40

After linking FFTW static library to Dedalus fftw_wrappers, I was able to run examples without problem. To be specific, I edited the fftw_wrappers extension part in setup.py as the follows, where FFTW is installed under /opt/lib

Extension(
name='dedalus.libraries.fftw.fftw_wrappers',
sources=['dedalus/libraries/fftw/fftw_wrappers.pyx'],
include_dirs=include_dirs,
libraries=libraries,
library_dirs=library_dirs,
extra_compile_args=["-Wno-error=declaration-after-statement"],
extra_link_args=["-Xlinker",
"-Bsymbolic",
"-Wl,--whole-archive",
"/opt/lib/libfftw3.a",
"/opt/lib/libfftw3_omp.a",
"/opt/lib/libfftw3_mpi.a",
"-Wl,--no-whole-archive"]),
Reply all
Reply to author
Forward
0 new messages