mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software > Mlucas

Reply
 
Thread Tools
Old 2017-03-11, 07:08   #12
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2×2,383 Posts
Default

Quote:
Originally Posted by VictordeHolland View Post
I think you both mean ARM Cortex A53 (or A57). A58 doesnt exist (yet) ;).
List of ARM Cortex A:
http://www.arm.com/products/processors/cortex-a
A53, that's correct

Last fiddled with by ET_ on 2017-03-11 at 07:09
ET_ is online now   Reply With Quote
Old 2017-03-11, 09:23   #13
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·2,383 Posts
Default

Quote:
Originally Posted by ewmayer View Post
Hi, Luigi:

Cortex-A58 ... so 128-bit vector instructions OK, but they actually get executed 64-bits at a time?

Thanks for the kind offer of help - a remote-access account would be great, but no biggie since the fewer-core dev-boards are cheap. If you could LMK which precise dev-board I should get to get true 128-bit exec capability, that would be helpful.

Post a pic of your rig once it's set up!

Yesterday I downloaded the hardware guide and programming manuals for both the A53 and the NEON/NE10 system, I will let you know how the A53 (or other processors) performs on 128 bits. IIRC, LaurV is the guru on such processors.

As per the remote access, I don't have a public IP right now, but I can request it if needed.
ET_ is online now   Reply With Quote
Old 2017-03-11, 17:31   #14
Lorenzo
 
Lorenzo's Avatar
 
Aug 2010
Republic of Belarus

2×5×17 Posts
Default

Hi!

Finally i received my PINE64 device. Looks great!!!
Code:
ubuntu@pine64:~/Solaris/mlucas-14.1$ lscpu
Architecture:          aarch64
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             4
CPU max MHz:           1344.0000
CPU min MHz:           480.0000
ubuntu@pine64:~/Solaris/mlucas-14.1$ cat /proc/cpuinfo
Processor    : AArch64 Processor rev 4 (aarch64)
processor    : 0
processor    : 1
processor    : 2
processor    : 3
Features    : fp asimd aes pmull sha1 sha2 crc32 
CPU implementer    : 0x41
CPU architecture: AArch64
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

Hardware    : sun50iw1p1
But I can't compile mlucas.

Code:
ubuntu@pine64:~/Solaris/mlucas-14.1$ sudo make
make  all-am
make[1]: Entering directory '/home/ubuntu/Solaris/mlucas-14.1'
  CC       $NORMAL_O $THREADS_O
Makefile:2984: recipe for target 'NORMAL_O-THREADS_O.stamp' failed
make[1]: *** [NORMAL_O-THREADS_O.stamp] Error 1
make[1]: Leaving directory '/home/ubuntu/Solaris/mlucas-14.1'
Makefile:2084: recipe for target 'all' failed
make: *** [all] Error 2
Is here something special for ARM? Or in generally i can't compile mlucas on arm?
Lorenzo is offline   Reply With Quote
Old 2017-03-11, 17:58   #15
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·2,383 Posts
Default

Quote:
Originally Posted by Lorenzo View Post
Hi!

Finally i received my PINE64 device. Looks great!!!
Code:
ubuntu@pine64:~/Solaris/mlucas-14.1$ lscpu
Architecture:          aarch64
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             4
CPU max MHz:           1344.0000
CPU min MHz:           480.0000
ubuntu@pine64:~/Solaris/mlucas-14.1$ cat /proc/cpuinfo
Processor    : AArch64 Processor rev 4 (aarch64)
processor    : 0
processor    : 1
processor    : 2
processor    : 3
Features    : fp asimd aes pmull sha1 sha2 crc32 
CPU implementer    : 0x41
CPU architecture: AArch64
CPU variant    : 0x0
CPU part    : 0xd03
CPU revision    : 4

Hardware    : sun50iw1p1
But I can't compile mlucas.

Code:
ubuntu@pine64:~/Solaris/mlucas-14.1$ sudo make
make  all-am
make[1]: Entering directory '/home/ubuntu/Solaris/mlucas-14.1'
  CC       $NORMAL_O $THREADS_O
Makefile:2984: recipe for target 'NORMAL_O-THREADS_O.stamp' failed
make[1]: *** [NORMAL_O-THREADS_O.stamp] Error 1
make[1]: Leaving directory '/home/ubuntu/Solaris/mlucas-14.1'
Makefile:2084: recipe for target 'all' failed
make: *** [all] Error 2
Is here something special for ARM? Or in generally i can't compile mlucas on arm?
Did you try
Code:
./configure
before running make?
ET_ is online now   Reply With Quote
Old 2017-03-11, 18:04   #16
Lorenzo
 
Lorenzo's Avatar
 
Aug 2010
Republic of Belarus

101010102 Posts
Default

Yes. Sure.

Code:
ubuntu@pine64:~/Solaris/mlucas-14.1$ 
ubuntu@pine64:~/Solaris/mlucas-14.1$ sudo ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for library containing ceil, log, pow, sqrt, sincos, floor, lrint, atan... -lm
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fenv.h usability... yes
checking fenv.h presence... yes
checking for fenv.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking mach/mach.h usability... no
checking mach/mach.h presence... no
checking for mach/mach.h... no
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inline... inline
checking for pid_t... yes
checking for size_t... yes
checking for uint64_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for clock_gettime... yes
checking for gethrtime... no
checking for gettimeofday... yes
checking for memset... yes
checking for pow... yes
checking for sqrt... yes
checking for strerror... yes
checking for strstr... yes
checking for strtoul... yes
checking whether _LARGEFILE_SOURCE is declared... no
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands

ubuntu@pine64:~/Solaris/mlucas-14.1$ sudo make
make  all-am
make[1]: Entering directory '/home/ubuntu/Solaris/mlucas-14.1'
  CC       $NORMAL_O $THREADS_O
Makefile:2984: recipe for target 'NORMAL_O-THREADS_O.stamp' failed
make[1]: *** [NORMAL_O-THREADS_O.stamp] Error 1
make[1]: Leaving directory '/home/ubuntu/Solaris/mlucas-14.1'
Makefile:2084: recipe for target 'all' failed
make: *** [all] Error 2
Lorenzo is offline   Reply With Quote
Old 2017-03-11, 18:14   #17
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

49816 Posts
Default

Did you download the .tar from the mlucas main page or the debian package from Vang?
VictordeHolland is offline   Reply With Quote
Old 2017-03-11, 18:21   #18
Lorenzo
 
Lorenzo's Avatar
 
Aug 2010
Republic of Belarus

2·5·17 Posts
Default

Quote:
Originally Posted by VictordeHolland View Post
Did you download the .tar from the mlucas main page or the debian package from Vang?
I have dowloaded from here: http://www.mersenneforum.org/mayer/README.html
Lorenzo is offline   Reply With Quote
Old 2017-03-11, 22:56   #19
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

263768 Posts
Default

Quote:
Originally Posted by Lorenzo View Post
Since you're using the auto-make version (which first appeared in v14), that's the correct one.

I've contacted my ARM-build guru - same fellow who put together the auto-make stuff - about your make failure, will let you know as soon as we get a clue.

I do know we needed to fiddle the platform.h file for some ARM systems, but that appears unrelated to your issue. If you do end up needing a not-yet-released version of said .h file, I'll post it here.
ewmayer is offline   Reply With Quote
Old 2017-03-11, 23:05   #20
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

1151810 Posts
Default

David Willmore - another ARM user who I cc'ed on my mail to Alex Vong - says:

Have him start over and this time don't build as root. Then we might get a better idea.


I suggest you try that and post the output here. Assuming that also fails, you can try a manual-build; cd to the src dir of the install where all the .h and .c files reside, 'mkdir MY_OBJ' and cd into that dir, then first try just a single-file compile:

gcc -c -Os -m64 -DUSE_THREADS ../Mlucas.c

If that succeeds, try all the sourcefiles, here with output piped to a logfile:

gcc -c -Os -m64 -DUSE_THREADS ../*.c >& build.log

You can 'grep -i error build.log' to check for compile errors - if there are any, post the logfile here. If no compile errors, try linking:

gcc -o Mlucas *.o -lm -lpthread -lrt

Last fiddled with by ewmayer on 2017-03-12 at 03:28 Reason: add manual build instructions
ewmayer is offline   Reply With Quote
Old 2017-03-12, 09:11   #21
Lorenzo
 
Lorenzo's Avatar
 
Aug 2010
Republic of Belarus

2×5×17 Posts
Default

I've tried first part of manual instruction but without success.
Code:
ubuntu@pine64:~/Solaris/mlucas-14.1/src/MY_OBJ$ gcc -c -Os -m64 -DUSE_THREADS ../Mlucas.c
gcc: error: unrecognized command line option ‘-m64’
ubuntu@pine64:~/Solaris/mlucas-14.1/src/MY_OBJ$ gcc -c -Os -DUSE_THREADS ../Mlucas.c
In file included from ../types.h:30:0,
                 from ../align.h:29,
                 from ../Mlucas.h:29,
                 from ../Mlucas.c:26:
../platform.h:1072:4: error: #error Multithreading currently only supported for Linux/GCC builds!
   #error Multithreading currently only supported for Linux/GCC builds!
    ^
../Mlucas.c: In function ‘ernstMain’:
../Mlucas.c:1170:88: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 "WARN: Mlucas.c: a[] = 0x%08X not aligned on 128-byte boundary!\n", (uint32)a);
                                                                     ^
../Mlucas.c:459:3: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(in_line, STR_MAX_LEN, fp);
   ^
So looks like -m64 option don't allow here. I did a list of allowed options (please have a look at attached file).
Attached Files
File Type: txt gcc.txt (939.9 KB, 13250 views)
Lorenzo is offline   Reply With Quote
Old 2017-03-12, 09:20   #22
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·2,383 Posts
Default

Quote:
Originally Posted by Lorenzo View Post
I've tried first part of manual instruction but without success.
Code:
ubuntu@pine64:~/Solaris/mlucas-14.1/src/MY_OBJ$ gcc -c -Os -m64 -DUSE_THREADS ../Mlucas.c
gcc: error: unrecognized command line option ‘-m64’
ubuntu@pine64:~/Solaris/mlucas-14.1/src/MY_OBJ$ gcc -c -Os -DUSE_THREADS ../Mlucas.c
In file included from ../types.h:30:0,
                 from ../align.h:29,
                 from ../Mlucas.h:29,
                 from ../Mlucas.c:26:
../platform.h:1072:4: error: #error Multithreading currently only supported for Linux/GCC builds!
   #error Multithreading currently only supported for Linux/GCC builds!
    ^
../Mlucas.c: In function ‘ernstMain’:
../Mlucas.c:1170:88: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 "WARN: Mlucas.c: a[] = 0x%08X not aligned on 128-byte boundary!\n", (uint32)a);
                                                                     ^
../Mlucas.c:459:3: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(in_line, STR_MAX_LEN, fp);
   ^
So looks like -m64 option don't allow here. I did a list of allowed options (please have a look at attached file).
try
Code:
 uname -a
Raspberry PI 3 has a 64-bit enabled CPU, but works with 32-bit raspbian and ARMv7 subsystem. I'm mostly sure Pine64 comes configured with a 64-bit OS, but that would clear every doubt about it

Also check the march= and mtune= values.
And mcpu=native

Last fiddled with by ET_ on 2017-03-12 at 09:25
ET_ is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Economic prospects for solar photovoltaic power cheesehead Science & Technology 137 2018-06-26 15:46
Which SIMD flag to use for Raspberry Pi BrainStone Mlucas 14 2017-11-19 00:59
compiler/assembler optimizations possible? ixfd64 Software 7 2011-02-25 20:05
Running 32-bit builds on a Win7 system ewmayer Programming 34 2010-10-18 22:36
SIMD string->int fivemack Software 7 2009-03-23 18:15

All times are UTC. The time now is 16:44.

Wed Sep 30 16:44:01 UTC 2020 up 20 days, 13:54, 0 users, load averages: 1.78, 1.75, 1.76

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.