Here's how CuteChess tries to terminate an engine:Ozymandias wrote: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: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.
- 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.
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