Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fftw hangs on raspberry pi3 #122

Open
soundart opened this issue Jan 5, 2018 · 2 comments
Open

fftw hangs on raspberry pi3 #122

soundart opened this issue Jan 5, 2018 · 2 comments

Comments

@soundart
Copy link

soundart commented Jan 5, 2018

Currently fftw does not work on my raspberry pi3. It hangs in a loop doing calls to clock_gettime:

clock_gettime(CLOCK_SGI_CYCLE, 0x7ea42558) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_SGI_CYCLE, 0x7ea42558) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_REALTIME, {tv_sec=1513978172, tv_nsec=339522337}) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1513978172, tv_nsec=339672025}) = 0
clock_gettime(CLOCK_SGI_CYCLE, 0x7ea42558) = -1 EINVAL (Invalid argument)

The call clock_gettime(CLOCK_SGI_CYCLE, &t) from function getticks() fails with EINVAL.
See : http://elixir.free-electrons.com/linux/latest/source/include/uapi/linux/time.h#L62 - "The driver implementing this got removed. The clock ID is kept as a place holder. Do not reuse!"

There was a commit preventing the usage of CLOCK_SGI_CYCLE on ANDROID. It should probably not be used on plain linux too.

I discussed this here: 950b153

I will add a pull request based on https://github.com/SETIguy comment 950b153#commitcomment-26583436

@soundart
Copy link
Author

soundart commented Jan 5, 2018

See #123

soundart referenced this issue Jan 5, 2018
The Android headers defines CLOCK_SGI_CYCLE but the call fails at
runtime as it's not implemented. Combined with getticks() not
checking the return value of clock_gettime() this causes bogus
values to be returned from getticks().
@paigeadelethompson
Copy link

Yeah Im having this issue too now myself, how is it that I am the only person who is though ???? This should be a pretty big deal by my account (cant start either gqrx nor sdrangel) Am I understanding correctly that nobody actually uses these on Raspi ????

#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE) && !defined(HAVE_TICK_COUNTER) && !defined(__ANDROID__)
typedef struct timespec ticks;

static inline ticks getticks(void)
{
     struct timespec t;
     clock_gettime(CLOCK_SGI_CYCLE, &t);
     return t;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants