Chess Engine Compiler Script for Android

Moderators: Elijah, Igbo, timetraveller

DmitriyFrosty
I've been banned!
Points: 6 000,00 
Posts: 47
Joined: 23/03/2023, 16:16
Status: Offline (Active 1 Year, 2 Weeks, 3 Days, 9 Hours, 42 Minutes ago)
Topics: 7
Reputation: 20
1
Location: Android Lover & Supporter
Has thanked: 9 times
Been thanked: 75 times

Re: Chess Engine Compiler Script for Android

Post by DmitriyFrosty »

That was joke.
Archimedes

Android Engines Top Active Users
Forum Contributions
Points: 42 582,00 
Posts: 2059
Joined: 04/11/2019, 21:13
Status: Offline (Active 4 Hours, 24 Minutes ago)
Medals: 2
Topics: 158
Reputation: 7111
Been thanked: 6477 times

Re: Chess Engine Compiler Script for Android

Post by Archimedes »

CECSA 2023.04.02:
https://sourceforge.net/projects/chess-tools-for-android/files/cecsa_2023.04.02.tar.gz/download

Removed the parameter -mcpu=native and replaced it with -march=native (GCC) and -march=armv8-a (Clang).
Archimedes

Android Engines Top Active Users
Forum Contributions
Points: 42 582,00 
Posts: 2059
Joined: 04/11/2019, 21:13
Status: Offline (Active 4 Hours, 24 Minutes ago)
Medals: 2
Topics: 158
Reputation: 7111
Been thanked: 6477 times

Re: Chess Engine Compiler Script for Android

Post by Archimedes »

CECSA 2023.04.11:
https://sourceforge.net/projects/chess-tools-for-android/files/cecsa_2023.04.11.tar.gz/download

Due to Termux updates I had to make changes in the makefiles of BrainLearn and ShashChess.
Archimedes

Android Engines Top Active Users
Forum Contributions
Points: 42 582,00 
Posts: 2059
Joined: 04/11/2019, 21:13
Status: Offline (Active 4 Hours, 24 Minutes ago)
Medals: 2
Topics: 158
Reputation: 7111
Been thanked: 6477 times

Re: Chess Engine Compiler Script for Android

Post by Archimedes »

Archimedes

Android Engines Top Active Users
Forum Contributions
Points: 42 582,00 
Posts: 2059
Joined: 04/11/2019, 21:13
Status: Offline (Active 4 Hours, 24 Minutes ago)
Medals: 2
Topics: 158
Reputation: 7111
Been thanked: 6477 times

Re: Chess Engine Compiler Script for Android

Post by Archimedes »

CECSA 2023.04.26:
https://sourceforge.net/projects/chess-tools-for-android/files/cecsa_2023.04.26.tar.gz/download

Polyfish has changed its directory structure.
LittleJoe

Top contribute Forum Engines Maker
Forum Contributions
Points: 14 078,00 
Posts: 327
Joined: 17/10/2020, 22:28
Status: Offline (Active 1 Day, 12 Hours, 56 Minutes ago)
Medals: 2
Topics: 5
Reputation: 506
Has thanked: 349 times
Been thanked: 671 times

Chess Engine Compiler Script for Android

Post by LittleJoe »

GCC v11.1.0 ("community version") is (since the installation of clang v17.0.5 I guess) no more working. I assume that the former fix "setup-patchforgcc" which wasn't updated for some time is the reason for the problem.
Could someone please confirm this issue?
And second, does someone even has a solution for it?
Archimedes

Android Engines Top Active Users
Forum Contributions
Points: 42 582,00 
Posts: 2059
Joined: 04/11/2019, 21:13
Status: Offline (Active 4 Hours, 24 Minutes ago)
Medals: 2
Topics: 158
Reputation: 7111
Been thanked: 6477 times

Chess Engine Compiler Script for Android

Post by Archimedes »

After installing the community version, you always have to enter

Code: Select all

setupgcc-11
setup-patchforgcc
Most likely Clang has changed the symbolic links for the GCC compiler (but I'm not sure in your case). Maybe you need

Code: Select all

setupgcc-11
to get back on the path of virtue.
LittleJoe

Top contribute Forum Engines Maker
Forum Contributions
Points: 14 078,00 
Posts: 327
Joined: 17/10/2020, 22:28
Status: Offline (Active 1 Day, 12 Hours, 56 Minutes ago)
Medals: 2
Topics: 5
Reputation: 506
Has thanked: 349 times
Been thanked: 671 times

Chess Engine Compiler Script for Android

Post by LittleJoe »

Archimedes wrote: 18/11/2023, 8:08 After installing the community version, you always have to enter

Code: Select all

setupgcc-11
setup-patchforgcc
Most likely Clang has changed the symbolic links for the GCC compiler (but I'm not sure in your case). Maybe you need

Code: Select all

setupgcc-11
to get back on the path of virtue.
I have used "setupgcc-11" more than one time yesterday... I have even reinstalled everything, nothing helps.
So you have installed newest clang v17.0.5 and gcc-11 and you CAN'T confirm that gcc-11 is not working?
To know, if it is only my or a general issue, would be very useful for me!

Edit: With 'not working' I mean gcc-11 is now producing during compilation hundreds of errors. And one or two weeks ago it was working just fine. And these errors now also appear when compiling with CECSA and gcc-11 (with clang it's OK).
Archimedes

Android Engines Top Active Users
Forum Contributions
Points: 42 582,00 
Posts: 2059
Joined: 04/11/2019, 21:13
Status: Offline (Active 4 Hours, 24 Minutes ago)
Medals: 2
Topics: 158
Reputation: 7111
Been thanked: 6477 times

Chess Engine Compiler Script for Android

Post by Archimedes »

I am still using the GCC version of CCTools here and there are no problems with the latest version of Clang. I'm afraid I can't help you much further. I'm not involved in the system enough. smile14 If uninstalling and then reinstalling the GCC compiler has not helped, the only option is to completely reinstall the environment in Termux. It is no longer difficult. Or have you already done that?
LittleJoe

Top contribute Forum Engines Maker
Forum Contributions
Points: 14 078,00 
Posts: 327
Joined: 17/10/2020, 22:28
Status: Offline (Active 1 Day, 12 Hours, 56 Minutes ago)
Medals: 2
Topics: 5
Reputation: 506
Has thanked: 349 times
Been thanked: 671 times

Chess Engine Compiler Script for Android

Post by LittleJoe »

Archimedes wrote: 18/11/2023, 16:48 If uninstalling and then reinstalling the GCC compiler has not helped, the only option is to completely reinstall the environment in Termux. It is no longer difficult. Or have you already done that?
Yes, I have already uninstalled both gcc compilers and the Termux app the day before yesterday and reinstalled gcc-11 using the cecsa script. I even did this procedure twice (changing from all-yes- to all-default-answers). Exactly the same errors during compiling with gcc-11 (all errors have their origin in .h-files of ../files/usr/include). With my third try I will wait now for several days, maybe the guys who made the community version will also fix the problem.
In the meantime, if anyone else of the thousands guests and members of this forum has experience with Termux and installed clang 17.0.5 and gcc-11 please let me know smile218.
By the way, Stockfish compiled with gcc-11 is about 1% faster than compiled with gcc-10.
LittleJoe

Top contribute Forum Engines Maker
Forum Contributions
Points: 14 078,00 
Posts: 327
Joined: 17/10/2020, 22:28
Status: Offline (Active 1 Day, 12 Hours, 56 Minutes ago)
Medals: 2
Topics: 5
Reputation: 506
Has thanked: 349 times
Been thanked: 671 times

Chess Engine Compiler Script for Android

Post by LittleJoe »

I made some new speedup measurements with StockfishMX231021 which was either compiled with gcc-10 or gcc-11 but identical source code:

Code: Select all

...
 30  172892  175938  +3046
 31  171344  174104  +2760
 32  173381  175568  +2187
 33  173299  176072  +2773
 34  173430  176529  +3099
 35  173479  176072  +2593
 36  170882  173349  +2467
 37  170898  173725  +2827
 38  172244  174833  +2589
 39  171713  174766  +3053
 40  170233  173316  +3083

base =     167399 +/- 6072
test =     169904 +/- 6223
diff =       2505 +/- 343
SchnellerInProzent = 1.496512
~/.../SFMX231021/src $ ./BP7_2cores.sh ./SFMX231021gcc10 ./SFMX231021gcc11 40 13 depth nnue


...
 30  176483  176679  +196
 31  172466  178864  +6398
 32  160140  163598  +3458
 33  175413  179469  +4056
 34  173689  175413  +1724
 35  160221  163514  +3293
 36  175995  178764  +2769
 37  176974  173974  -3000
 38  176777  177072  +295
 39  161933  171259  +9326
 40  166075  181001  +14926

base =     170740 +/- 2005
test =     174421 +/- 1768
diff =       3681 +/- 1484
SchnellerInProzent = 2.156085
~/.../SFMX231021/src $ ./BP7_2cores.sh ./SFMX231021gcc10 ./ SFMX231021gcc10 40 10 depth nnue


...
 30  168770  164885  -3885
 31  161985  170106  +8121
 32  165591  167891  +2300
 33  164465  169807  +5342
 34  152773  144444  -8329
 35  146301  149352  +3051
 36  164325  166877  +2552
 37  164325  166877  +2552
 38  155725  167310  +11585
 39  164885  167310  +2425
 40  145203  147754  +2551

base =     161081 +/- 2438
test =     162667 +/- 2193
diff =       1585 +/- 1561
SchnellerInProzent = 0.984173

~/.../SFMX231021/src $ ./BP7_2cores.sh ./SFMX231021gcc10 ./SFMX231021gcc10 40 9 depth nnue
So the speed difference of the builds made with the two compilers gcc-10 and gcc-11 is a bit larger than the above given value and is somewhere around 1.5%. Note that the precision of speedup measurements on most Android devices is limit mainly because of throttling (i.e. varying clock frequencies).
Archimedes

Android Engines Top Active Users
Forum Contributions
Points: 42 582,00 
Posts: 2059
Joined: 04/11/2019, 21:13
Status: Offline (Active 4 Hours, 24 Minutes ago)
Medals: 2
Topics: 158
Reputation: 7111
Been thanked: 6477 times

Chess Engine Compiler Script for Android

Post by Archimedes »

LittleJoe wrote: 19/11/2023, 17:51 So the speed difference of the builds made with the two compilers gcc-10 and gcc-11 is a bit larger than the above given value and is somewhere around 1.5%.
The result with GCC 11 is probably about as fast as with the current Clang compiler.
LittleJoe

Top contribute Forum Engines Maker
Forum Contributions
Points: 14 078,00 
Posts: 327
Joined: 17/10/2020, 22:28
Status: Offline (Active 1 Day, 12 Hours, 56 Minutes ago)
Medals: 2
Topics: 5
Reputation: 506
Has thanked: 349 times
Been thanked: 671 times

Chess Engine Compiler Script for Android

Post by LittleJoe »

Archimedes wrote: 19/11/2023, 18:24
LittleJoe wrote: 19/11/2023, 17:51 So the speed difference of the builds made with the two compilers gcc-10 and gcc-11 is a bit larger than the above given value and is somewhere around 1.5%.
The result with GCC 11 is probably about as fast as with the current Clang compiler.
Maybe for Stockfishes with the recent SFNNv8 nets they have about the same speed but (I guess that gcc-11 is still a bit better than clang-17 ) I didn't measure them recently, since they are all just too weak on Android for the much faster SFMXnps with the smaller SFNNv5 net. And for this engine gcc is still a clearly better compiler than clang. One (but not the only) reason is that the neon patch from AndrovT works for clang but decreases(!) the speed of SFM/X/nps when using gcc-10 or gcc-11 as compiler (thus the patch isn't applied). You can find all the details in the release section of StockfishNPS. Just google lol
Archimedes

Android Engines Top Active Users
Forum Contributions
Points: 42 582,00 
Posts: 2059
Joined: 04/11/2019, 21:13
Status: Offline (Active 4 Hours, 24 Minutes ago)
Medals: 2
Topics: 158
Reputation: 7111
Been thanked: 6477 times

Chess Engine Compiler Script for Android

Post by Archimedes »

CECSA 2024.01.08:
https://sourceforge.net/projects/chess-tools-for-android/files/cecsa_2024.01.08.tar.gz/download

Added support for dual nets to Stockfish based chess engines.
superbatil
Forum Contributions
Points: 14 010,00 
Posts: 76
Joined: 24/02/2022, 11:23
Status: Offline (Active 1 Week, 2 Days, 15 Hours, 8 Minutes ago)
Topics: 0
Reputation: 17
Has thanked: 1 time
Been thanked: 51 times

Termux Issue

Post by superbatil »

In Termux other tools such as clang (version 16.0) cannot be updated and upgraded (pkg update && pkg upgrade). Tried if (pkg install clang) succeeded (clang-17.0), but (clang-16.0) is still in .../usr/bin/.
How to fully remove the clang version 16.0?
Post Reply

Return to “Mobile Chess Software, Engines”