Not logged inRybka Chess Community Forum
Up Topic The Rybka Lounge / Computer Chess / Lc0 0.25.1 (cuda & blas) on Ubuntu 19.10
- - By MrKris (***) Date 2020-06-21 23:57
Official downloads and instructions
https://github.com/LeelaChessZero/lc0

instal lc0 on ubutu 19.10 - my method for 0.23 & 0.24.1
http://rybkaforum.net/cgi-bin/rybkaforum/topic_show.pl?pid=585031;hl=Cuda
Bold = terminal commands
Italics = terminal output (response)

Preliminary:

sudo apt update          
apt list --upgradable    
sudo apt upgrade -y
sudo apt autoremove


-Instal libopenblas-dev (since I did not do before), for cpu/blas version:

sudo apt-get install -y libopenblas-dev

Renamed old (0.24.1) lc0 folder to lc0.0.24.1--okay and moved to new folder Pre-trash.
--To ignore building a .git versioning on my machine.

-Download using git:

git clone -b release/0.25 --recurse-submodules https://github.com/LeelaChessZero/lc0.git

--New lc0 folder now in Home *.

-New for 0.25.1 :

sudo apt install python3-pip

-New for 0.25.1 :

pip3 install meson --user
Requirement already satisfied: meson in /usr/lib/python3/dist-packages (0.51.2)

-Change directory to new lc0 folder in Home * :

cd lc0


-g++ 7 already installed for 0.24.1, execute build command with Cuda 10 fix (leaving Ubuntu default gcc 9, is >= 8)
--note that the official instructions mean the below about g++7:

CC=clang-6.0 CXX=clang++-6.0 INSTALL_PREFIX=~/.local ./build.sh -Dnvcc_ccbin=g++-7
meson.build:17:0: ERROR: Meson version is 0.51.2 but project requires >=0.52

-So I downloaded the below .deb file <<**, right-clicked its icon in Downloads, selected Open with Software Installer.

--Next Ubuntu Meson (Focal Fossa=Ubuntu 20.04, Eoan Ermine= my 19.10)
https://launchpad.net/ubuntu/+source/meson
The Focal Fossa (current stable release)
Meson trunk series
0.53.2-2ubuntu2   release (universe)   2020-03-03
Publishing details
    Created on 2020-03-03 by Ubuntu Archive Auto-Sync
    Published on 2020-03-03
Changelog
meson (0.53.2-2ubuntu2) focal; urgency=medium
    Skip test cross on s390x, because arm toolchain is not available there.
-- Gianfranco Costamagna <email address hidden>  Tue, 03 Mar 2020 08:59:51 +0100
...

meson_0.53.2-2ubuntu2_all.deb (367.1 KiB)   <<**
...

- Then re-ran the build command:

CC=clang-6.0 CXX=clang++-6.0 INSTALL_PREFIX=~/.local ./build.sh -Dnvcc_ccbin=g++-7

-I ran the new lc0 (a net in the folder previously) :

cd
cd .local/bin
lco
       _
|   _ | |
|_ |_ |_| v0.25.1+git.69105b4 built Jun 21 2020
go nodes 100000
Found pb network file: ./net-42850.pb.gz
Creating backend [cudnn-auto]...
Switching to [cudnn-fp16]...
CUDA Runtime version: 10.0.0
Cudnn version: 7.6.5
Latest version of CUDA supported by the driver: 10.2.0
GPU: GeForce RTX 2060
GPU memory: 5.78766 Gb
GPU clock frequency: 1680 MHz
GPU compute capability: 7.5
info depth 1 seldepth 2 time 3135 nodes 2 score cp 15 nps 250 tbhits 0 pv e2e4 e7e5
...
info depth 18 seldepth 52 time 6250 nodes 52699 score cp 11 nps 16879 tbhits 0 pv e2e4 e7e5 g1f3 b8c6 f1b5 g8f6 e1g1 f6e4 d2d4 e4d6 b5c6 d7c6 d4e5 d6f5 d1d8 e8d8 h2h3 f8e7 b1c3 h7h5 c1f4 f5h4 f3h4 e7h4 a1d1 d8e8 c3e2 c6c5 c2c4 c8f5 b2b3 a8d8 f2f3 b7b6 g2g3 h4e7 g1g2 g7g5 f4c1 f5d3 f1e1 d3e2
bestmove e2e4 ponder e7e5

       _
|   _ | |
|_ |_ |_| v0.25.1+git.69105b4 built Jun 21 2020
setoption name Backend value blas
setoption name Threads value 16
go nodes 1000
Found pb network file: ./net-42850.pb.gz
Creating backend [blas]...
BLAS vendor: OpenBLAS.
OpenBLAS [OpenBLAS 0.3.7 NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Zen MAX_THREADS=64].
OpenBLAS found 16 Zen core(s).
OpenBLAS using 1 core(s) for this backend.
BLAS max batch size is 256.
info depth 1 seldepth 2 time 2258 nodes 2 score cp 15 nps 1 tbhits 0 pv e2e4 e7e5
...
info depth 7 seldepth 18 time 34671 nodes 670 score cp 12 nps 19 tbhits 0 pv e2e4 e7e5 g1f3 b8c6 f1c4 f8c5 e1g1 g8f6 d2d3 d7d6 c2c3 a7a6 f1e1 c5a7 a2a4
bestmove e2e4 ponder e7e5
Parent - By MrKris (***) Date 2020-06-22 00:05
The alternative for me was to upgrade my Ubuntu 19.10 to the current 20.04 to get Ubuntu's latest Meson.

However I had followed the official Lc0's "... If you don't know what to do, only install cuda-10-0. ..." but Ubuntu did not like that.

If I upgraded to Ubuntu 20.04 (instead of just the Meson above) I would have had to start over with Cuda etc. (all of https://github.com/LeelaChessZero/lc0 ) because Ubuntu first wanted to remove it.

So I cancelled the upgrade and did the above instead.
Up Topic The Rybka Lounge / Computer Chess / Lc0 0.25.1 (cuda & blas) on Ubuntu 19.10

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill