Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7033 Discussions

is FFTW wrapper call thread safe inside OpenMP region?

mohanmuthu
New Contributor I
439 Views

Good Day!

 

I am using the FFTW compatible wrapper for FFT and compiling the code with /Qmkl:sequential option. It works well in serial execution. The question I have is,

(A) if I do the same inside the OpenMP parallel region as mentioned below, is it thread safe?

Also,

(B) do I need to change the compiler option from /Qmkl:sequential to /Qmkl:parallel, or its not required since I am not going to use parallel threads within FFTW.

!$OMP PARALLEL DEFAULT(NONE) PRIVATE(plan, x, y) SHARED(n, FFTW_ESTIMATE)
!$OMP DO
...
    CALL sfftw_plan_dft_r2c_1d(plan, n, x, y, FFTW_ESTIMATE)
    CALL sfftw_execute_dft(plan, x, y)
    CALL sfftw_destroy_plan(plan)
...
!$OMP END DO
!$OMP PARALLEL

 Appreciate any help I can get on this topic.

0 Kudos
1 Reply
Barbara_P_Intel
Employee
423 Views

This is best answered by those on the MKL Forum. I'll move this thread there.

0 Kudos
Reply