Is there a MPI version cutechess-cli?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

nkg114mc
Posts: 74
Joined: Sat Dec 18, 2010 5:19 pm
Location: Tianjin, China
Full name: Chao M.

Is there a MPI version cutechess-cli?

Post by nkg114mc »

Hi all,

I just curious that, is there a MPI version cutechess-cli, so that a cutechess tournament can be run on the cluster system? I know that we can manually split the tournament into several parts and run them as independent jobs, but a MPI version may provide a better scalability in my opinion.

Another question is about opening-libs for testing. What opening lib do most of testers usually use? I see CCRL 40/4 use remis.ctg, draw.ctg, 5moves.ctg with 12 moves length limit, are them enough for a 5000+ games tournament?

Thanks!
nkg114mc
Posts: 74
Joined: Sat Dec 18, 2010 5:19 pm
Location: Tianjin, China
Full name: Chao M.

Re: Is there a MPI version cutechess-cli?

Post by nkg114mc »

Hi all,

It seems that there was not such a MPI version cutechess-cli. I wrote a simple program called "cute-mpi-interface", which just simply split a testing tournament into several parts and run cutechess-cli for them independently on different hosts. Here is the link of src: https://github.com/nkg114mc/cute-mpi-interface Hope it would be helpful for the testers who can use a cluster system.

Before I wrote this small tool, I found this piece of code in the post by Daniel Shawul in 2010: http://www.open-aurec.com/wbforum/viewt ... =2&t=50727 Thanks for Daniel's early work! It is very helpful :)

The usage of this tool is simple. Suppose you want to run a tournament by typing cmd "./cutechess-cli <cute-cmd>", then you can just type "mpiexec -np <N> -cuteexec ./cutechess-cli <cute-cmd>". The only extra option than cutechess is "-cuteexec", just to indicate the path of cutechess-cli binary file. All other options are for cutechess-cli.

An example script is included in the repository with a "FishCooking" opening "8moves_GM.pgn", and options for a three engines gauntlet tournament.

The current version is still not functional completed. For the opening, it only supports pgn format. Also, the split staterge now is "only-split-rounds", because I assume that no. of rounds is usually much larger than no. of pairs for engine testers. For example, if a tournament will run 1000 rounds per pair for 6 pairs of engines (6000 games in total), and now you want to run it on 100 hosts, this tool will split it into 100 small tournaments: each tournament contains 10 rounds per pair and 6 pairs (so 60 games for each small tournament). The opening pgn will also be splitted into 100 different segments to avoid repeated games.

Please email me if you see any bugs.
Adam Hair
Posts: 3226
Joined: Wed May 06, 2009 10:31 pm
Location: Fuquay-Varina, North Carolina

Re: Is there a MPI version cutechess-cli?

Post by Adam Hair »

Hi Chao,

The 8moves_GM pgn file contains ~49,000 openings, which should suffice for you in most situations. If you ever need a larger pgn of opening positions, just send me a pm or email.

Good luck with Cmcchess,
Adam
nkg114mc
Posts: 74
Joined: Sat Dec 18, 2010 5:19 pm
Location: Tianjin, China
Full name: Chao M.

Re: Is there a MPI version cutechess-cli?

Post by nkg114mc »

Thanks a lot for the suggesstion, Mr. Hair! Yes, 8moves_GM.pgn is already enough for me. When I started this post, I did not know about it until I saw Gary's reply in Steve's post.

Also thank you for your wishes to cmcchess~!
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Is there a MPI version cutechess-cli?

Post by Daniel Shawul »

Before I wrote this small tool, I found this piece of code in the post by Daniel Shawul in 2010: http://www.open-aurec.com/wbforum/viewt ... =2&t=50727 Thanks for Daniel's early work! It is very helpful Smile
I am glad you found it useful. I still use that archaic code with some modifications for better scripting, and calling bayeselo every now and then to check progress. Maybe you can also add auto-tuner, sprt and other stuff, but I am sure stockfish dudes already took care of that king of stuff pretty well.
User avatar
hgm
Posts: 27795
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Is there a MPI version cutechess-cli?

Post by hgm »

For running tourneys distributed over several machines, XBoard / WinBoard would be an obvious choice. When the machines have a shared file system, you can locate the tourney file there, (as well as the engines), and start as many instances of WinBoard on each machine as the number of available cores allows, each working on the same tourney file through the network. (I heard rumors that on some OS protection against simultaneous writing by locking a file might not work if you access it over a network, in which case this would not be completely safe.)

In this mode of operation the use of a cluster would be highly transparent, and running a tourney would work almost exactly the same as when you use concurrency with WinBoard on a single machine.

An alternative way is to run all WinBoard instances on the same machine, (where you would also locate the tourney file), but use the -firstHost / -secondHost options to let them run engines on other machines. This requires you to configure all other machines as servers for running Chess engines. Which on Linux is sort of automatic if you have installed an ssh server there. For WinBoard there seems to be dedicated software for running an engine remotely.