I have run about 16,000 games at 40/30 with it on a cluster mostly using only 16 processors.
I only got 2 games missing one from Toga and another from Fruit ?? I don't know if that is the
problem of the engines or if these things happen on clusters.
I am using the pgn of games produced from cutechess-cli to send it to bayeselo. At first, I was
afraid the pgns might be big but it turns out they are really small with -min option. I wrote a small MPI code (just studied it
2 days ago) to manage pairings, match engines etc... If it helps anyone to get started, here is the code
- Code: Select all
#include "mpi.h"
#include <math.h>
static const char* const engines[] = {
"cmd=./scorpio dir=/home/dabdi/Work/scorpio",
"cmd=./scorpio dir=/home/dabdi/Work/scorpio_241",
"cmd=./scorpio dir=/home/dabdi/Work/scorpio_24",
"cmd=./crafty dir=/home/dabdi/Work/crafty-23.1",
"cmd=./fruit proto=uci dir=/home/dabdi/Work/fruit_21/src",
"cmd=./glaurung proto=uci option.Threads=1 dir=/home/dabdi/Work/glaurung22/src",
"cmd=./spike proto=uci dir=/home/dabdi/Work/Spike_12",
"cmd=./arasanx proto=uci dir=/home/dabdi/Work/arasan-11.6.0/export",
"cmd=./doch64-134-ja proto=uci dir=/home/dabdi/Work/Doch134/Gcc",
"cmd=./Toga proto=uci dir=/home/dabdi/Work/Toga",
"cmd=./Hermann proto=uci dir=/home/dabdi/Work/Hermann25",
NULL
};
typedef unsigned int JOB;
#define PORTION(x) ((x >> 16) & 0xffff)
#define SECOND(x) ((x >> 8) & 0xff)
#define FIRST(x) (x & 0xff)
int main(int argc, char* argv[] ) {
char str[512];
int myid,nprocs,namelen,master;
char processor_name[MPI_MAX_PROCESSOR_NAME];
MPI_Status status;
JOB job;
MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
MPI_Get_processor_name(processor_name, &namelen);
master = 0;
nprocs--;
//master
if(myid == master) {
int r,result,njobs,sent,N,NTOTAL;
const int rounds = 1;
//count number of engines
N = 0;
while(engines[N]) N++;
//round robin or gauntlet
JOB* jobs = new JOB[(N * (N - 1)) / 2];
njobs = 0;
for(int i = 0;i < rounds;i++) {
for(int j = i + 1;j < N;j++) {
njobs++;
}
}
NTOTAL = njobs;
//divide pgn
int divide = int(ceil(nprocs / (float)NTOTAL));
int dgames = 150 / divide,games = 0;
FILE* f = fopen("all.pgn","r");
FILE* f1 = 0;
char buffer[512];
strcpy(buffer,"");
while(fgets(buffer,512,f)) {
if(strncmp(buffer,"[Event ",7) == 0) {
if((games % dgames) == 0) {
if(f1) fclose(f1);
sprintf(str,"./divide/all%d.pgn",games / dgames);
f1 = fopen(str,"w");
}
games++;
}
fprintf(f1,"%s",buffer);
}
if(f1) fclose(f1);
fclose(f);
//assign jobs
njobs = 0;
for(int k = 0;k < divide;k++) {
for(int i = 0;i < rounds;i++) {
for(int j = i + 1;j < N;j++) {
jobs[njobs++] = ((k << 16) | (j << 8) | i);
}
}
}
NTOTAL = njobs;
//send slaves to work
sent = 0;
njobs = 0;
while(njobs < NTOTAL) {
sent++;
MPI_Send(&jobs[njobs++],1,MPI_INT,sent,njobs,MPI_COMM_WORLD);
if(sent >= nprocs) break;
}
while(sent) {
MPI_Recv(&r,1,MPI_INT,MPI_ANY_SOURCE,MPI_ANY_TAG,MPI_COMM_WORLD,&status);
if(njobs < NTOTAL) {
MPI_Send(&jobs[njobs++],1,MPI_INT,r,njobs,MPI_COMM_WORLD);
} else {
MPI_Send(MPI_BOTTOM,0,MPI_INT,r,0,MPI_COMM_WORLD);
sent--;
}
}
//delete
delete jobs;
}
//slave
else {
while(true) {
MPI_Recv(&job,1,MPI_INT,master,MPI_ANY_TAG,MPI_COMM_WORLD,&status);
if(status.MPI_TAG == 0) {
break;
} else {
sprintf(str,"./cutechess-cli.sh -pgnin ./divide/all%d.pgn -repeat -games 300 -both tc=40/30 -fcp %s -scp %s -pgnout test.pgn min",
PORTION(job),engines[FIRST(job)],engines[SECOND(job)]);
//printf("%s\n",str);
system(str);
MPI_Send(&myid,1,MPI_INT,master,status.MPI_TAG,MPI_COMM_WORLD);
}
}
}
MPI_Finalize();
return 0;
}
The good news is that i have now a working setup which can allow me to sit tight and press the button

Some random changes, which i thought will improve things, but actually hurt ! I do not have the intention to
nail the elos down to 1 point. +-10 standard error is good enough for me (about 3000 games).
- Code: Select all
Num. Name games score
0 Scorpio_2.4.4 299 133.5
1 Glaurung 2.2 635 465.5
2 Fruit 2.1 635 306
3 Scorpio_2.4.1 2740 1249
4 Toga II 1.3.1 616 413
5 Arasan 11.6 619 169.5
6 Hermann 2.5 618 182.5
7 Scorpio_2.4 2743 1254.5
8 Spike 1.2 Turin 635 332
9 Doch64 1.3.4 JA 620 494.5
10 Crafty-23.1 636 398
Rank Name Elo + - games score oppo. draws
1 Doch64 1.3.4 JA 208 26 25 620 80% -27 18%
2 Glaurung 2.2 148 23 23 635 73% -27 21%
3 Toga II 1.3.1 98 23 22 616 67% -27 22%
4 Crafty-23.1 65 22 22 636 63% -27 23%
5 Spike 1.2 Turin -10 21 21 635 52% -27 26%
6 Scorpio_2.4 -25 11 11 2743 46% 6 24%
7 Scorpio_2.4.1 -29 11 11 2740 46% 6 24%
8 Scorpio_2.4.4 -30 31 31 299 45% 7 32%
9 Fruit 2.1 -41 21 22 635 48% -27 24%
10 Hermann 2.5 -184 23 24 618 30% -27 18%
11 Arasan 11.6 -199 23 24 619 27% -27 19%
Thank you
Daniel