The fftwf_plan_dft_1d(...) line of the following function fails in Ubuntu. It is used for doing FFT on a complex vectors of a length of about 4096 numbers.
Please help. TIA
This is C code compiled and run in Ubuntu 18.04. There is no issue of compilation.
extern void cpxfft(fftwf_plan plan, cpx_t *cpx, int n)
{
#ifdef FFTMTX
mlock(hfftmtx);
#endif
if (plan==NULL) {
fftwf_plan_with_nthreads(NFFTTHREAD); /* fft execute in multi threads */
plan=fftwf_plan_dft_1d(n,cpx,cpx,FFTW_FORWARD,FFTW_ESTIMATE);
fftwf_execute_dft(plan,cpx,cpx); /* fft */
fftwf_destroy_plan(plan);
} else {
fftwf_execute_dft(plan,cpx,cpx); /* fft */
}
#ifdef FFTMTX
unmlock(hfftmtx);
#endif
}
The console displayed the following error messages:
free(): invalid next size (fast)
Aborted (core dumped)