That was a troll post by HGM. You're better off ignoring it.MahmoudUthman wrote:Never as in never or not right now ? , I thought that current algorithms scale quite well on low number of cores which what I'm interested in "for now" , I only have a I7-5820k processor.hgm wrote:Never consider parallel search. It is an inefficient usage of resources.
When should I consider parallel search ?
Moderators: hgm, Rebel, chrisw
-
- Posts: 2851
- Joined: Wed Mar 08, 2006 10:01 pm
- Location: Irvine, CA, USA
Re: When should I consider parallel search ?
Deasil is the right way to go.
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: When should I consider parallel search ?
Not entirely. As evidenced by the fact that almost none of my engines is SMP. After having tried it once (on HaQiKi D), I realized that it would bring me nothing.
Komodo also only implemented SMP after it had reached the top as single-threaded engine. It seems like something desperate you do only when you run entirely out of other ideas to improve your engine.
Komodo also only implemented SMP after it had reached the top as single-threaded engine. It seems like something desperate you do only when you run entirely out of other ideas to improve your engine.
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: When should I consider parallel search ?
I think you program the engine for fun, it's your hobby. so, as soon as you want to have fun trying to implement a smp engine you can tryMahmoudUthman wrote: I'm but I lack the experience to judge whether or not It's worth the effort (coding & debugging) at this level before trying other things like the ones I mentioned.
a standard implementation of lazy smp shuld give you 100 elo point boost when comparing 4cores vs 1core at CCRL conditions
For SMP you have probably to refactor some of your code because you nned to choose what data structure should be shared between threads and which should not. I share only the hashtable and the const structures for move generation. no other data is shared between threads. this means that each core hs his own killer table and history tables
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: When should I consider parallel search ?
In HaQiKi D I avoided that by using processes instead of threads. They only share the hash table.elcabesa wrote:For SMP you have probably to refactor some of your code because you nned to choose what data structure should be shared between threads and which should not.
The processes fork off each other in response to the 'cores' command, forming a pipeline along which all commands are passed to keep them in sync. The 'cores' command causes a slave process to be forked off, connected to the parent process by pipes, if more than a single core is requested. It is subsequently passed to that slave with the number of cores decremented by one. The 'memory' command is passed with an extra, non-standard parameter indicating the OS name of the shared memory area, so that the slaves can attach to it, instead of allocating memory themselves. Without this extra parameter (as when received from the GUI) a shared memory area of the requested size is created. A 'go' command is passed to the slave as 'analyze', and 'force' command as 'exit'. When the master makes a move, it doesn't only send it to the GUI as 'move XXX', but also to the slave as 'usermove XXX'. Other commands are passed as they are received.
-
- Posts: 5557
- Joined: Tue Feb 28, 2012 11:56 pm
Re: When should I consider parallel search ?
Yes, one should at least have reached the strength of HGM's engine (about 1800 Elo?).hgm wrote:Not entirely. As evidenced by the fact that almost none of my engines is SMP. After having tried it once (on HaQiKi D), I realized that it would bring me nothing.
Komodo also only implemented SMP after it had reached the top as single-threaded engine. It seems like something desperate you do only when you run entirely out of other ideas to improve your engine.
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: When should I consider parallel search ?
Uh uh, you are talking about the silver medalist in Pamplona 2009! (When it was still single core.)
Re: When should I consider parallel search ?
Embla is smp yes - unfortunately it does not give any gain.
I've tried getting lazy smp to work. Took an hour. But: it did not work
So I asked it because I was wondering what aspect I missed. Apparently there is one because of that one hour - a week difference.
I've tried getting lazy smp to work. Took an hour. But: it did not work
So I asked it because I was wondering what aspect I missed. Apparently there is one because of that one hour - a week difference.
-
- Posts: 5557
- Joined: Tue Feb 28, 2012 11:56 pm
Re: When should I consider parallel search ?
You missed only three aspects: bugs, bugs and bugs.flok wrote:Embla is smp yes - unfortunately it does not give any gain.
I've tried getting lazy smp to work. Took an hour. But: it did not work
So I asked it because I was wondering what aspect I missed. Apparently there is one because of that one hour - a week difference.
-
- Posts: 211
- Joined: Sun Jan 18, 2009 11:27 pm
- Location: Sweden
- Full name: Patrik Karlsson
Re: When should I consider parallel search ?
flok wrote:it did not work
Imagine you give me a Rubik's cube and ask me to solve it. I finish it in only 15 seconds and this is what it looks like:flok wrote:I was wondering what aspect I missed
Now, what aspect of solving Rubik's cube would you say I missed?
-
- Posts: 4605
- Joined: Wed Oct 01, 2008 6:33 am
- Location: Regensburg, Germany
- Full name: Guenther Simon
Re: When should I consider parallel search ?
HGM has done several programs and a lot of them are non 'western' chess ones which are quite strong. BTW even Joker, one of his chess programs is at least 2300.syzygy wrote:Yes, one should at least have reached the strength of HGM's engine (about 1800 Elo?).hgm wrote:Not entirely. As evidenced by the fact that almost none of my engines is SMP. After having tried it once (on HaQiKi D), I realized that it would bring me nothing.
Komodo also only implemented SMP after it had reached the top as single-threaded engine. It seems like something desperate you do only when you run entirely out of other ideas to improve your engine.