【メモ】 Ubuntu 16.04 に nheqminer をインストールして zcash を掘る #仮想通貨 #GPU

前回の CUDA インストールに続き nheqminer のインストールして zcash を掘ります。
基本的に公式ドキュメントの手順でうまく行きますが細かいところがコピペでは完結しなかった気がします。

[bash]$ git clone https://github.com/nicehash/nheqminer.git

$ export CUDA_CUDART_LIBRARY="/usr/local/cuda/lib64/libcudart.so"

$ cd nheqminer/cpu_xenoncat/asm_linux

$ chmod 774 ./fasm

$ sh assemble.sh

$ cd ../../../

$ mkdir build && cd build

$ cmake -DCUDA_CUDART_LIBRARY=CUDA_CUDART_LIBRARY ../nheqminer/

$ make -j $(nproc)[/bash]

ここまでエラー無く完走すればビルドは完了。
後は自分の環境にあわせてオプションを与えて実行してあげればよい。

[bash]$ ./nheqminer -h

==================== http://www.nicehash.com ====================
Equihash CPU&GPU Miner for NiceHash v0.5c
Thanks to Zcash developers for providing base of the code.
Special thanks to tromp, xenoncat and djeZo for providing
optimized CPU and CUDA equihash solvers.
==================== http://www.nicehash.com ====================

Parameters:
-h Print this help and quit
-l [location] Stratum server:port
-u [username] Username (bitcoinaddress)
-a [port] Local API port (default: 0 = do not bind)
-d [level] Debug print level (0 = print all, 5 = fatal only, default: 2)
-b [hashes] Run in benchmark mode (default: 200 iterations)

CPU settings
-t [num_thrds] Number of CPU threads
-e [ext] Force CPU ext (0 = SSE2, 1 = AVX, 2 = AVX2)

NVIDIA CUDA settings
-ci CUDA info
-cv [ver] Set CUDA solver (0 = djeZo, 1 = tromp)
-cd [devices] Enable CUDA mining on spec. devices
-cb [blocks] Number of blocks
-ct [tpb] Number of threads per block
Example: -cd 0 2 -cb 12 16 -ct 64 128[/bash]

自分の場合は bitcoin でも有名な slushpool でプールマイニングをしているので

    -l でプールを指定
    -u でプールの ID と worker 名
    -t で CPU のスレッド数
    -cd でビデオカード(NVIDIA)の 0 番 ※ -od

を指定して実行した。

[bash]$ ./nheqminer -l zec.slushpool.com:4444 -u [USERID].worker1 -t 4 -cd 0

==================== http://www.nicehash.com ====================
Equihash CPU&GPU Miner for NiceHash v0.5c
Thanks to Zcash developers for providing base of the code.
Special thanks to tromp, xenoncat and djeZo for providing
optimized CPU and CUDA equihash solvers.
==================== http://www.nicehash.com ====================

Setting log level to 2
[16:13:02][0x00007f11dc23f740] Using SSE2: YES
[16:13:02][0x00007f11dc23f740] Using AVX: YES
[16:13:02][0x00007f11dc23f740] Using AVX2: NO
[16:13:03][0x00007f11d3970700] stratum | Starting miner
[16:13:03][0x00007f11d3970700] stratum | Connecting to stratum server zec.slushpool.com:4444
[16:13:03][0x00007f11d116b700] miner#4 | Starting thread #4 (CUDA-DJEZO) GeForce GTX 1060 3GB (#0) M=1
[16:13:03][0x00007f11d296e700] miner#1 | Starting thread #1 (CPU-XENONCAT-AVX)
[16:13:03][0x00007f11d316f700] miner#0 | Starting thread #0 (CPU-XENONCAT-AVX)
[16:13:03][0x00007f11d196c700] miner#3 | Starting thread #3 (CPU-XENONCAT-AVX)
[16:13:03][0x00007f11d216d700] miner#2 | Starting thread #2 (CPU-XENONCAT-AVX)
[16:13:03][0x00007f11d3970700] stratum | Connected!
[16:13:03][0x00007f11d3970700] stratum | Subscribed to stratum server
[16:13:03][0x00007f11d3970700] miner | Extranonce is ******
[16:13:03][0x00007f11d3970700] stratum | Target set to ******
[16:13:03][0x00007f11d3970700] stratum | Received new job #******
[16:13:03][0x00007f11d3970700] stratum | Authorized worker *******.worker1
[16:13:13][0x00007f11dc23f740] Speed [15 sec]: 115.362 I/s, 215.719 Sols/s[/bash]