Michel wrote:I am starting a new thread since this is not a linux issue.
I turns out that in search_clear in search.cpp the depth entry
in
SearchBest[ThreadId][SearchCurrent[ThreadId]->multipv]
was not reset to zero. So I added the line
SearchBest[ThreadId][SearchCurrent[ThreadId]->multipv].depth = 0;
and things seem to work (although I did only do very limited testing)
Can the specialists in Toga's code base verify that this is a valid fix?
Michel
Hello Michel,
Thanks for taking a look at the code, I think we can use some more people on the forum that actually are good C++ programmers! I'm certainly not one of them..
- I have really not much of a notion myself how this part of the code is working or when it is triggered. Let alone what it does in multithreaded operations, I only have Toga on single CPU at the moment. So I can't say much sensible about your fix being valid, Sorry!
- On the other hand, because this just seems to clear some variables when the information is not needed anymore, I would guesss to add the fixed line would not do much harm there either.
I was just wondering if, in your own testing, did you detect any change in output anywhere after adding the new line?
I added your suggestion in Toga, mostly still Toga 1.4 Beta5c, here:
// SearchBest
SearchBest[ThreadId][SearchCurrent[ThreadId]->multipv].move = MoveNone;
SearchBest[ThreadId][SearchCurrent[ThreadId]->multipv].value = 0;
SearchBest[ThreadId][SearchCurrent[ThreadId]->multipv].flags = SearchUnknown;
SearchBest[ThreadId][SearchCurrent[ThreadId]->multipv].depth = 0;
PV_CLEAR(SearchBest[ThreadId][SearchCurrent[ThreadId]->multipv].pv);
but can't detect any change myself in Toga output, at least not in analysis mode and also not when I start analysis mode in two best line mode. I only tested this on my single CPU computer though. But the output was totally identical in PV and nodenumbers in the position that I tried for a Toga-version without the change and a version with the new line. So I'm not sure it really is a bug not to have this additional line in search.cpp?
Regards, Eelco