Compiling ZEN/ZEC Equihash CPU miner `nheqminer` for VPS without AVX/AVX2 support (using TROMP-SSE2 solver)

in #zencash7 years ago (edited)

This guide assumes you can build a working nheqminer on your system already

By default, nheqminer is configured to build with XENONCAT CPU solvers for AVX/AVX2 CPU instruction sets.

If you try to run it on a VPS or other machine which does not have AVX/AVX2 instruction sets on the CPU, it will result in 0 sols/s hashing speed but report no error while running.

You may see something like the following:

[01:01:55][0x00007fe305412740] Using SSE2: YES
[01:01:55][0x00007fe305412740] Using AVX: NO
[01:01:55][0x00007fe305412740] Using AVX2: NO
[23:50:38][0x00007f4fe6871700] miner#2 | Starting thread #2 (cpu_tromp_STUB)
[23:50:38][0x00007f4fe7873700] miner#0 | Starting thread #0 (cpu_tromp_STUB)
...
[23:51:02][0x00007f4fe9111740] Speed [15 sec]: 0 I/s, 0 Sols/s
...

You need to enable TROMP CPU solver to use regular SSE2 instructions which most VPS should have

To fix this is simple. First grab nheqminer from one of the up-to-date forks:

  • git clone https://github.com/aayanl/nheqminer

follow the instructions on the github page to get it installed up until the cmake ../nheqminer part. (do not run cmake ../nheqminer yet.)

if you are in the build directory, cd into the nheqminer directory

  • cd ../nheqminer

edit CMakeLists.txt

  • nano CMakeLists.txt

Change the following options like so (set them all to OFF apart from CPU_TROMP):

cmake.png

Close and save the file

  • ctrl + x then y then enter

Now build the program.

  • cd ../build
  • cmake ../nheqminer
  • make -j $(nproc)

If all is well, the program should compile and you should have a working nheqminer

Test that the TROMP CPU solver is working by invoking the command:

  • ./nheqminer -b 30 -t X where X is the number of CPUs you want to test on

It should now benchmark the speed using CPU-TROMP-SSE2. Once finished and confirmed it is working you can go ahead and set it to mine properly on a pool.

Please note that CPU hashrates are very slow compared to GPU, and without AVX/AVX2 XENONCAT acceleration, the hashrate will be even slower, but this should solve the 0 sols/s issue experienced by various people using non-AVX VPS instances.

If this guide has helped you, consider a donation:

ZEN: znSTMxvU3AizLV9cAm4iNPT5uLoJ2wbfHy9
Private ZEN: zcK5A39UwgaufiyUVtVqTXMFQXxxCUCvicvuMxcCE9QrgBMAGW5yCQW9a5zRqwZbYBTCMhTZgyhKH3TMMHq4xwLADQvqrM3
BTC: 1EwGXrmGdiD6Xd8uPnmRufyoWowJ7qpkJ1

Coin Marketplace

STEEM 0.20
TRX 0.12
JST 0.029
BTC 61536.69
ETH 3445.53
USDT 1.00
SBD 2.50