Author: Dann Corbit
Date: 12:30:25 12/13/05
Go up one level in this thread
On December 13, 2005 at 15:03:41, Tord Romstad wrote: >On December 13, 2005 at 14:31:37, Dann Corbit wrote: > >>On December 13, 2005 at 14:02:29, Dann Corbit wrote: >> >>>I have done several conversions of large systems from single theading to SMP >>>(not chess programs, but I guess it is quite similar). > >Except that most chess programs cannot really be described as "large >systems". > >>>The answer is not just to critical section things because it becomes a huge >>>bottleneck (you will get approximately single CPU speed). Sometimes, you will >>>have to rethink the fundamental algorithms themselves. >>> >>>Debugging SMP programs can be particularly onerous. (The main product we sell >>>where I work is a SMP system). > >Yes, I am not unfamiliar with the problems. In my previous job, I spent >three years developing and maintaining big (~100K lines of Common Lisp >code), multithreaded server applications which were used (directly or >indirectly) by about a million users per day. > >In case it was not clear, I was not trying to say that SMPifying a chess >program is a simple task. I just don't think the number of global variables >in the pre-SMP version of the program is likely to be a major obstacle >when trying to write a parallell search. > >>>You could do a wobbly port to SMP and get something with a rough speedup of 1.2 >>>or so with very little work. But to do it right is a major task, I think. >>> >>>I think GCP's approach was very intelligent. While spawning processes is more >>>expensive than spawning threads, it is much easier to have independent programs >>>that use shared memory for important shared objects like the hash table. > >Thanks for the tip. I was planning to use threads, mainly for the simple >reasons that I have no experience with processes. > >>The other smart way to do it is the way that Daniel Shawul did it. >> >>Scorpio is a small program (like -- for instance -- Glaurung). While a program >>is very small, it is not nearly so difficult to do a port to SMP. > >That makes sense, and is very good news for me. The next generation of >Glaurung is likely to be much smaller than the current version. :-) > >>I don't know how many hours it took him to put SMP into Scorpio, but I expect it >>was not too many. The most remarkable thing is that he did not have a multiple >>CPU machine to do the port. > >I'm afraid I'll have to try the same. I don't expect to own a multi-CPU >computer any time soon. You will need other people with multiple CPU machines to debug it (as I am quite sure you know).
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.