View Single Post
Old 2021-05-10, 21:10   #24
ewmayer's Avatar
Sep 2002
Rep├║blica de California

2×3×29×67 Posts

Originally Posted by bayanne View Post
My new iMac will be arriving shortly, and I hope to compile and run MLucas v19.1 on it.

However where do I find the simple version on how to compile on ARM cpu?
Hi, Bayanne - tdulcet and danc2 have put together a very nice auto-install-and-tune script, but that is alas Linux-only. But a simple DIY command-line build for Arm-based iMac is straightforward, here the condensed instructions - this assumes you have the native Clang compiler installed, 'which clang' to check that. First download the v19.1 source tarball, which is linked at the Mlucas README page, unpack as detailed, then

cd ~/*19.1
mkdir obj
cd obj
clang -c -O3 -DUSE_ARM_V8_SIMD -DUSE_THREADS ../src/*.c >& build.log
grep error build.log
[Assuming above grep comes up empty]clang -o Mlucas *.o -lm -lpthread -lrt

Note Clang does not need explicit library-linkage of the math, pthread and realtime libraries, i.e. does not need the user to invoke -lm -lpthread -lrt at link time; if you include them and get a Clang linker error, try omitting them and relinking with just clang -o Mlucas *.o

To autotune for 8-core iMac M1, a hybrid of 4 'performance' and 4 'efficiency' cores: ./Mlucas -s m -iters 1000 -cpu 0:7

Assuming all that works, please post a copy of the resulting mlucas.cfg file containing optimal-FFT-parameters for your machine here. You can do assignments auto-management using the script, a copy of which is in ~/*19.1/src . I suggest you create a run-directory at top level in your user-dir, copy the Mlucas binary, mlucas.cfg and there, then run as described at the README.

Last fiddled with by ewmayer on 2021-05-10 at 21:12
ewmayer is online now   Reply With Quote