Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

katago will not work with lizzie #633

Open
Crispy3 opened this issue Oct 7, 2019 · 22 comments
Open

katago will not work with lizzie #633

Crispy3 opened this issue Oct 7, 2019 · 22 comments

Comments

@Crispy3
Copy link

Crispy3 commented Oct 7, 2019

i do not know why but katago will not load i have let it try many times

@Crispy3
Copy link
Author

Crispy3 commented Oct 7, 2019

i am not too computer savy but i need help

@featurecat
Copy link
Owner

Ok I'll help you troubleshoot. Are you using Windows?

If so, please open file explorer, navigate to the Lizzie directory. Hold down SHIFT while right clicking in the white space, select Open Powershell Window Here.
image

Copy this: ./katago/katago gtp -model katanetwork.gz -config katago-gtp10.cfg

Right click in the Powershell window to paste, and press enter. Let it run until it is no longer printing any more text. Please let me know what it says in the window, either by taking a screenshot or copy-and-paste to this issue.

@Crispy3
Copy link
Author

Crispy3 commented Oct 8, 2019 via email

@featurecat
Copy link
Owner

Please show me the output in the powershell window when you run that command

@Crispy3
Copy link
Author

Crispy3 commented Oct 8, 2019 via email

@Crispy3
Copy link
Author

Crispy3 commented Oct 8, 2019 via email

@featurecat
Copy link
Owner

I cant see it here.

@Crispy3
Copy link
Author

Crispy3 commented Oct 8, 2019 via email

@featurecat
Copy link
Owner

please try replying directly through github instead of through email, i think email image uploading must be broken. github will work

@Crispy3
Copy link
Author

Crispy3 commented Oct 8, 2019

Capture
Capture3
Capture4
Capture2
Capture5

@featurecat
Copy link
Owner

It looks like KataGo crashed. It's not supposed to do that. The katago creator can help you. I will go ahead and create an issue in the katago github repository for you. and I'll link it here.

In the meantime, it looks like KataGo wont work on your computer. The best thing I can recommend right now is to try it on a different computer if possible until we can get a response from the Katago creator.

@Crispy3
Copy link
Author

Crispy3 commented Oct 8, 2019

ok thank you. i thought it was something i was doing wrong

@featurecat
Copy link
Owner

I created the issue there. I hope the author can help you fix the problem. In the mean time, at least Leela Zero works, right?

About your machine, I am wondering, do you know any information about the GPU you have? Is it AMD, Intel, or NVIDIA? Do you know what model it is?

@Crispy3
Copy link
Author

Crispy3 commented Oct 8, 2019

Capture6

Also i am wondering how to set up the estimate by zen feature. i do have YAZenGtp.exe and Zen.dll

@Crispy3
Copy link
Author

Crispy3 commented Oct 8, 2019

i have a lenovo x1 carbon 3rd gen i think "laptop"

@lightvector
Copy link

@Crispy3 - Intel integrated graphics is tricky. At least for some older versions, the answer unfortunately is that Intel's OpenCL drivers were buggy, with no workaround (if you search, you can find some such issues on the CLBlast github where this was determined to be the case for those particular versions of integrated graphics).

I don't know if that applies here - maybe it's not a bug in those, but something else. But having it suddenly crash and display a huge memory dump like in your screenshot isn't encouraging, I'm not really sure how I would try to debug that!

@Crispy3
Copy link
Author

Crispy3 commented Oct 9, 2019 via email

@siasio
Copy link

siasio commented Jan 12, 2020

I used to be unable to start KataGo. After selecting katago engine, it would load forever. Today I looked into the config file, namely .\katago\gtp_example.cfg. I changed numSearchThreads to 16 so that it matches nnMaxBatchSize and now KataGo works just fine! I am using Windows 10 with NVIDIA GPU. I hope this helps others as well.
EDIT: Apparently it's not about numSearchThreads

@lightvector
Copy link

lightvector commented Jan 12, 2020

@siasio - That would be extremely weird. Can you change it back and see if it goes back to failing? My guess is that numSearchThreads and nnMaxBatchSize has nothing to do with it - if so, it would be good to avoid misleading other people.

Are you using the OpenCL version, which I think is the the version that comes packed with Lizzie? I'm guessing what happened is that you finally waited long enough for it to tune itself, rather than killing it mid-tuning (in which case it would have to start over next time). On first startup, it will take a long time to configure itself and adjust to your GPU, once successful it doesn't have to do that again.

While it tunes, it will be printing out a lot of stuff that should make it very obvious that it is configuring and testing things, but Lizzie is very bad at displaying this output to the user, and will make it look like it's doing nothing and just loading forever.

Therefore, unless Lizzie is improved to display such output, I strongly recommend anyone using the OpenCL version not to run KataGo within Lizzie on the first run., Instead, run KataGo manually in the console first:
./katago benchmark -config <path to your gtp_example.cfg> -model <path to your neural net file .txt.gz>
or:
./katago tuner -model <path to your neural net file .txt.gz>

This way, you actually see if KataGo is doing things that Lizzie would hide from you and is simply testing and configuring itself, or if it genuinely has failed.

Separately, yes you should adjust numSearchThreads to whatever gives you good performance. The same "benchmark" command above will help you see what performs fastest and/or strongest.

Anyways, can you decrease numSearchThreads back to what you had it at and see if it suddenly starts failing again now? Maybe this really was the cause of it not working for you instead of the above, but that means that something strange is going on if true.

@siasio
Copy link

siasio commented Jan 12, 2020

@lightvector Thank you for your answer. You are right - it had nothing to do with the numSearchThreads. The reason must be that I've recently compiled KataGo in the way stated in your README file. As I saw it working I just checked the difference between the config files in the KataGo repo and in Lizzie which was apparently just the numSearchThreads. However, changing that was apparently not needed.

I am a bit confused because I installed KataGo with CUDA backend and Lizzie comes with OpenCL version. Here are sample lines from my log files:
gtp.log from Lizzie before installing KataGo (KataGo loading forever):
2020-01-04 22:33:16+0100: Found OpenCL Platform 0: NVIDIA CUDA (NVIDIA Corporation) (OpenCL 1.2 CUDA 10.1.120)
after installing KataGo:
2020-01-11 22:21:23+0100: Found OpenCL Platform 0: NVIDIA CUDA (NVIDIA Corporation) (OpenCL 1.2 CUDA 10.2.95)
gtp.log from running katago.exe in my command line:
2020-01-07 21:31:33+0100: Cuda backend: Found GPU GeForce GTX 1060 6GB memory 6442450944 compute capability major 6 minor 1

I wonder what made the difference. Could it be just upgrading the CUDA version from 10.1 to 10.2? Also, I don't really understand what happens here that OpenCL is using CUDA platform.

@lightvector
Copy link

Cool. So still my best guess is what made the difference is none of those. It probably was always working for you, even from the very start!

The difference is that one of the times you tried to run it in Lizzie, you finally let it run long enough to tune itself. Despite Lizzie making it appear like KataGo was hanging, it actually was never hanging (again: for other users reading this thread: because of how Lizzie masks what KataGo is doing and makes it impossible to tell the difference between true hanging versus just tuning, I recommend trying to directly run benchmark or tuner commands as in my other post in this thread above).

Anyways, now that it's tuned, it will not need to tune again in the future (unless you change GPUs or switch to a new computer or whatever). Also thanks for the one interesting detail - that CUDA itself can act as an OpenCL platform. Did not know that. The OpenCL and CUDA versions are completely separate implementations and the OpenCL version works on many more devices and hardware, but based on your output it looks like CUDA itself can "behave" like a hardware for OpenCL.

Anyways, now that it's working for you, You probably want to run the benchmark command to find a number of threads to use for good performance. You might also experiment with benchmarking the difference between OpenCL (even if it's "using CUDA") and CUDA - you might see different performance. Enjoy!

@sesbes
Copy link

sesbes commented Dec 24, 2020

Make sure that you don't already have another Lizzie window open. By mistake I opened a second one and when I try to switch to Katago it says engine is loading but nothing happens. When I closed the first window everything loaded after a few seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants