cutechess-cli 0.7.2

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

Moderators: hgm, Rebel, chrisw

User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cutechess-cli 0.7.2 - 24sept2015

Post by ilari »

Ozymandias wrote:
Ferdy wrote:2. (windows) Make sure engines are killed along with CuteChess.
Now even with Control+break (was only control+C) keys to interrupt the running tour, engines are exited/quited/killed along with cutechess.
Will it also completely terminate processes still hogging memory? I'm using 0.7.1 and the only tournament that really works is "match". As soon as you have 3 or more engines, both gauntlet and round-robin will ignore the "restart" parameter; no matter what option you specify, engines will be restarted, and the "terminated" processes will still be using memory:

- a few dozens will still be requiring the full 100% they peaked at (Working set as reported by Resource Monitor)
- the rest will occupy a modicum of 20K, which amounts to quite a bit when they number in the thousands (RAMMap)

In the end, you run out of memory and the tournament is exited abruptly.
Here's how CuteChess tries to terminate an engine:

1. Send the "quit" command
2. If the engine is not terminated after 2 seconds, terminate the engine violently (with TerminateProcess on Windows)

The 2-second limit may not be enough, and apparently TerminateProcess may leave any DLLs used by the engine in a compromised state: https://msdn.microsoft.com/en-us/librar ... s.85).aspx
I think the easiest solution would be to increase the quitting timeout.

The reason CuteChess restarts engines in Gauntlet and Round-Robin tournaments is exactly to limit memory consumption: a tournament can have 100 engines but only 2 playing at any given time, so the 98 engines waiting for their game would just be hogging memory.


BTW, I don't read these forums that often, so I won't notice most bug reports and feature requests posted here. Opening a new issue at Github is much more effective: https://github.com/cutechess/cutechess/issues
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cutechess-cli 0.7.2

Post by ilari »

Ferdy wrote:After some tests with version 0.7.3, I encountered this "has no side" warning. This is the first time I encountered it and actually stopped the whole match before it is finished.
Started game 332 of 1000 (Cheng_4.39_x64 vs D2015.1.252)
Finished game 330 (Hakkapeliitta 3.0 x64 vs D2015.1.252): 1-0 {White wins by adj
udication}
Finished game 331 (D2015.1.252 vs Cheng_4.39_x64): 1/2-1/2 {Draw by adjudication
}
Warning: Player HIARCS 14 WCSC has no side
Finished game 332 (Cheng_4.39_x64 vs D2015.1.252): 1/2-1/2 {Draw by insufficient
mating material}
Started game 335 of 1000 (D2015.1.252 vs Hannibal 1.1 64bit)
Warning: Player HIARCS 14 WCSC has no side
Finished game 335 (D2015.1.252 vs Hannibal 1.1 64bit): 1/2-1/2 {Draw by insuffic
ient mating material}
Started game 336 of 1000 (Hannibal 1.1 64bit vs D2015.1.252)
Finished game 336 (Hannibal 1.1 64bit vs D2015.1.252): 1/2-1/2 {Draw by insuffic
ient mating material}
Started game 337 of 1000 (D2015.1.252 vs Quazar_0.4_x64)
The "player has no side" error can (but shouldn't) happen when an engine forfeits. Maybe the engine process stalled, disconnected or did something illegal before a game was even started. I'd like to be able to reproduce this.
User avatar
Ozymandias
Posts: 1535
Joined: Sun Oct 25, 2009 2:30 am

Re: cutechess-cli 0.7.2 - 24sept2015

Post by Ozymandias »

ilari wrote:The reason CuteChess restarts engines in Gauntlet and Round-Robin tournaments is exactly to limit memory consumption: a tournament can have 100 engines but only 2 playing at any given time, so the 98 engines waiting for their game would just be hogging memory.
The default behavior may be correct, but if you're given an option to change said behavior (restart off), shouldn't it have the desired effect?
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: cutechess-cli 0.7.2 - 24sept2015

Post by ilari »

Ozymandias wrote:
ilari wrote:The reason CuteChess restarts engines in Gauntlet and Round-Robin tournaments is exactly to limit memory consumption: a tournament can have 100 engines but only 2 playing at any given time, so the 98 engines waiting for their game would just be hogging memory.
The default behavior may be correct, but if you're given an option to change said behavior (restart off), shouldn't it have the desired effect?
You're right. It should at least be documented properly.