Hi,
I am attempting to incorporate a layer of OpenMP code within an MPI program.
Unfortunately I seem to be falling foul of thread safety when attempting to perform FFTs within the OpenMP threads.
I am fairly convinced that thread safety is the issue as the code executes without issue if the call to dfftw_execute_dft is performed within an omp critical region but fails in parallel with a double free or corruption error.
As far as I can tell the code is structured in the manner advised by the fftw documentation: The plan is generated before the OpenMP region is created and dfftw_execute_dft is supposed to be a thread safe routine for executing the FFTs.
I have attempted to use the FFTW_UNALIGNED flag as specified in a post that describes a very similar problem on: http://fortran.itgroups.info/69/9/thread-1901648.html with no joy.
Before I resort to changing the manner in which the workload is distributed I wondered of there may be anything I missed?
Thanks in advance,
Karl