Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
AlexChess
Posts: 1483
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by AlexChess »

Tried to compile Stockfish-dev (13) for PI4 and Ubuntu ARM64, but from it I get this error:
alex@alex-Parallels-ARM-Virtual-Machine:/test/Stockfish/src$ make -j build ARCH=armv8
Default net: nn-62ef826d1a6d.nnue
Downloading https://tests.stockfishchess.org/api/nn ... d1a6d.nnue
Segmentation fault (core dumped)
make: *** [Makefile:758: net] Error 139
alex@alex-Parallels-ARM-Virtual-Machine:/test/Stockfish/src$

...while doing the same from Mac mini M1 (for M1 architecture) it works perfectly! :shock:
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum: https://shorturl.at/bpvI1
User avatar
AlexChess
Posts: 1483
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by AlexChess »

Hi!

Is there a way to save Cutechess tournament/layout settings on PI4 / Ubuntu ARM64? Every time I must re-add all engines and setup tournament options... :shock:

PS: I have made a desktop launcher to avoid to execute it from terminal, too :D
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum: https://shorturl.at/bpvI1
User avatar
AlexChess
Posts: 1483
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by AlexChess »

Could you also try to compile Igel 3.0 NNUE for PI4 / Ubuntu ARM64?

https://github.com/vshcherbyna/igel

Thank you!
AlexChess
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum: https://shorturl.at/bpvI1
cpeters
Posts: 115
Joined: Wed Feb 17, 2021 7:44 pm
Full name: Christian Petersen

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by cpeters »

Hi Alex

For igel I had downloaded the release:

https://github.com/vshcherbyna/igel/arc ... 0.0.tar.gz

and in the src directory I did

Code: Select all

mkdir -p weights
In weights I did

Code: Select all

wget -c "https://github.com/vshcherbyna/igel/releases/download/3.0.0/ign-1-139b702b"
cd to src dir and change in makefile with editor:
EVALFILE = weights/ign-0-9b1937cc
to
EVALFILE = weights/ign-1-139b702b
I changed
LIBS = -std=c++17 -mpopcnt -pthread
to
LIBS = -std=c++17 -pthread
because the processor I use does not know this instruction.

save+type make.

Greetings
cpeters
Posts: 115
Joined: Wed Feb 17, 2021 7:44 pm
Full name: Christian Petersen

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by cpeters »

For Stockfish:

could you do please in terminal:

lspcu
or
less /proc/cpu

and post everything after

Code: Select all

flags:
please?

And: Did it load the net actually, because the segfault happens there?
User avatar
AlexChess
Posts: 1483
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by AlexChess »

cpeters wrote: Sat Apr 10, 2021 5:47 pm Hi Alex

For igel I had downloaded the release:

https://github.com/vshcherbyna/igel/arc ... 0.0.tar.gz

and in the src directory I did

Code: Select all

mkdir -p weights
In weights I did

Code: Select all

wget -c "https://github.com/vshcherbyna/igel/releases/download/3.0.0/ign-1-139b702b"
cd to src dir and change in makefile with editor:
EVALFILE = weights/ign-0-9b1937cc
to
EVALFILE = weights/ign-1-139b702b
I changed
LIBS = -std=c++17 -mpopcnt -pthread
to
LIBS = -std=c++17 -pthread
because the processor I use does not know this instruction.

save+type make.

Greetings
Hi dear,
Done, but I get errors. Note that Silicon M1 supports popcnt and sse3 | sse41 but not bm2 or avx2 avx 256 avx 512 (at least when I use Windows 10 ARM64 -> intel-x86 translated engines)

alex@alex-Parallels-ARM-Virtual-Machine:~/igel/src$ make
g++: error: unrecognized command line option ‘-m64’
g++: error: unrecognized command line option ‘-m64’
g++: error: unrecognized command line option ‘-m64’
g++ -Wall -std=c++17 -pthread -O3 -march=native -flto -DEVALFILE=\"weights/ign-1-139b702b\" *.cpp nnue/*.cpp nnue/features/*.cpp fathom/tbprobe.c -DNDEBUG -DEVAL_NNUE=1 -D_BTYPE=0 -DSYZYGY_SUPPORT=TRUE -o igel
In file included from fathom/tbprobe.c:137:
fathom/tbcore.c: In function ‘void init_tablebases(const char*)’:
fathom/tbcore.c:440:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
440 | for (i = 1; i < 6; i++)
| ^~~
fathom/tbcore.c:448:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
448 | printf("Found %d tablebases.\n", TBnum_piece + TBnum_pawn);
| ^~~~~~
/usr/bin/ld: cannot open output file igel: Permesso negato
collect2: error: ld returned 1 exit status
make: *** [makefile:38: basic] Errore 1
alex@alex-Parallels-ARM-Virtual-Machine:~/igel/src$

Thank you for your support!! 22:00 now but tomorrow I will retry :)
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum: https://shorturl.at/bpvI1
cpeters
Posts: 115
Joined: Wed Feb 17, 2021 7:44 pm
Full name: Christian Petersen

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by cpeters »

In src without 'make' please copy+paste+enter:

Code: Select all

g++ -Wall -std=c++17 -pthread -msse -msse2 -msse3 -msse4.1 -O3 -march=native -flto -DEVALFILE=\"weights/ign-1-139b702b\" *.cpp nnue/*.cpp nnue/features/*.cpp fathom/tbprobe.c -DNDEBUG -DEVAL_NNUE=1 -D_BTYPE=0 -DSYZYGY_SUPPORT=TRUE -DUSE_SSE2=1 -DUSE_SSSE3=1 -DUSE_SSE41=1 -o igel
User avatar
AlexChess
Posts: 1483
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by AlexChess »

cpeters wrote: Sat Apr 10, 2021 11:35 pm In src without 'make' please copy+paste+enter:

Code: Select all

g++ -Wall -std=c++17 -pthread -msse -msse2 -msse3 -msse4.1 -O3 -march=native -flto -DEVALFILE=\"weights/ign-1-139b702b\" *.cpp nnue/*.cpp nnue/features/*.cpp fathom/tbprobe.c -DNDEBUG -DEVAL_NNUE=1 -D_BTYPE=0 -DSYZYGY_SUPPORT=TRUE -DUSE_SSE2=1 -DUSE_SSSE3=1 -DUSE_SSE41=1 -o igel
Here is the result:

alex@alex-Parallels-ARM-Virtual-Machine:~/igel/src$ g++ -Wall -std=c++17 -pthread -msse -msse2 -msse3 -msse4.1 -O3 -march=native -flto -DEVALFILE=\"weights/ign-1-139b702b\" *.cpp nnue/*.cpp nnue/features/*.cpp fathom/tbprobe.c -DNDEBUG -DEVAL_NNUE=1 -D_BTYPE=0 -DSYZYGY_SUPPORT=TRUE -DUSE_SSE2=1 -DUSE_SSSE3=1 -DUSE_SSE41=1 -o igel
g++: error: unrecognized command line option ‘-msse’
g++: error: unrecognized command line option ‘-msse2’
g++: error: unrecognized command line option ‘-msse3’
g++: error: unrecognized command line option ‘-msse4.1’
alex@alex-Parallels-ARM-Virtual-Machine:~/igel/src$

Regards, Alex
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum: https://shorturl.at/bpvI1
User avatar
AlexChess
Posts: 1483
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by AlexChess »

cpeters wrote: Sat Apr 10, 2021 5:57 pm For Stockfish:

could you do please in terminal:

lspcu
or
less /proc/cpu

and post everything after

Code: Select all

flags:
please?

And: Did it load the net actually, because the segfault happens there?

Code: Select all

alex@alex-Parallels-ARM-Virtual-Machine:~$ lscpu
Architecture:                    aarch64
CPU op-mode(s):                  64-bit
Byte Order:                      Little Endian
CPU(s):                          2
On-line CPU(s) list:             0,1
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       ARM
Model:                           0
Stepping:                        r0p0
BogoMIPS:                        48.00
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled v
                                 ia prctl
Vulnerability Spectre v1:        Mitigation; __user pointer sanitization
Vulnerability Spectre v2:        Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fp asimd evtstrm aes pmull sha1 sha2 crc32 atom
                                 ics fphp asimdhp cpuid asimdrdm jscvt fcma lrcp
                                 c dcpop sha3 asimddp sha512 asimdfhm dit uscat 
                                 ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 fr
                                 int
The net is loaded with your instructions, but it gives errors also starting with "g++"
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum: https://shorturl.at/bpvI1
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by jshriver »

Here is an engine update as requested:

* Igel 3.0.0
* Stockfish 13
* lc0 0.27.0

https://chess.nyc3.cdn.digitaloceanspac ... 21.tar.bz2