Lazy SMP and "lazy cluster" experiments

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

TomKerrigan
Posts: 64
Joined: Fri Jul 03, 2015 9:22 pm

Re: Approximate ABDADA

Post by TomKerrigan »

The way I do thread synchronization at the root is to have a data structure for the root search parameters: alpha, beta, depth, current best move, current best score, move that's failing a null-window search (if any).

I have one of these structures local to each thread, and one global structure for the "current best" parameters.

The global structure has a "job number" and each time it's updated with more current parameters, the job number is incremented.

If a thread's job number doesn't match the global job number, it collapses the search tree, copies the global parameters, and re-starts the search from the root. I check to make sure the job numbers match every few thousand nodes.

The global root parameters can't be updated by a thread unless the job numbers match, i.e., the thread is doing the most current search and has found new parameters.

I'm not saying this whole approach is especially good but it works alright and maybe it will give you an idea or two.