I have a code that I’m trying to trivially parallelize with @parallel, but I’m getting a strange segmentation fault that I’ve tracked down to a call to FFTW.plan_r2r. This is the simplest example that reproduces the issue:
using FFTW M = 17 x = -cos.(pi*(0:M)/M) f = x.^2 fft_plan = FFTW.plan_r2r(x, FFTW.REDFT00) @parallel for _ in 1:4 fft_fp = fft_plan * f end
running this with julia 0.6.2 results in a segfault:
signal (11): Segmentation fault while loading no file, in expression starting on line 0 unknown function (ip: 0x7f7c02d1917f) unknown function (ip: 0x7f7c07535c56) jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined] jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined] jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926 macro expansion at ./REPL:2 [inlined] #3 at ./distributed/macros.jl:174 #158 at ./distributed/macros.jl:20 unknown function (ip: 0x7f7c075359bf)
Am I doing something wrong?