interested in making single proccesor program multi

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
adams161
Posts: 521
Joined: Sun May 13, 2007 7:55 pm
Location: Tacoma, WA USA

interested in making single proccesor program multi

Post by adams161 » Fri Dec 28, 2007 7:56 pm

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: 10124
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: interested in making single proccesor program multi

Post by Dann Corbit » Sat Dec 29, 2007 5:18 am

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 » Sat Dec 29, 2007 8:28 am

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

Post Reply