Giter Club home page Giter Club logo

Comments (5)

drmpeg avatar drmpeg commented on July 29, 2024

The function is_unaligned() doesn't really work as expected (at least on 32-bit systems). It returns False even when the address of one or more parameters is unaligned.

If all the volk functions in ofdm_sym_acquisition_impl.cc and dvbt_demap_impl.cc are forced to be unaligned, there are no GPF's and the flow works perfectly.

from gr-dvbt.

BogdanDIA avatar BogdanDIA commented on July 29, 2024

It seem that the alignement need to be taken form volk and set in each block like this:

const int alignment_multiple =
volk_get_alignment() / sizeof(gr_complex);
set_alignment(std::max(1, alignment_multiple));

Also for locally allocated buffers I modified the allocation method from new (c++) to posix_memalign()

The changes are in the latest github commits.

from gr-dvbt.

drmpeg avatar drmpeg commented on July 29, 2024

I can see why you abandoned 32-bit Linux and went to 64-bit. The alignment issues seem quite painful. After testing the new commits, it appears that posix_memalign() is buggy on 32-bit systems. It's causing segfaults and errors in unrelated modules. Here's what I've seen:

[Fri Jan 24 16:29:22 2014] python2[31620]: segfault at 43289bd0 ip b1af6a90 sp bfea11b0 error 4 in libglib-2.0.so.0.3600.0[b1a80000+ff000]

[Fri Jan 24 16:37:19 2014] python2[32631]: segfault at 426dd030 ip b1a62984 sp bf819290 error 4 in libpango-1.0.so.0.3200.5[b1a46000+49000]

and "bad_weak_ptr error" in GRC. Reverting back to the "new" allocation eliminates these issues.

At this point, I'd have to say that you should not waste any more effort on these issues. I'll just make a local patch to force unaligned volk calls.

from gr-dvbt.

BogdanDIA avatar BogdanDIA commented on July 29, 2024

Ok, I have now a 32bit machine to see what's going on. VOLK is working fine but the alignment is guaranteed only for out/in buffers. If a buffer is aligned and then one plays with the start of the buffer then it become unaligned. Probably a redesign to make sure ANY buffer passed to VOLK is aligned is necessary.
For now the unaligned functions are used so the flow should not crash.

from gr-dvbt.

BogdanDIA avatar BogdanDIA commented on July 29, 2024

Closing this issue as it is fixed for my machines.

from gr-dvbt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.