FFTW / fftw3

DO NOT CHECK OUT THESE FILES FROM GITHUB UNLESS YOU KNOW WHAT YOU ARE DOING. (See below.)
GNU General Public License v2.0
2.67k stars 652 forks source link

FFTW thread safe usage for Mac M1. #297

Open aharutyunyan1 opened 1 year ago

aharutyunyan1 commented 1 year ago

Hi,

  1. While creating FFTW planner from more than one thread, it returns NULL handle. Here is the link describing thread safe usage with ‘void fftw_make_planner_thread_safe(void)’ API. Looks like it’s not available under Mac M1. In the mean time we found another document saying: fftw_make_planner_thread_safe is unnecessary in the Arm Performance Libraries implementation since all planning is thread-safe. Could you please share the correct usage to be thread safe?

  2. BTW we tried to synchronize the planner creation part only and it mitigates the issue, but it’s still doesn’t work correctly if planners created with different sizes.

Attaching source code to replicate the issue. fftw_simple_test.zip

Thanks in advance.