Why is glaurung 2.2 losing on time on Linux 64

Discussion of chess software programming and technical issues.

Moderators: Harvey Williamson, Dann Corbit, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
OliverBr
Posts: 655
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Why is glaurung 2.2 losing on time on Linux 64

Post by OliverBr » Sun Aug 30, 2020 4:57 pm

I am using cutechess-cli and the same parameter as with other engines. No other engine loses on time, glaurung very often.
Even worse: When it is not losing on time, it's getting mated :/

I am using the 64bit version of:
https://github.com/phenri/glaurung/tree ... 6/LinuxX86

Perhaps the executable is corrupt?! Then it's defect since 11 years without anybody else caringö
Where can I get another Linux64 executables of Glaurung. Perhaps Version 2.1? I couldn't find anything.

Startscript:

Code: Select all

./cutechess-cli  \
-engine cmd=olithink569 proto=xboard \
-engine cmd=glaurung proto=uci \
-each tc=40/40 dir=bin \
-games 2 -rounds 1000 -concurrency 32 \
-openings file=openings/book_3moves_cp25-49_13580pos.pgn -repeat \
-pgnout tourn.pgn min
Printout of cutechess-cli:

Code: Select all

Finished game 8 (Glaurung 2.2 vs OliThink 5.6.9): 0-1 {Black mates}
Score of OliThink 5.6.9 vs Glaurung 2.2: 4 - 0 - 0  [1.000] 4
Started game 36 of 2000 (Glaurung 2.2 vs OliThink 5.6.9)
Finished game 15 (OliThink 5.6.9 vs Glaurung 2.2): 1-0 {White mates}
Score of OliThink 5.6.9 vs Glaurung 2.2: 5 - 0 - 0  [1.000] 5
Started game 37 of 2000 (OliThink 5.6.9 vs Glaurung 2.2)
Finished game 5 (OliThink 5.6.9 vs Glaurung 2.2): 1-0 {Black loses on time}
Score of OliThink 5.6.9 vs Glaurung 2.2: 6 - 0 - 0  [1.000] 6
Started game 38 of 2000 (Glaurung 2.2 vs OliThink 5.6.9)
Finished game 16 (Glaurung 2.2 vs OliThink 5.6.9): 0-1 {White loses on time}
Score of OliThink 5.6.9 vs Glaurung 2.2: 7 - 0 - 0  [1.000] 7
Started game 39 of 2000 (OliThink 5.6.9 vs Glaurung 2.2)
Finished game 17 (OliThink 5.6.9 vs Glaurung 2.2): 1-0 {Black loses on time}
Score of OliThink 5.6.9 vs Glaurung 2.2: 8 - 0 - 0  [1.000] 8
Started game 40 of 2000 (Glaurung 2.2 vs OliThink 5.6.9)
Finished game 18 (Glaurung 2.2 vs OliThink 5.6.9): 0-1 {White loses on time}
Score of OliThink 5.6.9 vs Glaurung 2.2: 9 - 0 - 0  [1.000] 9
Started game 41 of 2000 (OliThink 5.6.9 vs Glaurung 2.2)
Finished game 1 (OliThink 5.6.9 vs Glaurung 2.2): 1-0 {Black loses on time}
Score of OliThink 5.6.9 vs Glaurung 2.2: 10 - 0 - 0  [1.000] 10
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

User avatar
Roland Chastain
Posts: 443
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Why is glaurung 2.2 losing on time on Linux 64

Post by Roland Chastain » Sun Aug 30, 2020 5:58 pm

Hello! Have you tried the 32 bit version? Maybe the program was not written for 64 bit. I don't know, it's just an idea.
Qui trop embrasse mal étreint.

User avatar
Roland Chastain
Posts: 443
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Why is glaurung 2.2 losing on time on Linux 64

Post by Roland Chastain » Sun Aug 30, 2020 6:32 pm

By the way, on your website there is a typo in the link to OliThink 5.6.9 source code.
Qui trop embrasse mal étreint.

OliverBr
Posts: 655
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Re: Why is glaurung 2.2 losing on time on Linux 64

Post by OliverBr » Sun Aug 30, 2020 7:29 pm

Roland Chastain wrote:
Sun Aug 30, 2020 5:58 pm
Hello! Have you tried the 32 bit version? Maybe the program was not written for 64 bit. I don't know, it's just an idea.
Hi, yes, same problem. Some got my attention When I was running glaurung 2.1 on mac with xboard it used 4 threads, on linux with cutechess-cli it just gets one. Perhaps this has something to do with it?
By the way, on your website there is a typo in the link to OliThink 5.6.9 source code.
Thank you very much. Corrected.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

User avatar
Roland Chastain
Posts: 443
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Why is glaurung 2.2 losing on time on Linux 64

Post by Roland Chastain » Sun Aug 30, 2020 8:12 pm

OliverBr wrote:
Sun Aug 30, 2020 7:29 pm
When I was running glaurung 2.1 on mac with xboard it used 4 threads, on linux with cutechess-cli it just gets one. Perhaps this has something to do with it?
Perhaps.

I have just made a little test, and I didn't see Glaurung losing on time. I didn't use the option -concurrency 32. (And I am on Linux 64 too.)

Code: Select all

/home/roland/Applications/cutechess-cli/cutechess-cli \
-rounds 2 \
-engine conf="OliThink 5.6.9" \
-engine conf="Glaurung 2.2 32-bit" \
-engine conf="Glaurung 2.2 64-bit" \
-pgnout tournoi.pgn \
-each tc=40/40 \
-openings file=./gaviota-starters.pgn -repeat \
-wait 500 2>> error.log | tee tournoi.log

Code: Select all

Rank Name                  Elo    +    - games score oppo. draws 
   1 Glaurung 2.2 64-bit   142  109   91    16   84%   -71   31% 
   2 Glaurung 2.2 32-bit     1   93   94    16   47%     0   31% 
   3 OliThink 5.6.9       -143   97  119    16   19%    71   13% 
I have checked that my binaries are the same than those which are on the GitHub repository.

P.-S. Here is what I read in Readme.txt:
The default settings are optimized for 64-bit CPUs.
Qui trop embrasse mal étreint.

OliverBr
Posts: 655
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Re: Why is glaurung 2.2 losing on time on Linux 64

Post by OliverBr » Sun Aug 30, 2020 9:09 pm

Roland Chastain wrote:
Sun Aug 30, 2020 8:12 pm
OliverBr wrote:
Sun Aug 30, 2020 7:29 pm
When I was running glaurung 2.1 on mac with xboard it used 4 threads, on linux with cutechess-cli it just gets one. Perhaps this has something to do with it?
Perhaps.

I have just made a little test, and I didn't see Glaurung losing on time. I didn't use the option -concurrency 32. (And I am on Linux 64 too.)
Of course! Removing the concurrency option Glaurung plays its best and doesn't lose on time. I have just checked it myself.

But: I am testing on a 32 core machine, so I play 32 concurrent games and every other engine doesn't have a problem with that. Including Stockfish, of course.

What can I do now?
P.-S. Here is what I read in Readme.txt:
The default settings are optimized for 64-bit CPUs.
I guess, AMD EPYC 7502P 32-Core Processor is a 64-bit CPU?!

EDIT: Glaurung actually does need 4 CPUs and 8 Threads for itself (see CPU%).
So anything over concurrency = 8 on a 32-core machine causes issues and it loses.

Code: Select all

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
17250 ch        20   0  122888  62548   3680 R 565.9   0.0   9:44.74 glaurung                                                                                                                                                       
17232 ch        20   0  122916  72876   3780 S 425.8   0.1   9:43.12 glaurung                                                                                                                                                       
17242 ch        20   0  122904  62600   3732 R 392.7   0.0   9:46.43 glaurung                                                                                                                                                       
17248 ch        20   0  122892  74876   3720 R 365.6   0.1  10:03.80 glaurung                                                                                                                                                       
17244 ch        20   0  122896  62644   3780 S 283.1   0.0   9:51.83 glaurung                                                                                                                                                       
17230 ch        20   0  122888  62568   3700 R 278.1   0.0   9:47.60 glaurung                                                                                                                                                       
17236 ch        20   0  122888  62568   3700 R 148.7   0.0   9:46.71 glaurung                                                                                                                                                       
17239 ch        20   0  135364 133052   1372 S  88.4   0.1   1:29.36 olithink569                                                                                                                                                    
17238 ch        20   0  122892  62672   3808 R  78.8   0.0   9:54.04 glaurung                                                                                                                                                       
17235 ch        20   0  135364 132992   1308 S  71.9   0.1   1:29.49 olithink569                                                                                                                                                    
17229 ch        20   0  135364 132976   1292 S  59.3   0.1   1:30.63 olithink569                                                                                                                                                    
17245 ch        20   0  135364 132940   1256 R  58.9   0.1   1:29.97 olithink569                                                                                                                                                    
17247 ch        20   0  135364 132940   1256 S  46.4   0.1   1:28.23 olithink569                                                                                                                                                    
17241 ch        20   0  135364 132976   1292 S  43.0   0.1   1:31.04 olithink569                                                                                                                                                    
17233 ch        20   0  135364 132940   1256 R  36.8   0.1   1:31.41 olithink569                    
This is a little unlucky. Is there an option in order to use just one core?
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

jdart
Posts: 4038
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: Why is glaurung 2.2 losing on time on Linux 64

Post by jdart » Sun Aug 30, 2020 9:26 pm

Have you tried -option.Threads=1 on the cutechess-cli command line?

OliverBr
Posts: 655
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Re: Why is glaurung 2.2 losing on time on Linux 64

Post by OliverBr » Tue Sep 01, 2020 8:19 pm

jdart wrote:
Sun Aug 30, 2020 9:26 pm
Have you tried -option.Threads=1 on the cutechess-cli command line?
Thank you. With "option.Threads=1" is works!
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink

Post Reply