ymgaq / AQ

A Go game engine. Download here: http://github.com/ymgaq/AQ/releases
GNU General Public License v3.0
323 stars 69 forks source link

connection failed in sabaki (Win10) #115

Closed robertoshiu closed 4 years ago

robertoshiu commented 4 years ago

Windows 10, nVidia GTX 1070, CUDA 10.2+cuDNN 7.6.5+TensorRT 7.0.0

.\AQ.exe has no error message but also no response at all when typing command in Windows PoweShell with or without Administrator role.

connection failed in sabaki gtp mode as well.

Mbr18 commented 4 years ago

Same problem here: AQ.exe does not response or return any error in Powershell or in Sabaki. So it is hard to diagnose what the problem is.

My machine: Windows 10 Home 64-bit (10.0, Build 18363) (18362.19h1_release.190318-1202) Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz NVIDIA GeForce GTX 1060 6GB (NVIDIA 445.87) Cuda Toolkit 10.2 and TensorRT 7.0.0 installed. PATH environment variable are correctly set: C:\TensorRT\TensorRT-7.0.0.11.Windows10.x86_64.cuda-10.2.cudnn7.6\TensorRT-7.0.0.11\lib C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin

I do not mind to wait for a more user-friendly release :-)

ymgaq commented 4 years ago

I did not include the installation required to run an executable file built by MSVC. Please install the following packages and try again.

Visual C++ redistributable packages for Visual Studio 2015-2019

Then run AQ.exe in Power Shell or Command Prompt to see if it responds to the 'name' or 'version' command etc.

Apart from this problem, there is an issue in Windows where sabaki's lz-analyze command fails to connect, so we are investigating the cause. Currently, use Lizzie for analysis purposes.

Mbr18 commented 4 years ago

Installed vc_redist.x64.exe but there is no difference.

The same for: A) aq.exe --version or aq.exe version B) aq.exe --name or aq.exe name No response from AQ. C) Lizzie: A) C:\Users\pp\Downloads\AQ_windows\AQ\AQ.exe AQ.exe --lizzie --weights C:\Users\pp\Downloads\AQ_windows\AQ\engine\model_cn.uf or B) C:\Users\pp\Downloads\AQ_windows\AQ\AQ.exe AQ.exe --lizzie No response in the GTP console of Lizzie.

I am open for more ideas.

ymgaq commented 4 years ago

Is it the same at the Command prompt? Also, can you tell me about whether it quits immediately after starting, or if you enter GTP commands (like name) after launching and get no response?

Usually, it responds like the image below. ("コマンドプロンプト" is Command prompt) command_example

Mbr18 commented 4 years ago

Quits immediately:

Capture160520

ymgaq commented 4 years ago

Thank you. There doesn't seem to be a problem with your environment or the way it's run. On the other hand, the program quits without some kind of system error, and I don't immediately see the cause.

The message "Configuration is loaded." is also not displayed, so there may be an error in the previous process.

In a primitive way, I prepared an executable file to debug the configuration initialization process. This is just for debugging, which exits after reading config.txt and various other initialization.

If you put this file in the AQ directory and have it run, you may be able to see where the error is occurring.

If successful, it will be as follows.

C:\Program Files\AQ>AQ_debug.exe
1. ReadConfiguration
2. InitOptions
3. GetModuleFileName
4. Parse working directory
5. Pattern::Init
6. Check config.txt path.
7. Define modes.
8. Read config.txt.
9. Read command line options.
10. Set batch size if limited.
11. Configuration loaded.
Configuration is loaded.

C:\Program Files\AQ>

AQ_debug.zip

Mbr18 commented 4 years ago

No result with AQ-debug.exe: Annotation 2020-05-16aa 202824

But when I run AQ-debug.exe from Windows explorer as administrator: Annotation 2020-05-16bb 202824

I get the following error: Annotation 2020-05-16cc 215550

ymgaq commented 4 years ago

It looks like you are having some kind of problem loading DLL files.

  1. Is the installed version of cuDNN 7.6.5? With other versions, it cannot call TensorRT library correctly and it gives an error of the entry point.

  2. Try copying the following DLLs into the AQ directory and see if the problem is reproduced.

from TensorRT-7.0.0.11\lib\
  myelin64_1.dll
  nvinfer.dll
  nvinfer_plugin.dll
  nvonnxparser.dll
  nvparsers.dll
  nvserialize.dll

from CUDA\v10.2\bin\ 
  cublas64_10.dll
  cublasLt64_10.dll
  cudart64_102.dll
  cudnn64_7.dll
  nvrtc64_102_0.dll

If these don't improve things, I'm sorry, but I don't have an idea right away.

Mbr18 commented 4 years ago

It works now in Lizzie!

Additional steps I had to do: -A) Moved the AQ folder from program/files to a other file location (in my case desktop folder) -B1) The cudnn64_7.dll was missing from Cuda\v10.2\bin. -B2) I had to manually copy cudnn64.7.dll from "cudnn-10.2-windows10-x64-v7.6.5.32.zip" to the AQ folder

Annotation 2020-05-17aa 112817 Annotation 2020-05-17bb 112817

ymgaq commented 4 years ago

I'm glad to see it's working fine. If so, it was probably because it was failing to load cudnn64_7.dll.

Mbr18 commented 4 years ago

Agree. I also think cudnn64.7.dll was the key!

robertoshiu commented 4 years ago

The problem solved after Visual C++ redistributable packages installed. Thank you.