[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Simple multi-threading...

From: Jonathan Kinsey
Subject: Re: [Bug-gnubg] Simple multi-threading...
Date: Sun, 07 Jan 2007 10:55:24 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: Gecko/20061207 Thunderbird/ Mnenhy/

Jonathan Kinsey wrote:
> Now if you get any problems analysing a match, it's likely to be a
> re-entrance problem in the code (use of static/globals).

I've fixed 2 re-entrance problems in eval.c, the first was the static
amMoves[] in GenerateMoves, I've temporarily hacked enough arrays for
one per thread.

The second problem is the global nContext array, which stores the NN
context in between Eval calls.  I have trouble understanding exactly
what this is doing, in FindBestMoveInEval() it seems to be used quite
straight forwardly, but I'm not convinced that EvaluatePositionFull()
which uses it as well doesn't interfere.  Anyway I've passed the
nContext through the evaluation functions and hopefuly it still works in
the same way.

It now runs with mingw here, except that the SSE code crashes as the
data is aligned incorrectly, this seems to be a known bug
(http://gcc.gnu.org/ml/gcc-prs/2003-04/msg00584.html), which has
probably been fixed in newer versions of gthread/pthread.

I've checked those changes in, still haven't looked at the
double/decision link.

One of your crashes was caused by the GTKUpdateClock() call in
ApplyMoveRecord, comment this call out for now, I guess it should be
somewhere else or doing nothing when analysing games (I don't think
running out of time makes much sense here!).


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]