FFTW in parallel

495 views
Skip to first unread message

Jim Christoff

unread,
Dec 4, 2014, 10:15:14 AM12/4/14
to julia...@googlegroups.com


Does Julia's implementation of FFTW use multi-core, if not how would I implement this. I need speed for realtime processing.

Stefan Karpinski

unread,
Dec 4, 2014, 10:37:40 AM12/4/14
to Julia Users
Julia doesn't have its own FFTW implementation, it uses the FFTW library, which is multicore by default, unless I'm mistaken. I'm sure that Steven Johnson can provide more detail.

Steven G. Johnson

unread,
Dec 4, 2014, 12:55:44 PM12/4/14
to julia...@googlegroups.com
On Thursday, December 4, 2014 10:37:40 AM UTC-5, Stefan Karpinski wrote:
Julia doesn't have its own FFTW implementation, it uses the FFTW library, which is multicore by default, unless I'm mistaken. I'm sure that Steven Johnson can provide more detail.

No, multicore is not currently enabled by default.  You can enable it by:

FFTW.set_num_threads(CPU_CORES)

(Note that this is only shared-memory parallelism.  FFTW's distributed-memory FFTs are not currently supported within Julia.) 

Jim Christoff

unread,
Dec 8, 2014, 2:21:09 PM12/8/14
to julia...@googlegroups.com
Thanks

That resulted in a 30% improvement

Tim Holy

unread,
Dec 8, 2014, 2:33:41 PM12/8/14
to julia...@googlegroups.com
I've found that if you're doing FFT on the same size arrays repeatedly, it can
be well worth it to invest some time in creating a plan with FFTW_MEASURE or
FFTW_PATIENT.

--Tim

Jim

unread,
Dec 13, 2014, 9:05:13 AM12/13/14
to julia...@googlegroups.com
Thank you both

Your suggestions resulted in a speed up of approx.  4. From 120 ms to 37 ms. That results in a performance that is better that my "C" code  using Apple's vDSP library.


On Thursday, December 4, 2014 10:15:14 AM UTC-5, Jim Christoff wrote:
Reply all
Reply to author
Forward
0 new messages