Is there a MPI version cutechess-cli?

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
nkg114mc
Posts: 63
Joined: Sat Dec 18, 2010 4:19 pm
Location: Tianjin, China

Re: Is there a MPI version cutechess-cli?

Post by nkg114mc » Tue Sep 03, 2013 10:50 pm

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: 3201
Joined: Wed May 06, 2009 8:31 pm
Location: Fuquay-Varina, North Carolina

Re: Is there a MPI version cutechess-cli?

Post by Adam Hair » Tue Sep 03, 2013 11:22 pm

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: 63
Joined: Sat Dec 18, 2010 4:19 pm
Location: Tianjin, China

Re: Is there a MPI version cutechess-cli?

Post by nkg114mc » Wed Sep 04, 2013 12:39 am

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: 3749
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: Is there a MPI version cutechess-cli?

Post by Daniel Shawul » Wed Sep 04, 2013 1:23 am

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: 23630
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Is there a MPI version cutechess-cli?

Post by hgm » Wed Sep 04, 2013 8:48 am

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.

Post Reply