Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Why so many small amount of engines support SMP?

Author: Dann Corbit

Date: 10:58:10 07/05/05

Go up one level in this thread


On July 04, 2005 at 23:36:39, Juan Pablo Naar C. wrote:

>Right now, the only engines that support SMP are: Amy, Crafty, DanChess, Deep
>Fritz, Deep Junior, Deep Shredder, Deep Sjeng, Patzer, and Tytan, a very small
>number... (Im only counting the ones that are Freeware/Shareware/Commercial
>(available to get) ). Where do you live me Gandalf, Ruffian, Hiarcs, Chess
>Tiger, Ktulu, do they have plans to become SMP?
>Is coding for SMP really hard? If so, then please apologize me.

There are not a lot of programmers with SMP experience and also Chess
experience.

I think also that shared resources cause problems for a lot of people.

Perhaps a forking server with shared memory will be easier for some, but
probably threads is better in the long run.

At any rate, I see a lot of global variables in most chess programs.  These
programs will simply have to be redesigned to work with SMP.

In a single threaded chess program, it does not matter if lots of functions can
write to the same public symbol, since only one thread of execution can actually
affect it at one time.  But in a SMP version of the program, every update access
like that will cause a crash.  You can gate everything with critical sections,
but now suddenly we have a huge slowdown point.

So the ideas of SMP are better designed from the start or you will have serious
problems.

I feel especially sorry for the people who followed the TSCP model (and there
are a lot of you).  Masses of public variables, which are visible and updated
everywhere.  Now, that works great in a single thread of execution, but falls
flat on its face with SMP in a terrible way.  For sure, there is a big rewrite
effort there.

And once you have written an SMP version, it is not going to be easy to get a
highly efficient boost per thread.  I have seen over time that even the best
programmers take a while to get better than 50% new boost per thread.




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.