small stockfish request.

Discussion of chess software programming and technical issues.

Moderator: Ras

jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

small stockfish request.

Post by jwes »

Could output to searchlog.txt be followed by a flush()? I was playing with stockfish and after a crash, I was hoping to get some clues from the log but it was truncated. It should not affect performance since if you want that last ounce of performance you will have the log disabled.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: small stockfish request.

Post by mcostalba »

jwes wrote:Could output to searchlog.txt be followed by a flush()? I was playing with stockfish and after a crash, I was hoping to get some clues from the log but it was truncated. It should not affect performance since if you want that last ounce of performance you will have the log disabled.
Well in C++ putting at the end "<< std::endl" should guarantee that string buffer is flushed.

I mean from the application, not from the OS to the disk. The latter is OS dependant I guess.
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: small stockfish request.

Post by wgarvin »

mcostalba wrote:
jwes wrote:Could output to searchlog.txt be followed by a flush()? I was playing with stockfish and after a crash, I was hoping to get some clues from the log but it was truncated. It should not affect performance since if you want that last ounce of performance you will have the log disabled.
Well in C++ putting at the end "<< std::endl" should guarantee that string buffer is flushed.

I mean from the application, not from the OS to the disk. The latter is OS dependant I guess.
That is sufficient to make sure you get everything that stockfish wrote before it crashed.

It would only be insufficient if the whole machine crashed.