Skip to content

Commit

Permalink
flush stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
wodesuck committed May 23, 2018
1 parent 86ae900 commit a9e063c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions mcts/mcts_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ std::pair<bool, std::string> GTPExecute(MCTSEngine &engine, const std::string &c
engine.Move(-1, -1);
}
engine.Move(x, y);
fprintf(stderr, "%s\n", engine.GetDebugger().GetLastMoveDebugStr().c_str());
std::cerr << engine.GetDebugger().GetLastMoveDebugStr() << std::endl;
return {true, ""};
}
if (op == "genmove") {
Expand All @@ -246,7 +246,7 @@ std::pair<bool, std::string> GTPExecute(MCTSEngine &engine, const std::string &c
GoCoordId x = -1, y = -1;
engine.GenMove(x, y);
engine.Move(x, y);
fprintf(stderr, "%s\n", engine.GetDebugger().GetLastMoveDebugStr().c_str());
std::cerr << engine.GetDebugger().GetLastMoveDebugStr() << std::endl;
return {true, EncodeMove(x, y)};
}
if (op == "final_score") {
Expand All @@ -267,6 +267,7 @@ void GTPServing(std::istream &in, std::ostream &out)
{
auto engine = InitEngine(FLAGS_config_path);
InitMoves(*engine, FLAGS_init_moves);
std::cerr << std::flush;

int id;
bool has_id, succ;
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_gpu.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ echo log to %CD%\log >&2
md log 2>NUL

echo start mcts_main >&2
call x64\Release\mcts_main --config_path=%config% --gtp --log_dir=log --v=1
x64\Release\mcts_main --config_path=%config% --gtp --log_dir=log --v=1

popd

0 comments on commit a9e063c

Please sign in to comment.