Closed jun63cn closed 3 years ago
Here's an example of a working configuration, maybe that will help you diagnose.
Have lines like this in the Ceres.json: "DirLC0Networks": "d:\weights\lczero.org", "DefaultNetworkSpecString": "LC0:66666",
Have a file like this: Directory of d:\weights\lczero.org 12/16/2020 05:10 PM 166,380,347 weights_run1_66666.pb
Now run Ceres (with or without the "network=LC0:66666" argument)
Thanks, That's works.
But some error occerd
===================================================== | Ceres - A Monte Carlo Tree Search Chess Engine | |
---|---|---|
(c) 2020- David Elliott and the Ceres Authors | ||
With network backend code from Leela Chess Zero. | ||
Version 0.80. Use help to list available commands. | ||
{git} | ||
===================================================== |
Ceres user settings loaded from file Ceres.json
Network evaluation configured to use:
Entering UCI command processing mode. uci id name Ceres id author David Elliott and the Ceres Authors uciok isready readyok ucinewgame
go infinite
Exception in Ceres engine execution:
System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
at Ceres.Chess.NNEvaluators.LC0DLL.LCO_Interop.Alloc(Int32 sessionIndex, String networkFilename, Int32 gpuID)
at Ceres.Chess.NNEvaluators.Internals.LC0LibraryNNEvaluator..ctor(String networkFilename, Int32 gpuID)
at Ceres.Chess.NNEvaluators.NNEvaluatorLC0..ctor(INNWeightsFileInfo net, Int32[] gpuIDs, NNEvaluatorPrecision precision)
at Ceres.Chess.NNEvaluators.NNEvaluatorLC0..ctor(INNWeightsFileInfo net, Int32 gpuID, NNEvaluatorPrecision precision)
at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.Singleton(NNEvaluatorNetDef netDef, NNEvaluatorDeviceDef deviceDef)
at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.DoBuildEvaluator(NNEvaluatorDef def)
at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.BuildEvaluator(NNEvaluatorDef def)
at Ceres.MCTS.Params.NNEvaluatorSet.MakeEvaluator()
at Ceres.MCTS.Params.NNEvaluatorSet.get_Evaluator2()
at Ceres.MCTS.Search.MCTSSearchFlow..ctor(MCTSManager manager, MCTSIterator context)
at Ceres.MCTS.Iteration.MCTSManager.DoSearch(SearchLimit searchLimit, MCTSProgressCallback progressCallback)
at Ceres.MCTS.Iteration.MCTSManager.Search(MCTSManager manager, Boolean verbose, MCTSProgressCallback progressCallback, Boolean possiblyUsePositionCache)
at Ceres.MCTS.Iteration.MCTSLaunch.Search(NNEvaluatorSet nnEvaluators, ParamsSelect paramsSelect, ParamsSearch paramsSearch, IManagerGameLimit timeManager, ParamsSearchExecutionModifier paramsSearchExecutionPostprocessor, MCTSIterator reuseOtherContextForEvaluatedNodes, PositionWithHistory priorMoves, SearchLimit searchLimit, Boolean verbose, DateTime startTime, List1 gameMoveHistory, MCTSProgressCallback progressCallback, Boolean possiblyUsePositionCache, Boolean isFirstMoveOfGame) at Ceres.Features.GameEngines.GameEngineCeresInProcess.RunSearchPossiblyTreeReuse(MCTSIterator reuseOtherContextForEvaluatedNodes, PositionWithHistory curPositionAndMoves, List
1 gameMoveHistory, SearchLimit searchLimit, MCTSProgressCallback callback, Boolean verbose)
at Ceres.Features.GameEngines.GameEngineCeresInProcess.DoSearch(PositionWithHistory curPositionAndMoves, SearchLimit searchLimit, List1 gameMoveHistory, ProgressCallback callback, Boolean verbose) at Ceres.Chess.GameEngines.GameEngine.Search(PositionWithHistory curPositionAndMoves, SearchLimit searchLimit, List
1 gameMoveHistory, ProgressCallback callback, Boolean verbose)
at Ceres.Features.UCI.UCIManager.RunSearch(SearchLimit searchLimit)
at Ceres.Features.UCI.UCIManager.<>cDisplayClass23_0.1 gameMoveHistory, MCTSProgressCallback progressCallback, Boolean possiblyUsePositionCache, Boolean isFirstMoveOfGame) at Ceres.Features.GameEngines.GameEngineCeresInProcess.RunSearchPossiblyTreeReuse(MCTSIterator reuseOtherContextForEvaluatedNodes, PositionWithHistory curPositionAndMoves, List
1 gameMoveHistory, SearchLimit searchLimit, MCTSProgressCallback callback, Boolean verbose)
at Ceres.Features.GameEngines.GameEngineCeresInProcess.DoSearch(PositionWithHistory curPositionAndMoves, SearchLimit searchLimit, List1 gameMoveHistory, ProgressCallback callback, Boolean verbose) at Ceres.Chess.GameEngines.GameEngine.Search(PositionWithHistory curPositionAndMoves, SearchLimit searchLimit, List
1 gameMoveHistory, ProgressCallback callback, Boolean verbose)
at Ceres.Features.UCI.UCIManager.RunSearch(SearchLimit searchLimit)
at Ceres.Features.UCI.UCIManager.<>cDisplayClass23_0.
F:\ceres>
That is suggestive of a CUDA version mismatch error. You can start just to verify that LC0.EXE runs fine from the same directory as LC0.DLL. If that works, you might post this issue the #help channel on Discord, others know more and have helped resolve these types of issues.
F:\Ceres\artifacts\release\net5.0>ceres
===================================================== | Ceres - A Monte Carlo Tree Search Chess Engine | |
---|---|---|
(c) 2020- David Elliott and the Ceres Authors | ||
With network backend code from Leela Chess Zero. | ||
Version 0.85. Use help to list available commands. | ||
===================================================== |
Ceres user settings loaded from file Ceres.json
Network evaluation configured to use:
Entering UCI command processing mode.
go nodes 20
info depth 3 seldepth 5 time 107 nodes 20 score cp 11 tbhits 0 nps 186 pv e2e4 c7c5 c2c3 g8f6 e4e5 string M= NaN
info depth 3 seldepth 5 time 111 nodes 20 score cp 11 tbhits 0 nps 180 pv e2e4 c7c5 c2c3 g8f6 e4e5 string M= NaN
bestmove e2e4
go infinite
Exception in Ceres engine execution:
System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
at Ceres.Chess.NNEvaluators.LC0DLL.LCO_Interop.Alloc(Int32 sessionIndex, String networkFilename, Int32 gpuID)
at Ceres.Chess.NNEvaluators.Internals.LC0LibraryNNEvaluator..ctor(String networkFilename, Int32 gpuID) in F:\Ceres\src\Ceres.Chess\NNEvaluators\LC0DLL\LC0LibraryNNEvaluator.cs:line 111
at Ceres.Chess.NNEvaluators.NNEvaluatorLC0..ctor(INNWeightsFileInfo net, Int32[] gpuIDs, NNEvaluatorPrecision precision) in F:\Ceres\src\Ceres.Chess\NNEvaluators\LC0DLL\NNEvaluatorLC0.cs:line 79
at Ceres.Chess.NNEvaluators.NNEvaluatorLC0..ctor(INNWeightsFileInfo net, Int32 gpuID, NNEvaluatorPrecision precision) in F:\Ceres\src\Ceres.Chess\NNEvaluators\LC0DLL\NNEvaluatorLC0.cs:line 90
at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.Singleton(NNEvaluatorNetDef netDef, NNEvaluatorDeviceDef deviceDef) in F:\Ceres\src\Ceres.Chess\NNEvaluators\NNEvaluatorFactory.cs:line 92
at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.DoBuildEvaluator(NNEvaluatorDef def) in F:\Ceres\src\Ceres.Chess\NNEvaluators\NNEvaluatorFactory.cs:line 235
at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.BuildEvaluator(NNEvaluatorDef def) in F:\Ceres\src\Ceres.Chess\NNEvaluators\NNEvaluatorFactory.cs:line 67
at Ceres.MCTS.Params.NNEvaluatorSet.MakeEvaluator() in F:\Ceres\src\Ceres.MCTS\Iteration\Params\NNEvaluatorSet.cs:line 118
at Ceres.MCTS.Params.NNEvaluatorSet.get_Evaluator2() in F:\Ceres\src\Ceres.MCTS\Iteration\Params\NNEvaluatorSet.cs:line 145
at Ceres.MCTS.Search.MCTSSearchFlow..ctor(MCTSManager manager, MCTSIterator context) in F:\Ceres\src\Ceres.MCTS\Search\MCTSSearchFlow.cs:line 70
at Ceres.MCTS.Iteration.MCTSManager.DoSearch(SearchLimit searchLimit, MCTSProgressCallback progressCallback) in F:\Ceres\src\Ceres.MCTS\Iteration\MCTSManager.cs:line 288
at Ceres.MCTS.Iteration.MCTSManager.Search(MCTSManager manager, Boolean verbose, MCTSProgressCallback progressCallback, Boolean possiblyUsePositionCache) in F:\Ceres\src\Ceres.MCTS\Iteration\MCTSManager.cs:line 586
at Ceres.MCTS.Iteration.MCTSearch.SearchContinue(MCTSManager priorManager, MCTSIterator reuseOtherContextForEvaluatedNodes, IEnumerable1 moves, PositionWithHistory newPositionAndMoves, List
1 gameMoveHistory, SearchLimit searchLimit, Boolean verbose, DateTime startTime, MCTSProgressCallback progressCallback, Single thresholdMinFractionNodesRetained, Boolean isFirstMoveOfGame) in F:\Ceres\src\Ceres.MCTS\Iteration\MCTSearch.cs:line 293
at Ceres.Features.GameEngines.GameEngineCeresInProcess.RunSearchPossiblyTreeReuse(MCTSIterator reuseOtherContextForEvaluatedNodes, PositionWithHistory curPositionAndMoves, List1 gameMoveHistory, SearchLimit searchLimit, MCTSProgressCallback callback, Boolean verbose) in F:\Ceres\src\Ceres.Features\GameEngines\GameEngineCeresInProcess.cs:line 280 at Ceres.Features.GameEngines.GameEngineCeresInProcess.DoSearch(PositionWithHistory curPositionAndMoves, SearchLimit searchLimit, List
1 gameMoveHistory, ProgressCallback callback, Boolean verbose) in F:\Ceres\src\Ceres.Features\GameEngines\GameEngineCeresInProcess.cs:line 202
at Ceres.Chess.GameEngines.GameEngine.Search(PositionWithHistory curPositionAndMoves, SearchLimit searchLimit, List1 gameMoveHistory, ProgressCallback callback, Boolean verbose) in F:\Ceres\src\Ceres.Chess\GameEngines\GameEngine.cs:line 96 at Ceres.Features.UCI.UCIManager.RunSearch(SearchLimit searchLimit) in F:\Ceres\src\Ceres.Features\UCI\UCIManager.cs:line 525 at Ceres.Features.UCI.UCIManager.<>c__DisplayClass23_0.<ProcessGo>b__0() in F:\Ceres\src\Ceres.Features\UCI\UCIManager.cs:line 428 at Ceres.Chess.NNEvaluators.LC0DLL.LCO_Interop.Alloc(Int32 sessionIndex, String networkFilename, Int32 gpuID) at Ceres.Chess.NNEvaluators.Internals.LC0LibraryNNEvaluator..ctor(String networkFilename, Int32 gpuID) in F:\Ceres\src\Ceres.Chess\NNEvaluators\LC0DLL\LC0LibraryNNEvaluator.cs:line 111 at Ceres.Chess.NNEvaluators.NNEvaluatorLC0..ctor(INNWeightsFileInfo net, Int32[] gpuIDs, NNEvaluatorPrecision precision) in F:\Ceres\src\Ceres.Chess\NNEvaluators\LC0DLL\NNEvaluatorLC0.cs:line 79 at Ceres.Chess.NNEvaluators.NNEvaluatorLC0..ctor(INNWeightsFileInfo net, Int32 gpuID, NNEvaluatorPrecision precision) in F:\Ceres\src\Ceres.Chess\NNEvaluators\LC0DLL\NNEvaluatorLC0.cs:line 90 at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.Singleton(NNEvaluatorNetDef netDef, NNEvaluatorDeviceDef deviceDef) in F:\Ceres\src\Ceres.Chess\NNEvaluators\NNEvaluatorFactory.cs:line 92 at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.DoBuildEvaluator(NNEvaluatorDef def) in F:\Ceres\src\Ceres.Chess\NNEvaluators\NNEvaluatorFactory.cs:line 235 at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.BuildEvaluator(NNEvaluatorDef def) in F:\Ceres\src\Ceres.Chess\NNEvaluators\NNEvaluatorFactory.cs:line 67 at Ceres.MCTS.Params.NNEvaluatorSet.MakeEvaluator() in F:\Ceres\src\Ceres.MCTS\Iteration\Params\NNEvaluatorSet.cs:line 118 at Ceres.MCTS.Params.NNEvaluatorSet.get_Evaluator2() in F:\Ceres\src\Ceres.MCTS\Iteration\Params\NNEvaluatorSet.cs:line 145 at Ceres.MCTS.Search.MCTSSearchFlow..ctor(MCTSManager manager, MCTSIterator context) in F:\Ceres\src\Ceres.MCTS\Search\MCTSSearchFlow.cs:line 70 at Ceres.MCTS.Iteration.MCTSManager.DoSearch(SearchLimit searchLimit, MCTSProgressCallback progressCallback) in F:\Ceres\src\Ceres.MCTS\Iteration\MCTSManager.cs:line 288 at Ceres.MCTS.Iteration.MCTSManager.Search(MCTSManager manager, Boolean verbose, MCTSProgressCallback progressCallback, Boolean possiblyUsePositionCache) in F:\Ceres\src\Ceres.MCTS\Iteration\MCTSManager.cs:line 586 at Ceres.MCTS.Iteration.MCTSearch.SearchContinue(MCTSManager priorManager, MCTSIterator reuseOtherContextForEvaluatedNodes, IEnumerable
1 moves, PositionWithHistory newPositionAndMoves, List1 gameMoveHistory, SearchLimit searchLimit, Boolean verbose, DateTime startTime, MCTSProgressCallback progressCallback, Single thresholdMinFractionNodesRetained, Boolean isFirstMoveOfGame) in F:\Ceres\src\Ceres.MCTS\Iteration\MCTSearch.cs:line 293 at Ceres.Features.GameEngines.GameEngineCeresInProcess.RunSearchPossiblyTreeReuse(MCTSIterator reuseOtherContextForEvaluatedNodes, PositionWithHistory curPositionAndMoves, List
1 gameMoveHistory, SearchLimit searchLimit, MCTSProgressCallback callback, Boolean verbose) in F:\Ceres\src\Ceres.Features\GameEngines\GameEngineCeresInProcess.cs:line 280
at Ceres.Features.GameEngines.GameEngineCeresInProcess.DoSearch(PositionWithHistory curPositionAndMoves, SearchLimit searchLimit, List1 gameMoveHistory, ProgressCallback callback, Boolean verbose) in F:\Ceres\src\Ceres.Features\GameEngines\GameEngineCeresInProcess.cs:line 202 at Ceres.Chess.GameEngines.GameEngine.Search(PositionWithHistory curPositionAndMoves, SearchLimit searchLimit, List
1 gameMoveHistory, ProgressCallback callback, Boolean verbose) in F:\Ceres\src\Ceres.Chess\GameEngines\GameEngine.cs:line 96
at Ceres.Features.UCI.UCIManager.RunSearch(SearchLimit searchLimit) in F:\Ceres\src\Ceres.Features\UCI\UCIManager.cs:line 525
at Ceres.Features.UCI.UCIManager.<>c__DisplayClass23_0.
F:\Ceres\artifacts\release\net5.0> not works with command go infinite in my card gtx1060
Unfortunately Ceres currently requires 2x the memory of LC0, and will not run large searches (over a few thousand nodes) on GPUs with small amounts of memory and big networks. For now, it is suggested to use a small network (such as 703810 or maybe 42767). A separate issue will be created to log possible progress on reducing memory consumption (or at least giving a better error message!).
Ceres user settings loaded from file Ceres.json Network evaluation configured to use:
Entering UCI command processing mode. go Unhandled exception. System.Exception: Network 66740 not registered via Register or discoverable via directories specified via NNWeightsFilesLC0.RegisterDirectory method. at Ceres.Chess.NNFiles.NNWeightsFiles.LookupNetworkFile(String netWeightsID, Boolean throwExceptionIfMissing) at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.Singleton(NNEvaluatorNetDef netDef, NNEvaluatorDeviceDef deviceDef) at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.DoBuildEvaluator(NNEvaluatorDef def) at Ceres.Chess.NNEvaluators.NNEvaluatorFactory.BuildEvaluator(NNEvaluatorDef def) at Ceres.MCTS.Params.NNEvaluatorSet.MakeEvaluator() at Ceres.MCTS.Params.NNEvaluatorSet.get_Evaluator1() at Ceres.MCTS.Search.MCTSSearchFlow..ctor(MCTSManager manager, MCTSIterator context) at Ceres.MCTS.Iteration.MCTSManager.DoSearch(SearchLimit searchLimit, MCTSProgressCallback progressCallback) at Ceres.MCTS.Iteration.MCTSManager.Search(MCTSManager manager, Boolean verbose, MCTSProgressCallback progressCallback, Boolean possiblyUsePositionCache) at Ceres.MCTS.Iteration.MCTSLaunch.Search(NNEvaluatorSet nnEvaluators, ParamsSelect paramsSelect, ParamsSearch paramsSearch, IManagerGameLimit timeManager, ParamsSearchExecutionModifier paramsSearchExecutionPostprocessor, MCTSIterator reuseOtherContextForEvaluatedNodes, PositionWithHistory priorMoves, SearchLimit searchLimit, Boolean verbose, DateTime startTime, List
1 gameMoveHistory, MCTSProgressCallback progressCallback, Boolean possiblyUsePositionCache, Boolean isFirstMoveOfGame) at Ceres.Features.GameEngines.GameEngineCeresInProcess.RunSearchPossiblyTreeReuse(MCTSIterator reuseOtherContextForEvaluatedNodes, PositionWithHistory curPositionAndMoves, List
1 gameMoveHistory, SearchLimit searchLimit, MCTSProgressCallback callback, Boolean verbose) at Ceres.Features.GameEngines.GameEngineCeresInProcess.DoSearch(PositionWithHistory curPositionAndMoves, SearchLimit searchLimit, List1 gameMoveHistory, ProgressCallback callback, Boolean verbose) at Ceres.Chess.GameEngines.GameEngine.Search(PositionWithHistory curPositionAndMoves, SearchLimit searchLimit, List
1 gameMoveHistory, ProgressCallback callback, Boolean verbose) at Ceres.Chess.GameEngines.GameEngine.Warmup() at Ceres.Features.UCI.UCIManager.InitializeEngineIfNeeded() at Ceres.Features.UCI.UCIManager.PlayUCI() at Ceres.Commands.DispatchCommands.LaunchUCI(String keyValueArgs, String fen) at Ceres.Commands.DispatchCommands.ProcessCommand(String cmd) at Ceres.Program.Main(String[] args)F:\ceres>