How to test a 1-core engines in paralell on a multicore PC?

Discussion of chess software programming and technical issues.

Moderator: Ras

jacobbl
Posts: 80
Joined: Wed Feb 17, 2010 3:57 pm

How to test a 1-core engines in paralell on a multicore PC?

Post by jacobbl »

Hi, I'm wondering if anyone knows if there is a software where I can play 4 games in paralell on a 4-CPU PC where the engines only use 1 CPU each, and no pondering. At the moment I'm starting multiple instances of Arena, and adding the scores afterwards. No big deal, but it would be nice if there's a software administrating the total score in these simultanious matches.

Regards
Jacob
User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: How to test a 1-core engines in paralell on a multicore

Post by Matthias Gemuh »

My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: How to test a 1-core engines in paralell on a multicore

Post by bob »

jacobbl wrote:Hi, I'm wondering if anyone knows if there is a software where I can play 4 games in paralell on a 4-CPU PC where the engines only use 1 CPU each, and no pondering. At the moment I'm starting multiple instances of Arena, and adding the scores afterwards. No big deal, but it would be nice if there's a software administrating the total score in these simultanious matches.

Regards
Jacob
I do not know of one, but be aware that this kind of testing can skew results somewhat. If you run an engine that generates a lot of memory traffic, it will hurt other engines running on the same machine, at the same time, because they will have to compete for bandwidth and slow down. Take four programs, A, B, C and D. A and B are high-bandwidth engines (lots of memory accesses) while C and D are very cache-friendly. There are other engines in your "tournament" that are evenly distributed between high memory bandwidth and low. So long as you play just two high-bandwidth engines and two cache friendly engines on a dual-core box, you will likely be OK. But if you add a 3rd high-bandwidth engine, suddenly everybody except the cache-friendly engine slows down and the cache-friendly engine suddenly has an extra speed advantage.
benstoker
Posts: 342
Joined: Tue Jan 19, 2010 2:05 am

Re: How to test a 1-core engines in paralell on a multicore

Post by benstoker »

bob wrote:
jacobbl wrote:Hi, I'm wondering if anyone knows if there is a software where I can play 4 games in paralell on a 4-CPU PC where the engines only use 1 CPU each, and no pondering. At the moment I'm starting multiple instances of Arena, and adding the scores afterwards. No big deal, but it would be nice if there's a software administrating the total score in these simultanious matches.

Regards
Jacob
I do not know of one, but be aware that this kind of testing can skew results somewhat. If you run an engine that generates a lot of memory traffic, it will hurt other engines running on the same machine, at the same time, because they will have to compete for bandwidth and slow down. Take four programs, A, B, C and D. A and B are high-bandwidth engines (lots of memory accesses) while C and D are very cache-friendly. There are other engines in your "tournament" that are evenly distributed between high memory bandwidth and low. So long as you play just two high-bandwidth engines and two cache friendly engines on a dual-core box, you will likely be OK. But if you add a 3rd high-bandwidth engine, suddenly everybody except the cache-friendly engine slows down and the cache-friendly engine suddenly has an extra speed advantage.
Can you solve this problem by just setting the Hash memory to some low value, e.g., 32M?
jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

Re: How to test a 1-core engines in paralell on a multicore

Post by jhaglund »

You can use winboard, with Crafty and such... Of course, you'll have 4 GUI's open, but you can make them tiny... pretty simply too.

I've ran 30 Winboards, with 60 Crafty executables running, on a cheap i7 processor, and played 450k games in a couple days, with no memory or chess engine congestion problems...

Save all the games to the same pgn file. After the end of the (/mg x) games it will display the results in a dialog pop-up (comp1 wins - comp2 wins - draws)
Edsel Apostol
Posts: 803
Joined: Mon Jul 17, 2006 5:53 am
Full name: Edsel Apostol

Re: How to test a 1-core engines in paralell on a multicore

Post by Edsel Apostol »

jacobbl wrote:Hi, I'm wondering if anyone knows if there is a software where I can play 4 games in paralell on a 4-CPU PC where the engines only use 1 CPU each, and no pondering. At the moment I'm starting multiple instances of Arena, and adding the scores afterwards. No big deal, but it would be nice if there's a software administrating the total score in these simultanious matches.

Regards
Jacob
Use the concurrency option of Cutechess-cli.
jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

Re: How to test a 1-core engines in paralell on a multicore

Post by jhaglund »

Can you solve this problem by just setting the Hash memory to some low value, e.g., 32M?
That works too, but most of the time you have to watch for CPU usage,... so one program doesn't get more time than the other...

I like to recompile with small values for fast games...

For Jacob's case, there would be no problems...
User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: How to test a 1-core engines in paralell on a multicore

Post by Matthias Gemuh »

jhaglund wrote:
Can you solve this problem by just setting the Hash memory to some low value, e.g., 32M?
That works too, but most of the time you have to watch for CPU usage,... so one program doesn't get more time than the other...

I like to recompile with small values for fast games...

For Jacob's case, there would be no problems...
Clearly wrong assessments. Bob is right.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

Re: How to test a 1-core engines in paralell on a multicore

Post by jhaglund »

Clearly wrong assessments. Bob is right.
:roll:

Clearly, you must think we are still in the 1990's :lol:
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: How to test a 1-core engines in paralell on a multicore

Post by bob »

benstoker wrote:
bob wrote:
jacobbl wrote:Hi, I'm wondering if anyone knows if there is a software where I can play 4 games in paralell on a 4-CPU PC where the engines only use 1 CPU each, and no pondering. At the moment I'm starting multiple instances of Arena, and adding the scores afterwards. No big deal, but it would be nice if there's a software administrating the total score in these simultanious matches.

Regards
Jacob
I do not know of one, but be aware that this kind of testing can skew results somewhat. If you run an engine that generates a lot of memory traffic, it will hurt other engines running on the same machine, at the same time, because they will have to compete for bandwidth and slow down. Take four programs, A, B, C and D. A and B are high-bandwidth engines (lots of memory accesses) while C and D are very cache-friendly. There are other engines in your "tournament" that are evenly distributed between high memory bandwidth and low. So long as you play just two high-bandwidth engines and two cache friendly engines on a dual-core box, you will likely be OK. But if you add a 3rd high-bandwidth engine, suddenly everybody except the cache-friendly engine slows down and the cache-friendly engine suddenly has an extra speed advantage.
Can you solve this problem by just setting the Hash memory to some low value, e.g., 32M?
No. If the problem is hash-related, you still do stores and probes in the same places in the search, and cache is of little help on random accesses. But there are lots of other things in memory. For example, the large magic tables, or the smaller rotated bitmap lookup tables. Mobility tables. Other caches like pawn hash, etc. Some programs simply have a high bandwidth requirement, some don't... Hash is but one piece of the memory problem. Some programs are simply very large and fetching instructions causes a bandwidth drain if the instruction cache is not large enough...