I'm using the FFTW library implemented as DLL under Win XP. Now I'm writing (in C++) a multi-threaded application which call the FFTW functions from two function in my code at the same time and, obviously, the application crashes. Is there any way to use the FFTW library in a multi-threaded application? Thanks Cristiano
Multi-threaded FFTW
Started by ●August 14, 2007
Reply by ●August 14, 20072007-08-14
On Aug 14, 3:37 am, "Cristiano" <cristiano...@NSquipo.it> wrote:> I'm using the FFTW library implemented as DLL under Win XP. > Now I'm writing (in C++) a multi-threaded application which call the FFTW > functions from two function in my code at the same time and, obviously, the > application crashes. > > Is there any way to use the FFTW library in a multi-threaded application? > > Thanks > CristianoI'm not sure if your problem is a result of creating race conditions between your threads, or something inherent about the FFTW library. It sounds like a threading issue though.
Reply by ●August 14, 20072007-08-14
Cristiano schrieb:> I'm using the FFTW library implemented as DLL under Win XP. > Now I'm writing (in C++) a multi-threaded application which call the FFTW > functions from two function in my code at the same time and, obviously, the > application crashes. > > Is there any way to use the FFTW library in a multi-threaded application?Googleing for "fftw thread safety" yields: You can use FFTW in multithreaded apps, but only the method "fftw_execute" is thread safe. So all FFTW functions calls except fftw_execute have to be serialized (not executed in parallel). Hendrik vdH
Reply by ●August 14, 20072007-08-14
Hendrik van der Heijden wrote:> Googleing for "fftw thread safety" yields: > > You can use FFTW in multithreaded apps, but only the method > "fftw_execute" is thread safe. So all FFTW functions calls except > fftw_execute have to be serialized (not executed in parallel).You're right! Now my app works. Thank you very much Cristiano