Eelco de Groot wrote:Had not much luck with the patch utility, I probably best stick to trying to insert code manually. That forces me to look at the new code better and that would not be wasted time anyway. I tried to install Gnu's patch but strangely in the Start menu I can find the documentation but not the executable. I can just place the utility in the file with the sources but I figure then I still have to run it from the commandline in a DOS box, and the command line can't seem to find my E: partition where I would like to run the patch utility. I can do a DIR E: that works but not CD E: Maybe it is some sort of security issue in Windows XP or I forgot the proper commands. At that point I stopped, it can wait till later.
Thanks!
Eelco
I haven't used DOS in a while, but you could try...
Eelco de Groot wrote:Had not much luck with the patch utility, I probably best stick to trying to insert code manually. That forces me to look at the new code better and that would not be wasted time anyway. I tried to install Gnu's patch but strangely in the Start menu I can find the documentation but not the executable. I can just place the utility in the file with the sources but I figure then I still have to run it from the commandline in a DOS box, and the command line can't seem to find my E: partition where I would like to run the patch utility. I can do a DIR E: that works but not CD E: Maybe it is some sort of security issue in Windows XP or I forgot the proper commands. At that point I stopped, it can wait till later.
Thanks!
Eelco
I haven't used DOS in a while, but you could try...
E:
cd \path\to\stockfish-1.62
patch -p0 < patchfile
(The path should be the path to the folder which contains the "src" folder, and should omit the "E:" part.)
Thanks Justin! I'll try later. A few weeks ago, I found I had bought years ago in well known second hand bookstore "De Slegte" a mighty tome called "Working with MS-Dos 6.2" It was still in its brown paper wrappings. Finally opened it and was very pleased! 900 pages of very valuable lessons and documentation. Durable plastic lined cover, it is obviously meant for heavy use. You have to keep up with the times I figured when I bought it. But then I forgot all about it. Should come in handy in case I want to switch to Linux
Eelco
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
uci
position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
go infinite
=> SF outputs info, using 2 threads at 100% (in my case, because I have 2 cores).
Then enter "stop" and no "bestmove" is printed (there is no output at all). Note that SF uses no longer 2 threads at 100% but only 1 at 100% while you wait for a "bestmove".
638f3d31cc9a61ce3df2b685fef96f15e0afb940
src/search.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/search.cpp b/src/search.cpp
index 3dbcb52..ea9240e 100644
--- a/src/search.cpp
+++ b/src/search.cpp
@@ -844,7 +844,7 @@ namespace {
// If we are pondering or in infinite search, we shouldn't print the
// best move before we are told to do so.
- if (PonderSearch || InfiniteSearch)
+ if (!AbortSearch && (PonderSearch || InfiniteSearch))
wait_for_stop_or_ponderhit();
else
// Print final search statistics
> patch -p1 < p1.txt
patching file src/benchmark.cpp
Hunk #1 FAILED at 155.
1 out of 1 hunk FAILED -- saving rejects to file src/benchmark.cpp.rej
patching file src/search.cpp
Hunk #1 FAILED at 227.
Hunk #2 FAILED at 369.
Hunk #3 FAILED at 387.
Hunk #4 FAILED at 467.
Hunk #5 FAILED at 780.
Hunk #6 FAILED at 833.
Hunk #7 FAILED at 2649.
Hunk #8 FAILED at 2664.
8 out of 8 hunks FAILED -- saving rejects to file src/search.cpp.rej
Is there a preferred distro I should be patching against? The line numbers don't look right to me in the source I have, but maybe I'm overlooking something.
> patch -p1 < p1.txt
patching file src/benchmark.cpp
Hunk #1 FAILED at 155.
1 out of 1 hunk FAILED -- saving rejects to file src/benchmark.cpp.rej
patching file src/search.cpp
Hunk #1 FAILED at 227.
Hunk #2 FAILED at 369.
Hunk #3 FAILED at 387.
Hunk #4 FAILED at 467.
Hunk #5 FAILED at 780.
Hunk #6 FAILED at 833.
Hunk #7 FAILED at 2649.
Hunk #8 FAILED at 2664.
8 out of 8 hunks FAILED -- saving rejects to file src/search.cpp.rej
Is there a preferred distro I should be patching against? The line numbers don't look right to me in the source I have, but maybe I'm overlooking something.
Thanks
Jeremy
Could you post the rejected part in src/benchmark.cpp.rej ?
Marco, I managed to apply both patches to Stockfish 1.6.2 but still have problems under Scid : half the time when moving in a game SF does not work as expected. Maybe some code review regarding UCI handling would fix things.
It is possible that the problem comes from Scid, but it usually works well with UCI engines.
> patch -p1 < p1.txt
patching file src/benchmark.cpp
Hunk #1 FAILED at 155.
1 out of 1 hunk FAILED -- saving rejects to file src/benchmark.cpp.rej
patching file src/search.cpp
Hunk #1 FAILED at 227.
Hunk #2 FAILED at 369.
Hunk #3 FAILED at 387.
Hunk #4 FAILED at 467.
Hunk #5 FAILED at 780.
Hunk #6 FAILED at 833.
Hunk #7 FAILED at 2649.
Hunk #8 FAILED at 2664.
8 out of 8 hunks FAILED -- saving rejects to file src/search.cpp.rej
Is there a preferred distro I should be patching against? The line numbers don't look right to me in the source I have, but maybe I'm overlooking something.
Thanks
Jeremy
Could you post the rejected part in src/benchmark.cpp.rej ?
pgeorges wrote:Marco, I managed to apply both patches to Stockfish 1.6.2 but still have problems under Scid : half the time when moving in a game SF does not work as expected. Maybe some code review regarding UCI handling would fix things.
It is possible that the problem comes from Scid, but it usually works well with UCI engines.
It seems correct to me. Perhaps is the patch file, try to save the file with Linux (/n) line endings and not Windows (/cr/lf) and then apply again using -l or --ignore-whitespace option.