Shop OBEX P1 Docs P2 Docs Learn Events
Proplem with mutex locks - Page 2 — Parallax Forums

Proplem with mutex locks

2»

Comments

  • ersmithersmith Posts: 6,053
    edited 2015-03-01 04:25
    Heater. wrote: »
    Yes, how did you all miss that? The FFT with OMP example has not been working since forever! Tut-tut :)

    Sadly I don't have any Propeller's to hand at the moment to test this fix with.

    Yeah, I feel bad about that --- we looked everywhere but that the problem code. Dave's example, which so clearly illustrated that something was being run multiple times, was just the thing to show where the bug was.

    I tried what I think is the latest version of the OMP FFT, and it worked with -Os (the time was 85ms for the OMP version vs. 149ms for the non-OMP version). But it's still hanging when compiled with -O2. There's probably a compiler bug somewhere :-(.
  • Heater.Heater. Posts: 21,230
    edited 2015-03-01 05:20
    Eric and Dave,

    Well done, sounds like a good piece of detective work.

    It's long enough ago that I have lost track of the latest version. What started out as heater_FFT seems to have made it to my github repo as fftbench. https://github.com/ZiCog/fftbench

    fftbench is configured for 4 cores out of the box. I presume the version you have is as well.

    Failing when optimization is turned on could still be my fault. I did once try very hard to break it running on a 4 core PC by introducing all kind if random delays in the "parallel for" parts. Never managed to.

    Looking at it now I have a strange looking for loop in there, line 146, it has an empty initializer. No idea if that confuses things.

    This thing does not scale very well. On this dual core PC I get about 300us for 1 core and 200us for 2 cores. I guess it might show better scaling if the FFT array was bigger, say 2K.
Sign In or Register to comment.