Package Details: lc0 0.30.0-1

Git Clone URL: https://aur.archlinux.org/lc0.git (read-only, click to copy)
Package Base: lc0
Description: UCI-compliant chess engine designed to play chess via neural network, specifically those of the LeelaChessZero project.
Upstream URL: https://lczero.org/
Keywords: chess engine lc0 lczero leela neural-network uci
Licenses: GPL3
Submitter: ivanmlerner
Maintainer: ivanmlerner
Last Packager: ivanmlerner
Votes: 5
Popularity: 0.000108
First Submitted: 2019-08-04 07:47 (UTC)
Last Updated: 2023-09-10 20:20 (UTC)

Pinned Comments

ivanmlerner commented on 2019-08-04 18:25 (UTC) (edited on 2023-09-10 20:23 (UTC) by ivanmlerner)

At least one backend is needed. The most common are listed as optional dependencies.

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

holyArch commented on 2022-12-19 16:40 (UTC)

@ivanmlerner Only now I've read your comment about lc0 not working with openblas from Community.

ivanmlerner commented on 2022-12-16 01:42 (UTC)

@holyArch What package are you using for openblas?

holyArch commented on 2022-12-14 18:37 (UTC) (edited on 2022-12-14 18:42 (UTC) by holyArch)


(1/1) Arming ConditionNeedsUpdate...
==> Making package: lc0 0.29.0-1
==> Retrieving sources...
  -> Found lc0
  -> Downloading lc0-0.29.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  562k    0  562k    0     0   343k      0 --:--:--  0:00:01 --:--:-- 1428k
  -> Downloading weights_hanse-69722-vf2.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  130M  100  130M    0     0  8938k      0  0:00:14  0:00:14 --:--:-- 11.0M
==> Validating source files with sha256sums...
    lc0 ... Passed
    lc0-0.29.0.tar.gz ... Passed
    weights_hanse-69722-vf2.gz ... Passed
 -> meson not satisfied, flushing install queue
==> Making package: lc0 0.29.0-1
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found lc0
  -> Found lc0-0.29.0.tar.gz
  -> Found weights_hanse-69722-vf2.gz
==> Validating source files with sha256sums...
    lc0 ... Passed
    lc0-0.29.0.tar.gz ... Passed
    weights_hanse-69722-vf2.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting lc0-0.29.0.tar.gz with bsdtar
  -> Extracting weights_hanse-69722-vf2.gz with gzip
==> Starting prepare()...
Cloning into 'lczero-common'...
remote: Enumerating objects: 165, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 165 (delta 5), reused 14 (delta 3), pack-reused 140
Receiving objects: 100% (165/165), 32.70 KiB | 697.00 KiB/s, done.
Resolving deltas: 100% (49/49), done.
==> Sources are ready.
==> Making package: lc0 0.29.0-1
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
~/.cache/yay/lc0/src/lc0-0.29.0 ~/.cache/yay/lc0/src/lc0-0.29.0
The Meson build system
Version: 0.64.1
Source dir: /home/holyarch/.cache/yay/lc0/src/lc0-0.29.0
Build dir: /home/holyarch/.cache/yay/lc0/src/lc0-0.29.0/build/release
Build type: native build
Project name: lc0
Project version: undefined
C++ compiler for the host machine: c++ (gcc 12.2.0 "c++ (GCC) 12.2.0")
C++ linker for the host machine: c++ ld.bfd 2.39.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Has header "optional" : YES 
Has header "string_view" : YES 
Has header "charconv" : YES 
Compiler for C++ supports arguments -march=native: YES 
Program scripts/compile_proto.py found: YES (/home/holyarch/.cache/yay/lc0/src/lc0-0.29.0/scripts/compile_proto.py)
Program git found: YES (/usr/bin/git)
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300
Message: Using build identifier "git.3e0a33b".
Configuring build_id.h using configuration
Run-time dependency threads found: YES
Library dl found: YES
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Found CMake: /usr/bin/cmake (3.25.1)
Run-time dependency tensorflow_cc found: NO (tried pkgconfig and cmake)
Run-time dependency accelerate found: NO (tried pkgconfig and cmake)
Library mkl_rt found: NO
Library mklml found: NO
Library dnnl found: NO
Library openblas.dll found: NO
Library openblas found: YES
Has header "openblas_config.h" : YES 
Run-time dependency eigen3 found: YES 3.4.0
Program ispc found: NO
Library OpenCL found: YES
Run-time dependency opencl found: NO 
Has header "CL/opencl.h" : YES 
Library cublas found: NO
Library cudnn found: NO
Library cudart found: NO
Program nvcc /usr/local/cuda/bin/nvcc /opt/cuda/bin/nvcc found: NO
Run-time dependency appleframeworks found: NO (tried framework)
Run-time dependency zlib found: YES 1.2.13
WARNING: find_library('libatomic') starting in "lib" only works by accident and is not portable
Library libatomic found: YES
Run-time dependency GTest found: YES 1.12.1
Build targets in project: 8

lc0 undefined

  User defined options
    buildtype: release
    prefix   : /usr/local

Found ninja-1.11.1 at /usr/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
[70/164] Compiling C++ object lc0.p/src_neural_opencl_network_opencl.cc.o
In file included from /usr/include/CL/cl.h:20,
                 from /usr/include/CL/opencl.h:24,
                 from ../../third_party/cl2.hpp:506,
                 from ../../src/neural/opencl/OpenCL.h:39,
                 from ../../src/neural/opencl/network_opencl.cc:28:
/usr/include/CL/cl_version.h:22:104: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |                                                                                                        ^
[72/164] Compiling C++ object lc0.p/src_neural_opencl_OpenCL.cc.o
In file included from /usr/include/CL/cl.h:20,
                 from /usr/include/CL/opencl.h:24,
                 from ../../third_party/cl2.hpp:506,
                 from ../../src/neural/opencl/OpenCL.h:39,
                 from ../../src/neural/opencl/OpenCL.cc:35:
/usr/include/CL/cl_version.h:22:104: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |                                                                                                        ^
[75/164] Compiling C++ object lc0.p/src_neural_opencl_OpenCLTuner.cc.o
In file included from /usr/include/CL/cl.h:20,
                 from /usr/include/CL/opencl.h:24,
                 from ../../third_party/cl2.hpp:506,
                 from ../../src/neural/opencl/OpenCL.h:39,
                 from ../../src/neural/opencl/OpenCLTuner.h:29,
                 from ../../src/neural/opencl/OpenCLTuner.cc:22:
/usr/include/CL/cl_version.h:22:104: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |                                                                                                        ^
[76/164] Compiling C++ object lc0.p/src_neural_opencl_OpenCLBuffers.cc.o
In file included from /usr/include/CL/cl.h:20,
                 from /usr/include/CL/opencl.h:24,
                 from ../../third_party/cl2.hpp:506,
                 from ../../src/neural/opencl/OpenCL.h:39,
                 from ../../src/neural/opencl/OpenCLBuffers.h:37,
                 from ../../src/neural/opencl/OpenCLBuffers.cc:22:
/usr/include/CL/cl_version.h:22:104: note: ‘#pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)’
   22 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
      |                                                                                                        ^
[94/164] Linking target lc0
FAILED: lc0 
c++  -o lc0 lc0.p/src_main.cc.o lc0.p/src_utils_protomessage.cc.o lc0.p/src_benchmark_backendbench.cc.o lc0.p/src_benchmark_benchmark.cc.o lc0.p/src_chess_bitboard.cc.o lc0.p/src_chess_board.cc.o lc0.p/src_chess_position.cc.o lc0.p/src_chess_uciloop.cc.o lc0.p/src_engine.cc.o lc0.p/src_lc0ctl_describenet.cc.o lc0.p/src_lc0ctl_leela2onnx.cc.o lc0.p/src_lc0ctl_onnx2leela.cc.o lc0.p/src_mcts_node.cc.o lc0.p/src_mcts_params.cc.o lc0.p/src_mcts_search.cc.o lc0.p/src_mcts_stoppers_alphazero.cc.o lc0.p/src_mcts_stoppers_common.cc.o lc0.p/src_mcts_stoppers_factory.cc.o lc0.p/src_mcts_stoppers_legacy.cc.o lc0.p/src_mcts_stoppers_simple.cc.o lc0.p/src_mcts_stoppers_smooth.cc.o lc0.p/src_mcts_stoppers_stoppers.cc.o lc0.p/src_mcts_stoppers_timemgr.cc.o lc0.p/src_neural_cache.cc.o lc0.p/src_neural_decoder.cc.o lc0.p/src_neural_encoder.cc.o lc0.p/src_neural_factory.cc.o lc0.p/src_neural_loader.cc.o lc0.p/src_neural_network_check.cc.o lc0.p/src_neural_network_demux.cc.o lc0.p/src_neural_network_legacy.cc.o lc0.p/src_neural_network_mux.cc.o lc0.p/src_neural_network_random.cc.o lc0.p/src_neural_network_record.cc.o lc0.p/src_neural_network_rr.cc.o lc0.p/src_neural_network_trivial.cc.o lc0.p/src_neural_onnx_adapters.cc.o lc0.p/src_neural_onnx_builder.cc.o lc0.p/src_neural_onnx_converter.cc.o lc0.p/src_selfplay_game.cc.o lc0.p/src_selfplay_loop.cc.o lc0.p/src_selfplay_tournament.cc.o lc0.p/src_syzygy_syzygy.cc.o lc0.p/src_trainingdata_reader.cc.o lc0.p/src_trainingdata_trainingdata.cc.o lc0.p/src_trainingdata_writer.cc.o lc0.p/src_utils_commandline.cc.o lc0.p/src_utils_configfile.cc.o lc0.p/src_utils_esc_codes.cc.o lc0.p/src_utils_files.cc.o lc0.p/src_utils_histogram.cc.o lc0.p/src_utils_logging.cc.o lc0.p/src_utils_numa.cc.o lc0.p/src_utils_optionsdict.cc.o lc0.p/src_utils_optionsparser.cc.o lc0.p/src_utils_random.cc.o lc0.p/src_utils_string.cc.o lc0.p/src_utils_weights_adapter.cc.o lc0.p/src_utils_fp16_utils.cc.o lc0.p/src_version.cc.o lc0.p/src_utils_filesystem.posix.cc.o lc0.p/src_neural_blas_convolution1.cc.o lc0.p/src_neural_blas_fully_connected_layer.cc.o lc0.p/src_neural_blas_se_unit.cc.o lc0.p/src_neural_blas_network_blas.cc.o lc0.p/src_neural_blas_winograd_convolution3.cc.o lc0.p/src_neural_opencl_network_opencl.cc.o lc0.p/src_neural_opencl_OpenCL.cc.o lc0.p/src_neural_opencl_OpenCLTuner.cc.o lc0.p/src_neural_opencl_OpenCLBuffers.cc.o lc0.p/src_neural_shared_activation.cc.o lc0.p/src_neural_shared_winograd_filter.cc.o -flto -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -pthread -Wl,--start-group /usr/lib/libopenblas.so /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/libOpenCL.so /usr/lib/libz.so /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib/libatomic.so -Wl,--end-group
/usr/bin/ld: /tmp/ccbRjxOW.ltrans14.ltrans.o: in function `lczero::Convolution1<false>::Forward(unsigned long, unsigned long, unsigned long, float const*, float const*, float*)':
<artificial>:(.text+0x2141): undefined reference to `cblas_sgemm'
/usr/bin/ld: /tmp/ccbRjxOW.ltrans14.ltrans.o: in function `lczero::WinogradConvolution3<false>::Forward(unsigned long, unsigned long, unsigned long, float const*, float const*, float*)':
<artificial>:(.text+0x228b): undefined reference to `cblas_sgemm'
/usr/bin/ld: /tmp/ccbRjxOW.ltrans14.ltrans.o: in function `lczero::FullyConnectedLayer<false>::Forward1D(unsigned long, unsigned long, unsigned long, float const*, float const*, float const*, lczero::ActivationFunction, float*)':
<artificial>:(.text+0x287e): undefined reference to `cblas_sgemm'
/usr/bin/ld: <artificial>:(.text+0x28cc): undefined reference to `cblas_sgemv'
/usr/bin/ld: /tmp/ccbRjxOW.ltrans14.ltrans.o: in function `lczero::(anonymous namespace)::BlasComputation<false>::ComputeBlocking()':
<artificial>:(.text+0x7854): undefined reference to `cblas_sdot'
/usr/bin/ld: <artificial>:(.text+0x80bd): undefined reference to `cblas_sgemm'
/usr/bin/ld: <artificial>:(.text+0x8244): undefined reference to `cblas_sgemm'
/usr/bin/ld: <artificial>:(.text+0x8a38): undefined reference to `cblas_sgemm'
collect2: error: ld returned 1 exit status
[96/164] Compiling C++ object liblc0_lib.so.p/src_mcts_stoppers_simple.cc.o
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...

mrzeznicki commented on 2022-11-15 23:06 (UTC)

There is one more place where /bin/sh shebang is used incorrectly. It's lc0 (pushd does not need to work under /bin/sh - it's bash-ism). So perhaps lc0 should directly use #!/bin/bash

ivanmlerner commented on 2022-11-15 15:52 (UTC) (edited on 2022-11-15 16:05 (UTC) by ivanmlerner)

@tdtooke You don't need to tweak the build to use other weights files, you can just remove the default one and place yours on /usr/lib/lc0 or if you use multiple weights files you can select what you want to use in lc0.config as explained in lc0 --help or directly in your UCI interface. Yeah, I believe it is normal. Picking the best network is not about picking the biggest one. Such big networks should only be used for long analysis with top hardware. Here they explain how to choose the proper network for your situation.

mrzeznicki commented on 2022-11-15 09:25 (UTC)

@ivanmlerner Yes, thanks. That really helps for people who don't have bash as sh, like me. Thanks!

ivanmlerner commented on 2022-11-14 20:31 (UTC)

@mrzeznicki I changed the PKGBUILD according to your suggestion, is that what you meant?

mrzeznicki commented on 2022-10-15 11:12 (UTC)

Does this work for you with the latest NVIDIA drivers 520.56.06? I am getting Error building OpenCL kernels - after downgrading to 515.76 it works again.

tdtooke commented on 2022-10-14 09:23 (UTC)

I usually use Dragon or Stockfish and recently decided to give this one a go. I tweaked your build a little to download a more beefy weights file. My question is, with the larger networks is it normal for an analysis to take 'literally' all night long? Other than the ridiculous amount of time it takes to do an analysis, on my build anyways, I can say that my CUDA build does everything it's supposed to do.