![]() |
![]() |
#1 |
Nov 2017
Karlsruhe, Germany
378 Posts |
![]()
Hi. I'm trying to compile the latest version of MLucas for my Raspberry Pi Model B Rev 2.
I ran all four commands to determine which SIMD type to use, but it came up empty. So which flag should I use? Also since my Raspi is a single core would it be benificial to not compile using the "-DUSE_THREADS" flag? I hope you can help me out :) |
![]() |
![]() |
![]() |
#2 | |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
178F16 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#3 | |
Nov 2017
Karlsruhe, Germany
31 Posts |
![]() Quote:
So it is an ARM-v6 single core processor. Anyways, I compiled it it with Code:
gcc -c -O3 -DUSE_THREADS ../src/*.c Last fiddled with by BrainStone on 2017-11-16 at 16:33 |
|
![]() |
![]() |
![]() |
#4 | ||
∂2ω=0
Sep 2002
República de California
5·2,351 Posts |
![]() Quote:
Quote:
Code:
int has_asimd(void) { unsigned long hwcaps = getauxval(AT_HWCAP); #ifndef HWCAP_ASIMD const unsigned long HWCAP_ASIMD = 0; #endif if (hwcaps & HWCAP_ASIMD) { return 1; } return 0; } |
||
![]() |
![]() |
![]() |
#5 | |
"Kieren"
Jul 2011
In My Own Galaxy!
2×3×1,693 Posts |
![]() Quote:
![]() |
|
![]() |
![]() |
![]() |
#6 |
∂2ω=0
Sep 2002
República de California
5×2,351 Posts |
![]()
BTW, in case it wasn't obvious, single-core v6 is going to be godawfully slow - my A53 quad, using the SIMD code on all 4 cores, is gonna need 2 months to DC a single exponent ~45 million @2304K FFT length.
|
![]() |
![]() |
![]() |
#7 |
Nov 2017
Karlsruhe, Germany
31 Posts |
![]()
Yes, I'm aware that it's going to be slow. I kinda just want to play with my Pi since I'm not using it for anything else.
Initially I was trying to use mprime and assign it only work that takes the least amount of work. But since mprime doesn't run on arm I can't use it. Assuming I get it to work, and use the script, does it have a feature like mprime that saves the progress so it continues after reboot? |
![]() |
![]() |
![]() |
#8 | |
∂2ω=0
Sep 2002
República de California
5·2,351 Posts |
![]() Quote:
pN.stat - text status file, initially the FFT params being used, then 1 line added at each checkpoint; pN,qN - pair of redundant checkpoint files, program reads these automatically on restart-from-interrupt. A worthwhile experiment might be to make 2 binaries, one with -DUSE_THREADS, the other not. Both will be restricted to 1-thread running on your Pi and one would expect the unthreaded build to be a bit faster due to no thread-management overhead, but I have seen instances where the threaded code is faster even when running 1-threaded. The automated self-tests which will provide the answer will be sufficiently slow on your system that you should probably just run them overnight. Did the above function hack work for you? |
|
![]() |
![]() |
![]() |
#9 |
Nov 2017
Karlsruhe, Germany
1F16 Posts |
![]()
It's still compiling. Takes around 3 hours to do so. I'll let you know in the morning. I'll start a second compilation with the flag active though.
|
![]() |
![]() |
![]() |
#10 |
Nov 2017
Karlsruhe, Germany
3110 Posts |
![]()
Ok. The compilation without threads errored with this log: https://gist.github.com/a1c1a0900155...820b6c9707594e
|
![]() |
![]() |
![]() |
#11 | ||
∂2ω=0
Sep 2002
República de California
5×2,351 Posts |
![]() Quote:
Quote:
Did your above unthreaded build attempt use the modified has_asimd() I posted? If it did and you got no errors in the compilation of util.c, that means you can go back to your original -DUSE_THREAD build (assuming you did that in a separate obj-file directory, and the resulting .o files are still around) and simply do an incremental recompile of util.c, and that should allow you link an executable. If you did your latest build in the same obj-file directory, I suggest you create a 2nd dir strictly for threaded-build obj-files, cd to that, then first make sure compilation of util.c works, then retry the all-sourcefiles compile. |
||
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ARM builds and SIMD-assembler prospects | ewmayer | Mlucas | 183 | 2019-02-25 08:17 |
GMP-ECM with --enable-openmp flag set in configure = bad results? | GP2 | GMP-ECM | 3 | 2016-10-16 10:21 |
Work flag | richs | YAFU | 11 | 2016-01-30 14:27 |
C and the scarry flag | Mr. P-1 | Programming | 77 | 2015-02-23 00:04 |
SIMD string->int | fivemack | Software | 7 | 2009-03-23 18:15 |