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

fftw3: hangs on raspberry pi3 #5512

Closed
soundart opened this issue Jan 26, 2018 · 5 comments
Closed

fftw3: hangs on raspberry pi3 #5512

soundart opened this issue Jan 26, 2018 · 5 comments

Comments

@soundart
Copy link


Maintainer: @Wedmer
Environment: (arm, brcm2708_bcm2710, lede 79f57e4)

Description:

FFTW3 hangs due to using CLOCK_SGI_CYCLE, which was removed from linux.
see FFTW/fftw3#122 and FFTW/fftw3#123

diff --git a/kernel/cycle.h b/kernel/cycle.h
index fe3dd50d..777d1cda 100644
--- a/kernel/cycle.h
+++ b/kernel/cycle.h
@@ -437,14 +437,24 @@ INLINE_ELAPSED(__inline)
 #define HAVE_TICK_COUNTER
 #endif
 /*----------------------------------------------------------------*/
-/* SGI/Irix */
-#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE) && !defined(HAVE_TICK_COUNTER) && !defined(__ANDROID__)
+/* SGI/Irix/Linux but not android */
+#if !defined(__ANDROID__) && !defined(HAVE_TICK_COUNTER)
+#if defined(HAVE_CLOCK_GETTIME)
+#if defined(CLOCK_MONOTONIC)
+#define METHOD CLOCK_MONOTONIC
+#elif defined(CLOCK_REALTIME)
+#define METHOD CLOCK_REALTIME
+#elif defined(CLOCK_SGI_CYCLE)
+#define METHOD CLOCK_SGI_CYCLE
+#endif
+#endif
+
 typedef struct timespec ticks;

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

@Wedmer
Copy link
Contributor

Wedmer commented Jan 26, 2018

I think we should wait for next fftw3 release

@diizzyy
Copy link
Contributor

diizzyy commented Jul 5, 2018

@soundart
fftw3 has been bumped, is it still broken?
If not, please close this issue report.

@soundart
Copy link
Author

soundart commented Jul 5, 2018

@diizzyy
I cannot find the fftw3 3.3.8 tag on github currently, but cycle.h on master ist unchanged since november last year and my pull request is still open.

@squircle
Copy link

squircle commented Jul 6, 2020

fftw3 was removed by e077738, so this issue can be closed.

@soundart
Copy link
Author

soundart commented Jul 6, 2020

I have used it in an openwrt context as part of a media player.

@soundart soundart closed this as completed Jul 6, 2020
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

4 participants