interested in making single proccesor program multi

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

adams161
Posts: 626
Joined: Sun May 13, 2007 9:55 pm
Location: Bay Area, CA USA
Full name: Mike Adams

interested in making single proccesor program multi

Post by adams161 »

One of my computers is a dual core. I"m interested in making my chess program take advantage of more than one core in both windows and linux. Any know any good links that explain what you need to do to accomplish this. I have a firm understanding of alpha beta but not of parellel alpha beta which i've never used.

thanks
Mike Adams
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: interested in making single proccesor program multi

Post by Dann Corbit »

adams161 wrote:One of my computers is a dual core. I"m interested in making my chess program take advantage of more than one core in both windows and linux. Any know any good links that explain what you need to do to accomplish this. I have a firm understanding of alpha beta but not of parellel alpha beta which i've never used.

thanks
Mike Adams
There is a demonstration program by Tord Romstad called Viper (much simpler than his big brother Glaurung) that is designed to show how to do it:
http://www.glaurungchess.com/viper/

You might also look at Daniel Shawul's program Scorpio:
http://dshawul.googlepages.com/home

Both of these are easier to understand than other SMP programs that I have seen.

Amy is inefficient for SMP, so don't copy it (gain per CPU is smaller than other methods in my tests -- but possibly because pthreads port to Windows may not be natively efficient).

Crafty is awfully complex, so it is easy to get lost in the details.

Typhoon is a little tricky to build (typically, you have to install a machine language assember)

KnightCap uses fork(), and so is restricted to POSIX.

Those are the only chess engines I can think of at the moment that are parallel and open source, but there are probably some others.

Here is a paper on what you want to do:
http://iacoma.cs.uiuc.edu/~greskamp/pdfs/412.pdf
Alessandro Scotti

Re: interested in making single proccesor program multi

Post by Alessandro Scotti »

Dann Corbit wrote:There is a demonstration program by Tord Romstad called Viper (much simpler than his big brother Glaurung) that is designed to show how to do it:
I would recommend latest Glaurung (2.0.1) over Viper. It's easier to understand IMO.

Before diving into the code, reading some papers on PV-Split and YBWC is very useful.
Dann Corbit wrote:Those are the only chess engines I can think of at the moment that are parallel and open source, but there are probably some others.
Smash also uses SMP (ABDADA):

http://www.cli.di.unipi.it/~sambati/prog/smash.html