[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Problem with volk and fftw memory alignment

From: djch-gnuradio
Subject: [Discuss-gnuradio] Problem with volk and fftw memory alignment
Date: Fri, 29 May 2015 21:33:45 +0100

I've been trying out the (bleeding edge) corr_est() code and the 
test_corr_est.grc sometimes segvs. Not repeatable, won't crash under gdb :-) 
From a core file, it's crashing loading the first element of aVector in 
instruction is vmovaps (%eax),%ymm1    where eax is 0x8b8b590.

My CPU supports the 256bit AVX instructions, and I believe such data needs to 
be 256bit=32 byte aligned. EAX here isn't. Looking at the backtrace, it's 
crashing in fft_filter_ccc::filter, where the d_fwdfft is generated from 

In turn this creates d_inbuf by calling fftwf_malloc. I believe this only 
guarantees 16 byte alignment. (I'm on fftw3.3.4, on a 32 bit Linux 3.18.1, CPU 
Intel i5-3470)

As we move to use volk and the fast SIMD, should the code in fft.cc (and 
perhaps other places) move to using a volk memory allocator to get the right 
alignment, rather than fftwf_malloc?

I'm on gentoo, so I could fix the source to fftwf_malloc to return 32 byte 
aligned, but that's not a general solution. 

I'm not sure how I should report this issue, please pass on my report if 
there's a better place to discuss such things

reply via email to

[Prev in Thread] Current Thread [Next in Thread]