official-pikafish / Pikafish

UCI xiangqi engine
http://pikafish.org
GNU General Public License v3.0
867 stars 162 forks source link

Unable to load nnue normally, even if option is set #29

Closed ousc closed 1 year ago

ousc commented 1 year ago

Describe the issue

我已经把pikafish.nnue文件放在与可执行文件同一目录下,而且没有修改过代码中的任何配置信息,打包完成后运行bench就会提示不能正确找到pikafish.nnue文件,实际上经过调试,我发现默认情况下currentEvalFileName一直为None,但是setoption name EvalFile value path/to/*.nnue也会直接崩溃,我在macos和windows两台电脑上都遇到了同样的问题。是不是nnue文件有问题,请问这个文件需要与代码的版本对应吗?以下是在不设置option情况下的报错。

I have placed the pikafish.nnue file in the same directory as the executable file, and have not modified any configuration information in the code. After the packaging is completed, running the bench will prompt that the pikafish.nnue file cannot be found correctly. In fact, after debugging, I It is found that currentEvalFileName is always None by default, but setoption name EvalFile value path/to/*.nnue will also crash directly. I have encountered the same problem on both macos and windows computers. Is there a problem with the nnue file? Does this file need to correspond to the version of the code? The following is the error reported without setting the option.

>make -j profile-build ARCH=x86-64-avx512
>make -j strip profile-build ARCH=x86-64-avx512

Position: 1/26 (rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR w - - 0 1)
info string ERROR: Network evaluation parameters compatible with the engine must be available.
info string ERROR: The network file pikafish.nnue was not loaded successfully.
info string ERROR: The UCI option EvalFile might need to specify the full path, including the directory name, to the network file.
info string ERROR: The engine will be terminated now.

这是我的编译相关信息。 This is my compilation related information.

Compiled by g++ (GNUC) 12.2.0 on MinGW64
Compilation settings include:  64bit SSE41 SSSE3 SSE2 POPCNT
__VERSION__ macro expands to: 12.2.0

Expected behavior

Can load nnue normally without crashing

Steps to reproduce

>make -j profile-build ARCH=x86-64-avx512
>make -j strip profile-build ARCH=x86-64-avx512

Anything else?

No response

Operating system

All

Pikafish version

5d0cd46

ousc commented 1 year ago

以及

Compiled by clang++ 13.1.6 on Apple Compilation settings include: 64bit SSE41 SSSE3 SSE2 POPCNT VERSION macro expands to: Apple LLVM 13.1.6 (clang-1316.0.21.2.5)

PikaCat-OuO commented 1 year ago

do you use this nnue (https://github.com/official-pikafish/Pikafish/releases/tag/Pikafish-2022-10-22) with the that code? NNUE architecture have been updated many times during each release.

ousc commented 1 year ago

Thank you for your reply, does this mean that I should try to run the code before the last nnue release to compile successfully?

ousc commented 1 year ago

do you use this nnue (https://github.com/official-pikafish/Pikafish/releases/tag/Pikafish-2022-10-22) with the that code? NNUE architecture have been updated many times during each release.

Maybe I should try to run the dec 26, 2022 code with the nnue released that day?

PikaCat-OuO commented 1 year ago

emmm, the version you gave is

image

which is the code on 2022-10-22, so I give you the exact link to the nnue at that time that can be loaded by that code.

ousc commented 1 year ago

so I give you the exact link to the nnue at that time that can be loaded by that code.

thanks!