[Info] How to compile the actual 64Bit version of stockfish chess engine


guidol
 Share

3 3

Recommended Posts

Normally you could install (if you use a 64Bit arm-system/OS) the 64Bit version of stockfish with
apt install stockfish

stockfish is a uci-chess-engine where some Chessboard-Display-Apps can conenct to (later I would show how to use this with TCP)

Then you will get (at this time) the Version 8 64Bit = 8 64 = 11/2016

 

But the actual stockfish-engine is at Version 10 = 12/2018 ( see http://blog.stockfishchess.org/ )

 

So I did clone the git-master at https://github.com/official-stockfish/Stockfish as .zip

 

After unzipping and cd to ./Stockfish-master/src

you could do

-make clean

-make help

BUT there is for arm only a ARCH=armv7 (32Bit) option :(

 

When using the ARCH=general-64 option

make build ARCH=general64 COMP=gcc COMPCXX=g++

then the start of the compile did fail because g++ says that he didnt knows the -m64 commandline-option :(

 

I searched the Web and found there no solution :(

 

So I did take a look into the Makefile and first I didnt found anything about -m64, but then I discoverd in the gcc-options the follwing part which I then deleted:
 

	else
		CXXFLAGS += -m$(bits)
		LDFLAGS += -m$(bits)

after that I did create a aarch64-ARCH-section under the armv7-ARCH-section:

ifeq ($(ARCH),aarch64)
        arch = any
        prefetch = yes
        bits = 64
endif

arch = any is copied from the "general-64" section, prefetch is copied from the "armv7"-section and maybe the "bits = 64" is obsolete?

 

Now we can compile - there are two options:
 

dpkg -l|grep 'g++'
ii  g++                             4:6.3.0-4                         arm64        GNU C++ compiler
ii  g++-6                           6.3.0-18+deb9u1                   arm64        GNU C++ compiler

make build ARCH=aarch64 COMP=gcc COMPCXX=g++
make build ARCH=aarch64 COMP=gcc COMPCXX=g++-6

When the compile has completed you will have the executeable stockfish in your ./Stockfish-master/src directory.

see stockfish_10_64 as attached binary at the end of this thread-message :)

 

When started you will see:

Stockfish 140319 64 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott

 

Enter uci and you will see the stockfish-info:
 

id name Stockfish 140319 64
id author T. Romstad, M. Costalba, J. Kiiski, G. Linscott

option name Debug Log File type string default
option name Contempt type spin default 24 min -100 max 100
option name Analysis Contempt type combo default Both var Off var White var Black var Both
option name Threads type spin default 1 min 1 max 512
option name Hash type spin default 16 min 1 max 131072
option name Clear Hash type button
option name Ponder type check default false
option name MultiPV type spin default 1 min 1 max 500
option name Skill Level type spin default 20 min 0 max 20
option name Move Overhead type spin default 30 min 0 max 5000
option name Minimum Thinking Time type spin default 20 min 0 max 5000
option name Slow Mover type spin default 84 min 10 max 1000
option name nodestime type spin default 0 min 0 max 10000
option name UCI_Chess960 type check default false
option name UCI_AnalyseMode type check default false
option name SyzygyPath type string default <empty>
option name SyzygyProbeDepth type spin default 1 min 1 max 100
option name Syzygy50MoveRule type check default true
option name SyzygyProbeLimit type spin default 7 min 0 max 7
uciok

You could leave the stockfish chess-engine with quit

 

I will add (these days) a tutorial for setting up stockfish as TCP-Service (via inetd)

and then we could connect via Windows/Android/Linux ChessBoard-Display-Apps to play with the stockfish engine on your 64Bit ARM-System :)

Preview-Information-Links for setting up , connecting and playing with the engine:
https://somoit.net/linux/linux-create-custom-inetd-service
https://jerrygreenblog.wordpress.com/2016/08/26/linux-stockfish-chess-engine-as-remote-service/
http://aartbik.blogspot.com/2012/03/connecting-chess-for-android-to-remote.html

 

 

Chess_for_Android_with_stockfish_server.jpg

stockfish_10_64

Link to post
Share on other sites

Donate and support the project!

[EDIT]

couldnt wait until tomorrow ;)

 

Worked fine like on the v10 version and resulted in:

stockfish_v11_aarch64.jpg.824c209c11fe9575b683cba4aa566dc5.jpg

 

but in the documentation it seems I deleted one endif to much :(

 

So the part of the Makefile where I deleted the else-tree should look like:

ifeq ($(COMP),gcc)
        comp=gcc
        CXX=g++
        CXXFLAGS += -pedantic -Wextra -Wshadow

        ifeq ($(ARCH),armv7)
                ifeq ($(OS),Android)
                        CXXFLAGS += -m$(bits)
                        LDFLAGS += -m$(bits)
                endif
        endif


        ifneq ($(KERNEL),Darwin)
           LDFLAGS += -Wl,--no-as-needed
        endif
endif

and the part for armv7 and aarch64 should look like:
 

ifeq ($(ARCH),armv7)
        arch = armv7
        prefetch = yes
endif

ifeq ($(ARCH),aarch64)
        arch = any
        prefetch = yes
        bits = 64
endif

On my NanoPi K1 Plus where these 2 gcc++ versions installed:

root@npi-k1-plus(192.168.6.70):/home/guido/Stockfish-master/src# dpkg -l|grep 'g++'
ii  g++                                  4:9.2.1-3.1                    arm64        GNU C++ compiler
ii  g++-9                                9.2.1-22                       arm64        GNU C++ compiler

so I used the following command to compile stockfish v11:

make build ARCH=aarch64 COMP=gcc COMPCXX=g++-9

which did work well:
 

Spoiler

Config:
debug: 'no'
sanitize: 'no'
optimize: 'yes'
arch: 'any'
bits: '64'
kernel: 'Linux'
os: 'GNU/Linux'
prefetch: 'yes'
popcnt: 'no'
sse: 'no'
pext: 'no'

Flags:
CXX: g++-9
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto
LDFLAGS:  -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto

Testing config sanity. If this fails, try 'make help' ...

make ARCH=aarch64 COMP=gcc all
make[1]: Entering directory '/home/guido/Stockfish-master/src'
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o benchmark.o benchmark.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o bitbase.o bitbase.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o bitboard.o bitboard.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o endgame.o endgame.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o evaluate.o evaluate.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o main.o main.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o material.o material.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o misc.o misc.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o movegen.o movegen.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o movepick.o movepick.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o pawns.o pawns.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o position.o position.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o psqt.o psqt.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o search.o search.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o thread.o thread.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o timeman.o timeman.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o tt.o tt.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o uci.o uci.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o ucioption.o ucioption.cpp
g++-9 -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto   -c -o syzygy/tbprobe.o syzygy/tbprobe.cpp
g++-9 -o stockfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o thread.o timeman.o tt.o uci.o ucioption.o syzygy/tbprobe.o  -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++11  -pedantic -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -flto
make[1]: Leaving directory '/home/guido/Stockfish-master/src'
 


Have fun with this actual chess-engine ;)
 

Link to post
Share on other sites

11 hours ago, Saikat said:

Sir, how can I compile stockfish for Android?

You dont have to, because its available as Chess-engine for Android at:
https://stockfishchess.org/files/stockfish-10-android.zip

(see page https://stockfishchess.org/download/ ) 
or in the Play-Store at
https://play.google.com/store/apps/details?id=app.packs.stockfishengine&hl=de

Or dp you need a playable grahical Interface for it? Then use

https://play.google.com/store/apps/details?id=com.google.android.chess&hl=de

 

Link to post
Share on other sites

But, sir, I want to compile stockfish 11 for Android so that I can change some source code and test the engine in droidfish. I'm trying to do this since last week but I can't. I messaged you in Facebook Messenger, if possible reply me there, sir. I'm waiting for your reply.

Link to post
Share on other sites

9 hours ago, Saikat said:

But, sir, I want to compile stockfish 11 for Android so that I can change some source code and test the engine in droidfish. I'm trying to do this since last week but I can't. I messaged you in Facebook Messenger, if possible reply me there, sir. I'm waiting for your reply.

 

Android is it's own space, and out of scope of with Armbian support...

Link to post
Share on other sites

stockfish v12 with NNUE (neural network) is now available :) 
https://blog.stockfishchess.org/post/628172810852925440/stockfish-12
https://github.com/official-stockfish/Stockfish/commit/84f3e867903f62480c33243dd0ecbffd342796fc

 

for compiling v12 with NNUE on aarch64 (64bit) I had to change a few bits in the makefile:

 

for the first time I inserted aarch64 in the check of supported platforms: 

( but you could also use the SUPPORTED_ARCH=true while compiling)
without one of these 2 the compile will end with a error 1

# explicitly check for the list of supported architectures (as listed with make help),
# the user can override with `make ARCH=x86-32-vnni256 SUPPORTED_ARCH=true`
ifeq ($(ARCH), $(filter $(ARCH), \
                 x86-64-vnni512 x86-64-vnni256 x86-64-avx512 x86-64-bmi2 x86-64-avx2 \
                 x86-64-sse41-popcnt x86-64-modern x86-64-ssse3 x86-64-sse3-popcnt \
                 x86-64 x86-32-sse41-popcnt x86-32-sse2 x86-32 ppc-64 ppc-32 \
                 armv7 armv7-neon armv8 aarch64 apple-silicon general-64 general-32))
   SUPPORTED_ARCH=true
else
   SUPPORTED_ARCH=false
endif

as before I deleted the "else if" from this check - for not getting the unsupported -m64 option:
(here we dont use Android :) )

ifeq ($(COMP),gcc)
        comp=gcc
        CXX=g++
        CXXFLAGS += -pedantic -Wextra -Wshadow

        ifeq ($(arch),$(filter $(arch),armv7 armv8))
                ifeq ($(OS),Android)
                        CXXFLAGS += -m$(bits)
                        LDFLAGS += -m$(bits)
                endif
        endif

        ifeq ($(arch),$(filter $(arch),armv7))
                LDFLAGS += -latomic
        endif

        ifneq ($(KERNEL),Darwin)
           LDFLAGS += -Wl,--no-as-needed
        endif
endif

and created a new aarch64 platform entry. This time with arch=armv8 and popcnt = yes and neon = yes, because a gcc check did show me
armv8 and cortex-a53 as tune options - and armv8 has in the original Makefile these options active included.

GCC Check:
============================================================
gcc -march=native -Q --help=target | grep -- '-march='
  -march=                               armv8-a+crypto+crc

gcc -mtune=native -Q --help=target | grep -- '-mtune='
  -mtune=                               cortex-a53
============================================================

Also activated the 64bits for the aarch64-platform:
 

ifeq ($(ARCH),aarch64)
        arch = armv8
        prefetch = yes
        popcnt = yes
        neon = yes
        bits = 64
endif

BUT stockfish doesnt show the 64 for 64bit at the version string  :( - stockfish v10 and v11 did this before:

 

stockfish_v12_NNUE_aarch64.jpg.8f1b33cf5e8454d5bc1a22e30f8dea19.jpg

Link to post
Share on other sites

Thank you for providing these valuable infos.

I successfully installed picochess with the current Stockfish 12 engine and the 3-4-5-men syzygy endgame tables on a 64 GB eMMC chip with Ubuntu 20.04.

Now I can use my Odroid C2 with a DGT Smartboard in conjunction with a DGT 3000 chessclock.

Link to post
Share on other sites

Stockfish v14 has arrived :)

Stockfish_14_NanoPi_K1_Plus_aarch64.jpg.1acc0551cff10e37fe61fa50c6af14fb.jpg

 

Compile did work on my NanoPi K1 Plus

Spoiler


make -j build ARCH=aarch64 COMP=gcc COMPCXX=g++

make -j build ARCH=aarch64

root@npi-k1-plus-70(192.168.6.70):/home/guido/Stockfish-sf_14/src# make net
Default net: nn-3475407dc199.nnue
Downloading https://tests.stockfishchess.org/api/nn/nn-3475407dc199.nnue
root@npi-k1-plus-70(192.168.6.70):/home/guido/Stockfish-sf_14/src# make -j build ARCH=aarch64
Default net: nn-3475407dc199.nnue
Already available.

Config:
debug: 'no'
sanitize: 'none'
optimize: 'yes'
arch: 'armv8'
bits: '64'
kernel: 'Linux'
os: 'GNU/Linux'
prefetch: 'yes'
popcnt: 'yes'
pext: 'no'
sse: 'no'
mmx: 'no'
sse2: 'no'
ssse3: 'no'
sse41: 'no'
avx2: 'no'
avx512: 'no'
vnni256: 'no'
vnni512: 'no'
neon: 'yes'

Flags:
CXX: g++
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto
LDFLAGS:  -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto -flto=jobserver

Testing config sanity. If this fails, try 'make help' ...

make ARCH=aarch64 COMP=gcc all
make[1]: Entering directory '/home/guido/Stockfish-sf_14/src'
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o benchmark.o benchmark.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o bitbase.o bitbase.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o bitboard.o bitboard.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o endgame.o endgame.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o evaluate.o evaluate.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o main.o main.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o material.o material.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o misc.o misc.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o movegen.o movegen.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o movepick.o movepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o pawns.o pawns.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o position.o position.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o psqt.o psqt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o search.o search.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o thread.o thread.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o timeman.o timeman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o tt.o tt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o uci.o uci.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o ucioption.o ucioption.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o tune.o tune.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o tbprobe.o syzygy/tbprobe.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o evaluate_nnue.o nnue/evaluate_nnue.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o half_ka_v2.o nnue/features/half_ka_v2.cpp
nnue/evaluate_nnue.cpp: In function ‘Stockfish::Value Stockfish::Eval::NNUE::evaluate(const Stockfish::Position&, bool)’:
nnue/evaluate_nnue.cpp:156:80: warning: requested alignment 64 is larger than 16 [-Wattributes]
       TransformedFeatureType transformedFeatures[FeatureTransformer::BufferSize];
                                                                                ^
nnue/evaluate_nnue.cpp:157:55: warning: requested alignment 64 is larger than 16 [-Wattributes]
     alignas(alignment) char buffer[Network::BufferSize];
                                                       ^
nnue/evaluate_nnue.cpp: In function ‘Stockfish::Eval::NNUE::NnueEvalTrace Stockfish::Eval::NNUE::trace_evaluate(const Stockfish::Position&)’:
nnue/evaluate_nnue.cpp:205:80: warning: requested alignment 64 is larger than 16 [-Wattributes]
       TransformedFeatureType transformedFeatures[FeatureTransformer::BufferSize];
                                                                                ^
nnue/evaluate_nnue.cpp:206:55: warning: requested alignment 64 is larger than 16 [-Wattributes]
     alignas(alignment) char buffer[Network::BufferSize];
                                                       ^
g++ -o stockfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o thread.o timeman.o tt.o uci.o ucioption.o tune.o tbprobe.o evaluate_nnue.o half_ka_v2.o  -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto -flto=jobserver
make[1]: Leaving directory '/home/guido/Stockfish-sf_14/src'


root@npi-k1-plus-70(192.168.6.70):/home/guido/Stockfish-sf_14/src# ./stockfish
Stockfish 14 by the Stockfish developers (see AUTHORS file)
uci
id name Stockfish 14
id author the Stockfish developers (see AUTHORS file)

option name Debug Log File type string default
option name Threads type spin default 1 min 1 max 512
option name Hash type spin default 16 min 1 max 33554432
option name Clear Hash type button
option name Ponder type check default false
option name MultiPV type spin default 1 min 1 max 500
option name Skill Level type spin default 20 min 0 max 20
option name Move Overhead type spin default 10 min 0 max 5000
option name Slow Mover type spin default 100 min 10 max 1000
option name nodestime type spin default 0 min 0 max 10000
option name UCI_Chess960 type check default false
option name UCI_AnalyseMode type check default false
option name UCI_LimitStrength type check default false
option name UCI_Elo type spin default 1350 min 1350 max 2850
option name UCI_ShowWDL type check default false
option name SyzygyPath type string default <empty>
option name SyzygyProbeDepth type spin default 1 min 1 max 100
option name Syzygy50MoveRule type check default true
option name SyzygyProbeLimit type spin default 7 min 0 max 7
option name Use NNUE type check default true
option name EvalFile type string default nn-3475407dc199.nnue
uciok
quit
 

root@npi-k1-plus-70(192.168.6.70):/home/guido/Stockfish-sf_14/src# ./stockfish compiler
Stockfish 14 by the Stockfish developers (see AUTHORS file)

Compiled by g++ (GNUC) 8.3.0 on Linux
Compilation settings include:  64bit POPCNT NEON
__VERSION__ macro expands to: 8.3.0
 

root@npi-k1-plus-70(192.168.6.70):/home/guido/Stockfish-sf_14/src# uname -a
Linux npi-k1-plus-70 5.12.10-sunxi64 #trunk.71 SMP Sat Jun 12 09:27:14 UTC 2021 aarch64 GNU/Linux

root@npi-k1-plus-70(192.168.6.70):/home/guido/Stockfish-sf_14/src# more /etc/os-release
PRETTY_NAME="Armbian 21.05.4 Buster"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

 

BUT not on any nanoPi Neo2 :(

 

Spoiler

On NanoPi Neo2:

g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_POPCNT -DUSE_NEON -flto   -c -o half_ka_v2.o nnue/features/half_ka_v2.cpp
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[1]: *** [<builtin>: misc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[1]: *** [<builtin>: position.o] Error 1
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[1]: *** [<builtin>: evaluate.o] Error 1
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[1]: *** [<builtin>: timeman.o] Error 1

 

But the on the nanoPi K1 Plus compiled version does run on the NanoPi Neo2 - strange? OK both are aarch64 and the changed Makefile is the same. All at the same kernel, but on the Neo2 it didnt worked with buster nor focal :(

 

The binary is about 47MB uncompress and 25MB compress as a .zip

 

I will attach the content of my aarch64-Makefile

Stockfish12_Makefile_aarch64.txt

Link to post
Share on other sites

18 hours ago, guidol said:

BUT not on any nanoPi Neo2 :(

 

But the on the nanoPi K1 Plus compiled version does run on the NanoPi Neo2 - strange? OK both are aarch64 and the changed Makefile is the same. All at the same kernel, but on the Neo2 it didnt worked with buster nor focal :(

 

OK - after sleeping one night over the "problem" its only a problem of too less memory ;)

 

I compiled also successfully on a Odroid C2 (also aarch64 while meson64 and not sunxi64), but the Ordroid C2 has (like the NanoPi K1 Plus) 2GB of real Ram + around 1GB Swap-Memory.

 

This amount of 3GB is much used while compiling stockfish v14 :(

While my "big" Neo2 has 1GB of real Ram (the other small ones only 512MB) and around 512MB of Swap-Memory they hadnt any chance to compile this stockfish! ;)

 

After this the test was to give the 1GB Neo2 2GB of Swap-Memory on the internal HDD (I have the silver NAS-Cas from FriendlyARM):

mount
/dev/sda1 on /harddisc type ext4 (rw,relatime,stripe=8191)

Neo2 2GB SWAP for compiling stockfish:
dd if=/dev/zero of=/harddisc/swapfile_2GB bs=1024 count=2048000
chmod 0600 /harddisc/swapfile_2GB
mkswap /harddisc/swapfile_2GB
swapon /harddisc/swapfile_2GB

The following commands after the compile ;)
================================================================
swapoff /harddisc/swapfile_2GB
sync

 

The Neo2 1GB with armbian focal has a g++-9 64bit compiler against the g++-8 on the NanoPi K1 Plus and the Ordroid C2.

So for the g++9 version the commandline was

make -j build ARCH=aarch64 COMP=gcc COMPCXX=g++-9

(for the Ordoid C2 its was: make -j build ARCH=aarch64 COMP=gcc COMPCXX=g++-8 )

 

While using the Swap-Memory on the HDD it took "ages" againt the partly Ram-compile on the Odroid C2, but it did succeed:

 

g++ - 9 version on NanoPi Neo2

-rwxrwxrwx 1 root root 48124208 Jul  4 18:25 /toshiba/stockfish_14_aarch64_g++9

 

Stockfish14_compile_on_nanoPi_Neo2.jpg.ce92fff4194a7382009e81fe3aba64ae.jpg


g++ - 8 version on nanoPi K1 Plus or/and Odroid C2

-rwxrwxrwx 1 root root 48091376 Jul  3 23:06 /toshiba/stockfish_14_aarch64_bin_backup


 

 

Link to post
Share on other sites

Good day!
I'm trying to compile stockfish 14 for RaspberryPi Zero, I managed to create an artifact using ARCH=armv7 and the binary file works, but for ARCH=general-32 I can't build with compilation error:
- I created a 4GB swap file
- I removed lines in Makefile with '--m $ (bits)'

 

In one of the projects I read that the general-32 stockfish binary works faster on RPiZ. Can you please tell me where to dig next?

 

Compilation error:

Spoiler

$ make clean && make build ARCH=general-32 optimize=yes
Default net: nn-3475407dc199.nnue
Already available.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_TIME = "ru_RU.UTF-8",
    LC_MONETARY = "ru_RU.UTF-8",
    LC_ADDRESS = "ru_RU.UTF-8",
    LC_TELEPHONE = "ru_RU.UTF-8",
    LC_NAME = "ru_RU.UTF-8",
    LC_MEASUREMENT = "ru_RU.UTF-8",
    LC_IDENTIFICATION = "ru_RU.UTF-8",
    LC_NUMERIC = "ru_RU.UTF-8",
    LC_PAPER = "ru_RU.UTF-8",
    LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").

Config:
debug: 'no'
sanitize: 'none'
optimize: 'yes'
arch: 'any'
bits: '32'
kernel: 'Linux'
os: 'GNU/Linux'
prefetch: 'yes'
popcnt: 'no'
pext: 'no'
sse: 'no'
mmx: 'no'
sse2: 'no'
ssse3: 'no'
sse41: 'no'
avx2: 'no'
avx512: 'no'
vnni256: 'no'
vnni512: 'no'
neon: 'no'

Flags:
CXX: g++
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto
LDFLAGS:  -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto -flto=jobserver

Testing config sanity. If this fails, try 'make help' ...

make ARCH=general-32 COMP=gcc all
make[1]: Entering directory '/home/pi/Stockfish-sf_14/src'
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o benchmark.o benchmark.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o bitbase.o bitbase.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o bitboard.o bitboard.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o endgame.o endgame.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o evaluate.o evaluate.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o main.o main.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o material.o material.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o misc.o misc.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o movegen.o movegen.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o movepick.o movepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o pawns.o pawns.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o position.o position.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o psqt.o psqt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o search.o search.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o thread.o thread.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o timeman.o timeman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o tt.o tt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o uci.o uci.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o ucioption.o ucioption.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o tune.o tune.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o tbprobe.o syzygy/tbprobe.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o evaluate_nnue.o nnue/evaluate_nnue.cpp
nnue/evaluate_nnue.cpp: In function ‘Stockfish::Value Stockfish::Eval::NNUE::evaluate(const Stockfish::Position&, bool)’:
nnue/evaluate_nnue.cpp:156:80: warning: requested alignment 64 is larger than 8 [-Wattributes]
       TransformedFeatureType transformedFeatures[FeatureTransformer::BufferSize];
                                                                                ^
nnue/evaluate_nnue.cpp:157:55: warning: requested alignment 64 is larger than 8 [-Wattributes]
     alignas(alignment) char buffer[Network::BufferSize];
                                                       ^
nnue/evaluate_nnue.cpp: In function ‘Stockfish::Eval::NNUE::NnueEvalTrace Stockfish::Eval::NNUE::trace_evaluate(const Stockfish::Position&)’:
nnue/evaluate_nnue.cpp:205:80: warning: requested alignment 64 is larger than 8 [-Wattributes]
       TransformedFeatureType transformedFeatures[FeatureTransformer::BufferSize];
                                                                                ^
nnue/evaluate_nnue.cpp:206:55: warning: requested alignment 64 is larger than 8 [-Wattributes]
     alignas(alignment) char buffer[Network::BufferSize];
                                                       ^
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o half_ka_v2.o nnue/features/half_ka_v2.cpp
g++ -o stockfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o thread.o timeman.o tt.o uci.o ucioption.o tune.o tbprobe.o evaluate_nnue.o half_ka_v2.o  -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto -flto=jobserver
/usr/bin/ld: /tmp/ccJrt67Q.ltrans0.ltrans.o: in function `Stockfish::Value Stockfish::(anonymous namespace)::search<(Stockfish::(anonymous namespace)::NodeType)1>(Stockfish::Position&, Stockfish::Search::Stack*, Stockfish::Value, Stockfish::Value, int, bool) [clone .constprop.36]':
<artificial>:(.text+0x868c): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x8ee8): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x99a8): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x9b2c): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans0.ltrans.o: in function `Stockfish::ThreadPool::start_thinking(Stockfish::Position&, std::unique_ptr<std::deque<Stockfish::StateInfo, std::allocator<Stockfish::StateInfo> >, std::default_delete<std::deque<Stockfish::StateInfo, std::allocator<Stockfish::StateInfo> > > >&, Stockfish::Search::LimitsType const&, bool) [clone .constprop.51]':
<artificial>:(.text+0xa1ec): undefined reference to `__atomic_store_8'
/usr/bin/ld: <artificial>:(.text+0xa204): undefined reference to `__atomic_store_8'
/usr/bin/ld: <artificial>:(.text+0xa218): undefined reference to `__atomic_store_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans4.ltrans.o: in function `Stockfish::dbg_print()':
<artificial>:(.text+0x4014): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x4028): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x405c): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x4094): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x40cc): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans4.ltrans.o:<artificial>:(.text+0x40e0): more undefined references to `__atomic_load_8' follow
/usr/bin/ld: /tmp/ccJrt67Q.ltrans1.ltrans.o: in function `Stockfish::Value Stockfish::(anonymous namespace)::search<(Stockfish::(anonymous namespace)::NodeType)2>(Stockfish::Position&, Stockfish::Search::Stack*, Stockfish::Value, Stockfish::Value, int, bool) [clone .constprop.33]':
<artificial>:(.text+0x10afc): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: <artificial>:(.text+0x10ba4): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x111f8): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans2.ltrans.o: in function `Stockfish::UCI::loop(int, char**)':
<artificial>:(.text+0x4a28): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans2.ltrans.o: in function `Stockfish::MainThread::check_time() [clone .part.82]':
<artificial>:(.text+0x61e8): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x62f4): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans2.ltrans.o:<artificial>:(.text+0x6f98): more undefined references to `__atomic_load_8' follow
/usr/bin/ld: /tmp/ccJrt67Q.ltrans2.ltrans.o: in function `Stockfish::Value Stockfish::(anonymous namespace)::search<(Stockfish::(anonymous namespace)::NodeType)0>(Stockfish::Position&, Stockfish::Search::Stack*, Stockfish::Value, Stockfish::Value, int, bool) [clone .lto_priv.273]':
<artificial>:(.text+0x8c78): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans3.ltrans.o: in function `Stockfish::UCI::pv[abi:cxx11](Stockfish::Position const&, int, Stockfish::Value, Stockfish::Value)':
<artificial>:(.text+0x434): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x4e0): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x52c): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans3.ltrans.o: in function `Stockfish::Position::do_move(Stockfish::Move, Stockfish::StateInfo&, bool)':
<artificial>:(.text+0x3ce0): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans3.ltrans.o: in function `Stockfish::Thread::search()':
<artificial>:(.text+0xd1e4): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0xd444): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0xe61c): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0xe640): undefined reference to `__atomic_store_8'
/usr/bin/ld: <artificial>:(.text+0xe724): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0xe8ec): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans3.ltrans.o: in function `Stockfish::MainThread::search()':
<artificial>:(.text+0xef90): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0xf35c): undefined reference to `__atomic_store_8'
/usr/bin/ld: <artificial>:(.text+0xf398): undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:871: stockfish] Error 1
make[1]: Leaving directory '/home/pi/Stockfish-sf_14/src'
make: *** [Makefile:741: build] Error 2

 

Link to post
Share on other sites

On 7/6/2021 at 10:06 AM, Navistar said:

Good day!
I'm trying to compile stockfish 14 for RaspberryPi Zero, I managed to create an artifact using ARCH=armv7 and the binary file works, but for ARCH=general-32 I can't build with compilation error:
- I created a 4GB swap file
- I removed lines in Makefile with '--m $ (bits)'

 

In one of the projects I read that the general-32 stockfish binary works faster on RPiZ. Can you please tell me where to dig next?

 

Compilation error:

  Reveal hidden contents

$ make clean && make build ARCH=general-32 optimize=yes
Default net: nn-3475407dc199.nnue
Already available.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_TIME = "ru_RU.UTF-8",
    LC_MONETARY = "ru_RU.UTF-8",
    LC_ADDRESS = "ru_RU.UTF-8",
    LC_TELEPHONE = "ru_RU.UTF-8",
    LC_NAME = "ru_RU.UTF-8",
    LC_MEASUREMENT = "ru_RU.UTF-8",
    LC_IDENTIFICATION = "ru_RU.UTF-8",
    LC_NUMERIC = "ru_RU.UTF-8",
    LC_PAPER = "ru_RU.UTF-8",
    LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").

Config:
debug: 'no'
sanitize: 'none'
optimize: 'yes'
arch: 'any'
bits: '32'
kernel: 'Linux'
os: 'GNU/Linux'
prefetch: 'yes'
popcnt: 'no'
pext: 'no'
sse: 'no'
mmx: 'no'
sse2: 'no'
ssse3: 'no'
sse41: 'no'
avx2: 'no'
avx512: 'no'
vnni256: 'no'
vnni512: 'no'
neon: 'no'

Flags:
CXX: g++
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto
LDFLAGS:  -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto -flto=jobserver

Testing config sanity. If this fails, try 'make help' ...

make ARCH=general-32 COMP=gcc all
make[1]: Entering directory '/home/pi/Stockfish-sf_14/src'
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o benchmark.o benchmark.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o bitbase.o bitbase.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o bitboard.o bitboard.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o endgame.o endgame.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o evaluate.o evaluate.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o main.o main.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o material.o material.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o misc.o misc.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o movegen.o movegen.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o movepick.o movepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o pawns.o pawns.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o position.o position.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o psqt.o psqt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o search.o search.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o thread.o thread.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o timeman.o timeman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o tt.o tt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o uci.o uci.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o ucioption.o ucioption.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o tune.o tune.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o tbprobe.o syzygy/tbprobe.cpp
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o evaluate_nnue.o nnue/evaluate_nnue.cpp
nnue/evaluate_nnue.cpp: In function ‘Stockfish::Value Stockfish::Eval::NNUE::evaluate(const Stockfish::Position&, bool)’:
nnue/evaluate_nnue.cpp:156:80: warning: requested alignment 64 is larger than 8 [-Wattributes]
       TransformedFeatureType transformedFeatures[FeatureTransformer::BufferSize];
                                                                                ^
nnue/evaluate_nnue.cpp:157:55: warning: requested alignment 64 is larger than 8 [-Wattributes]
     alignas(alignment) char buffer[Network::BufferSize];
                                                       ^
nnue/evaluate_nnue.cpp: In function ‘Stockfish::Eval::NNUE::NnueEvalTrace Stockfish::Eval::NNUE::trace_evaluate(const Stockfish::Position&)’:
nnue/evaluate_nnue.cpp:205:80: warning: requested alignment 64 is larger than 8 [-Wattributes]
       TransformedFeatureType transformedFeatures[FeatureTransformer::BufferSize];
                                                                                ^
nnue/evaluate_nnue.cpp:206:55: warning: requested alignment 64 is larger than 8 [-Wattributes]
     alignas(alignment) char buffer[Network::BufferSize];
                                                       ^
g++ -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto   -c -o half_ka_v2.o nnue/features/half_ka_v2.cpp
g++ -o stockfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o thread.o timeman.o tt.o uci.o ucioption.o tune.o tbprobe.o evaluate_nnue.o half_ka_v2.o  -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -DUSE_PTHREADS -DNDEBUG -O3 -flto -flto=jobserver
/usr/bin/ld: /tmp/ccJrt67Q.ltrans0.ltrans.o: in function `Stockfish::Value Stockfish::(anonymous namespace)::search<(Stockfish::(anonymous namespace)::NodeType)1>(Stockfish::Position&, Stockfish::Search::Stack*, Stockfish::Value, Stockfish::Value, int, bool) [clone .constprop.36]':
<artificial>:(.text+0x868c): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x8ee8): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x99a8): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x9b2c): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans0.ltrans.o: in function `Stockfish::ThreadPool::start_thinking(Stockfish::Position&, std::unique_ptr<std::deque<Stockfish::StateInfo, std::allocator<Stockfish::StateInfo> >, std::default_delete<std::deque<Stockfish::StateInfo, std::allocator<Stockfish::StateInfo> > > >&, Stockfish::Search::LimitsType const&, bool) [clone .constprop.51]':
<artificial>:(.text+0xa1ec): undefined reference to `__atomic_store_8'
/usr/bin/ld: <artificial>:(.text+0xa204): undefined reference to `__atomic_store_8'
/usr/bin/ld: <artificial>:(.text+0xa218): undefined reference to `__atomic_store_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans4.ltrans.o: in function `Stockfish::dbg_print()':
<artificial>:(.text+0x4014): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x4028): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x405c): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x4094): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x40cc): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans4.ltrans.o:<artificial>:(.text+0x40e0): more undefined references to `__atomic_load_8' follow
/usr/bin/ld: /tmp/ccJrt67Q.ltrans1.ltrans.o: in function `Stockfish::Value Stockfish::(anonymous namespace)::search<(Stockfish::(anonymous namespace)::NodeType)2>(Stockfish::Position&, Stockfish::Search::Stack*, Stockfish::Value, Stockfish::Value, int, bool) [clone .constprop.33]':
<artificial>:(.text+0x10afc): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: <artificial>:(.text+0x10ba4): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x111f8): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans2.ltrans.o: in function `Stockfish::UCI::loop(int, char**)':
<artificial>:(.text+0x4a28): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans2.ltrans.o: in function `Stockfish::MainThread::check_time() [clone .part.82]':
<artificial>:(.text+0x61e8): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x62f4): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans2.ltrans.o:<artificial>:(.text+0x6f98): more undefined references to `__atomic_load_8' follow
/usr/bin/ld: /tmp/ccJrt67Q.ltrans2.ltrans.o: in function `Stockfish::Value Stockfish::(anonymous namespace)::search<(Stockfish::(anonymous namespace)::NodeType)0>(Stockfish::Position&, Stockfish::Search::Stack*, Stockfish::Value, Stockfish::Value, int, bool) [clone .lto_priv.273]':
<artificial>:(.text+0x8c78): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans3.ltrans.o: in function `Stockfish::UCI::pv[abi:cxx11](Stockfish::Position const&, int, Stockfish::Value, Stockfish::Value)':
<artificial>:(.text+0x434): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x4e0): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0x52c): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans3.ltrans.o: in function `Stockfish::Position::do_move(Stockfish::Move, Stockfish::StateInfo&, bool)':
<artificial>:(.text+0x3ce0): undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans3.ltrans.o: in function `Stockfish::Thread::search()':
<artificial>:(.text+0xd1e4): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0xd444): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0xe61c): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0xe640): undefined reference to `__atomic_store_8'
/usr/bin/ld: <artificial>:(.text+0xe724): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0xe8ec): undefined reference to `__atomic_load_8'
/usr/bin/ld: /tmp/ccJrt67Q.ltrans3.ltrans.o: in function `Stockfish::MainThread::search()':
<artificial>:(.text+0xef90): undefined reference to `__atomic_load_8'
/usr/bin/ld: <artificial>:(.text+0xf35c): undefined reference to `__atomic_store_8'
/usr/bin/ld: <artificial>:(.text+0xf398): undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:871: stockfish] Error 1
make[1]: Leaving directory '/home/pi/Stockfish-sf_14/src'
make: *** [Makefile:741: build] Error 2

 

 

managed to compile with LDFLAGS="- latomic" flag, but all versions: armv7, armv7+optimize=yes, general-32, general-32+optimize=yes
have approximately the same performance Nodes / second: 15447, but in another article projects, I saw that on Raspberry Pi Z you can pull out such performance: Nodes / second: 40348
do not tell me what needs to be done for this?

Link to post
Share on other sites

4 hours ago, Navistar said:

 

managed to compile with LDFLAGS="- latomic" flag, but all versions: armv7, armv7+optimize=yes, general-32, general-32+optimize=yes
have approximately the same performance Nodes / second: 15447, but in another article projects, I saw that on Raspberry Pi Z you can pull out such performance: Nodes / second: 40348
do not tell me what needs to be done for this?

 

I tried to build Stockfish 10 version and get Nodes/second: 36216 on Raspberry Pi OS Lite 2021, and Nodes/second: 39308 on Raspberry Pi OS Lite 2018..

why 13 and 14 versions give such slow performance? this is normal?

Link to post
Share on other sites

12 hours ago, Navistar said:

 

managed to compile with LDFLAGS="- latomic" flag, but all versions: armv7, armv7+optimize=yes, general-32, general-32+optimize=yes
have approximately the same performance Nodes / second: 15447, but in another article projects, I saw that on Raspberry Pi Z you can pull out such performance: Nodes / second: 40348
do not tell me what needs to be done for this?

I did also a compile on my RPI Zero.

While getting first the -m32 bit error (which you deleted the lines for) I did a look at the error-message
which suggested "-mbe32"

But "-mbe32" is for older than ARMv6, but https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html 
told me to use "-mbe8" for ARMv6 and later.

 

So I ended up with this Makefile-Part:
 

ifeq ($(COMP),gcc)
        comp=gcc
        CXX=g++
        CXXFLAGS += -pedantic -Wextra -Wshadow

        ifeq ($(arch),$(filter $(arch),armv7 armv8))
                ifeq ($(OS),Android)
                        CXXFLAGS += -m$(bits)
                        LDFLAGS += -m$(bits)
                endif
        else
                CXXFLAGS += -mbe8
                LDFLAGS += -mbe8 -latomic
        endif

        ifeq ($(arch),$(filter $(arch),armv7))
                LDFLAGS += -latomic
        endif

        ifneq ($(KERNEL),Darwin)
           LDFLAGS += -Wl,--no-as-needed
        endif
endif

 

and then it compiled with not much compile-output:

Spoiler

make build ARCH=general-32 optimize=yes
Default net: nn-3475407dc199.nnue
Already available.

Config:
debug: 'no'
sanitize: 'none'
optimize: 'yes'
arch: 'any'
bits: '32'
kernel: 'Linux'
os: 'GNU/Linux'
prefetch: 'no'
popcnt: 'no'
pext: 'no'
sse: 'no'
mmx: 'no'
sse2: 'no'
ssse3: 'no'
sse41: 'no'
avx2: 'no'
avx512: 'no'
vnni256: 'no'
vnni512: 'no'
neon: 'no'

Flags:
CXX: g++
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -mbe8 -DUSE_PTHREADS -DNDEBUG -O3 -DNO_PREFETCH -flto
LDFLAGS:  -mbe8 -latomic -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -mbe8 -DUSE_PTHREADS -DNDEBUG -O3 -DNO_PREFETCH -flto -flto=jobserver

Testing config sanity. If this fails, try 'make help' ...

make ARCH=general-32 COMP=gcc all
make[1]: Verzeichnis „/home/guido/Stockfish-sf_14/src“ wird betreten
g++ -o stockfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o thread.o timeman.o tt.o uci.o ucioption.o tune.o tbprobe.o evaluate_nnue.o half_ka_v2.o  -mbe8 -latomic -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -mbe8 -DUSE_PTHREADS -DNDEBUG -O3 -DNO_PREFETCH -flto -flto=jobserver
make[1]: Verzeichnis „/home/guido/Stockfish-sf_14/src“ wird verlassen

 

 

-rwxr-xr-x 1 root root 48113920 Jul  8 19:18 stockfish

 

But how do you get the results for the Speed/Nodes? Is there a test-option or do you use a UCI-capable Chess-Game? ;)

Link to post
Share on other sites

10 hours ago, guidol said:

I did also a compile on my RPI Zero.

While getting first the -m32 bit error (which you deleted the lines for) I did a look at the error-message
which suggested "-mbe32"

But "-mbe32" is for older than ARMv6, but https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html 
told me to use "-mbe8" for ARMv6 and later.

 

So I ended up with this Makefile-Part:
 

ifeq ($(COMP),gcc)
        comp=gcc
        CXX=g++
        CXXFLAGS += -pedantic -Wextra -Wshadow

        ifeq ($(arch),$(filter $(arch),armv7 armv8))
                ifeq ($(OS),Android)
                        CXXFLAGS += -m$(bits)
                        LDFLAGS += -m$(bits)
                endif
        else
                CXXFLAGS += -mbe8
                LDFLAGS += -mbe8 -latomic
        endif

        ifeq ($(arch),$(filter $(arch),armv7))
                LDFLAGS += -latomic
        endif

        ifneq ($(KERNEL),Darwin)
           LDFLAGS += -Wl,--no-as-needed
        endif
endif

 

and then it compiled with not much compile-output:

  Hide contents

make build ARCH=general-32 optimize=yes
Default net: nn-3475407dc199.nnue
Already available.

Config:
debug: 'no'
sanitize: 'none'
optimize: 'yes'
arch: 'any'
bits: '32'
kernel: 'Linux'
os: 'GNU/Linux'
prefetch: 'no'
popcnt: 'no'
pext: 'no'
sse: 'no'
mmx: 'no'
sse2: 'no'
ssse3: 'no'
sse41: 'no'
avx2: 'no'
avx512: 'no'
vnni256: 'no'
vnni512: 'no'
neon: 'no'

Flags:
CXX: g++
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -mbe8 -DUSE_PTHREADS -DNDEBUG -O3 -DNO_PREFETCH -flto
LDFLAGS:  -mbe8 -latomic -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -mbe8 -DUSE_PTHREADS -DNDEBUG -O3 -DNO_PREFETCH -flto -flto=jobserver

Testing config sanity. If this fails, try 'make help' ...

make ARCH=general-32 COMP=gcc all
make[1]: Verzeichnis „/home/guido/Stockfish-sf_14/src“ wird betreten
g++ -o stockfish benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o search.o thread.o timeman.o tt.o uci.o ucioption.o tune.o tbprobe.o evaluate_nnue.o half_ka_v2.o  -mbe8 -latomic -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17  -pedantic -Wextra -Wshadow -mbe8 -DUSE_PTHREADS -DNDEBUG -O3 -DNO_PREFETCH -flto -flto=jobserver
make[1]: Verzeichnis „/home/guido/Stockfish-sf_14/src“ wird verlassen

 

 

-rwxr-xr-x 1 root root 48113920 Jul  8 19:18 stockfish

 

But how do you get the results for the Speed/Nodes? Is there a test-option or do you use a UCI-capable Chess-Game? ;)

 

built-in option, just using `./stockfish bench`
the results for v10 looked here: https://github.com/slashbyte/ChessComputer/wiki/Software-Overview#stockfish-benchmark

 

builded v14 with `mbe8` did not become faster =)

Link to post
Share on other sites

8 hours ago, Navistar said:

 

builded v14 with `mbe8` did not become faster =)

 

also with the CPU-options

 

-march=armv6zk+fp
-mcpu=arm1176jzf-s
-mtune=arm1176jzf-s
-mfpu=vfp
-mfloat-abi=hard

 

or

-march=native
-mtune=native

 

Stockfish 14 isnt getting faster on the Pi Zero :-(

===========================
Total time (ms) : 307211
Nodes searched  : 4770936
Nodes/second    : 15529

 

I have no additional idea :(

Link to post
Share on other sites

For simple benchmark just run

 

stockfish bench

My Orange Pi Zero on Armbian is underclocked to 400MHz with maximum of 648MHz core speed

 

Results from Stockfish 9 64 bit:

===========================
Total time (ms) : 57264
Nodes searched  : 5023629
Nodes/second    : 87727
 

The Stockfish 9 results are from the Armbian repo, sudo apt install stockfish.

Faster than Pi Zero and drawing less than 200mA with underclocking

 

I've not compiled Stockfish 14 but would expect a higher nodes/second on a later verion

 

Link to post
Share on other sites

22 hours ago, hal8k said:

For simple benchmark just run

 

stockfish bench

My Orange Pi Zero on Armbian is underclocked to 400MHz with maximum of 648MHz core speed

 

Results from Stockfish 9 64 bit:

===========================
Total time (ms) : 57264
Nodes searched  : 5023629
Nodes/second    : 87727

My OPi Zero is running from 480Mhz to 960Mhz and has a Speed from around 115.000-121000 Nodes/second with Stockfish v9 32bit
(installed via apt)

 

BUT Stockfish v14 compiled on the same OPi Zero with ARCH=general-32 does only have 28294 Nodes/second :(

 

[EDIT]

Now I compiled Stockfish v14 on the OPi Zero with 

make -j build ARCH=armv7-neon COMP=gcc COMPCXX=g++-8 optimize=yes

and

                CXXFLAGS += -march=native -mtune=native
                LDFLAGS += -m$(bits)

in the Makefile 

so I do get

===========================
Total time (ms) : 84729
Nodes searched  : 4770936
Nodes/second    : 56308
 

But thats also not 115.000-120.000 as in Stockfish v9 :(


 

Link to post
Share on other sites

Hi Guidol,

Apologies for a late reply.

First, my mistake H2+ is a 32bit instruction set , the "stockfish 9 64" is the name of the engine in xboard.

I just ran another benchmark on my OPi Zero and got similar results:

Total time (ms) : 57136
Nodes searched  : 5023629
Nodes/second    : 87924

 

I then checked results on my laptop running linux Mint 19.3LTS.

I have both stockfish 8  and stockfish 13 installed on the laptop.

A similar benchmark results:

Stockfish 8

Total time (ms) : 6211
Nodes searched  : 5926706
Nodes/second    : 954227

 

Stockfish 13

Total time (ms) : 6935
Nodes searched  : 3766422
Nodes/second    : 543103

 

Which indeed gives an apparent poorer benchmark ??

However dont pay too much attention to the benchmark.

You can try this on your Orange Pi

Install the armbian build of Stockfish 9, then load xboard.

 

Set the time limit to 1 minute, then load first engine as stockfish14 and second

engine as stockfish 9.  Make sure there is a tick so they dont use the opening book.

Set mode to two machines then new game.

 

After two blitz  games of 1 minute, stockfish 13 beat stockfish 8 in 64 moves and

second game in 72 moves, even though higher nodes/sec were displayed by

stockfish 8.

 

I then set the time limit to 2 minutes and played engines against each other, this time

it was a draw after 96 moves by 3fold  repetition.

 

I would say that stockfish14 will beat the earlier versions, I've not had chance to increase time

limit to say 5 minutes but expect stockfish14 to be dominant.

 

 

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

3 3