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
interested in making single proccesor program multi
Moderator: Ras
-
- Posts: 626
- Joined: Sun May 13, 2007 9:55 pm
- Location: Bay Area, CA USA
- Full name: Mike Adams
-
- Posts: 12777
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: interested in making single proccesor program multi
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: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
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
Re: interested in making single proccesor program multi
I would recommend latest Glaurung (2.0.1) over Viper. It's easier to understand IMO.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:
Before diving into the code, reading some papers on PV-Split and YBWC is very useful.
Smash also uses SMP (ABDADA):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.
http://www.cli.di.unipi.it/~sambati/prog/smash.html