Difference between revisions of "ZCash Miner: silentarmy"

From OnnoWiki
Jump to navigation Jump to search
Line 63: Line 63:
 
Download it as a ZIP from github: https://github.com/mbevand/silentarmy/archive/master.zip
 
Download it as a ZIP from github: https://github.com/mbevand/silentarmy/archive/master.zip
  
Or clone it from the command line: $ git clone https://github.com/mbevand/silentarmy.git
+
Or clone it from the command line:
 +
 
 +
cd /usr/local/src/
 +
git clone https://github.com/mbevand/silentarmy.git
  
 
Or, for Arch Linux users, get the silentarmy AUR package.
 
Or, for Arch Linux users, get the silentarmy AUR package.

Revision as of 05:04, 18 September 2017

Compilation and installation

The steps below describe how to obtain the dependencies needed by SILENTARMY, how to compile it, and how to install it.

Step 1: OpenCL

OpenCL support comes with the graphic card driver. Read the appropriate subsection below: Ubuntu 16.04 / amdgpu

  • Download the AMDGPU-PRO Driver (as of 12 Dec 2016, the latest version is 16.50).
  • Extract it: $ tar xf amdgpu-pro-16.50-362463.tar.xz
  • Install (non-root, will use sudo access automatically): $ ./amdgpu-pro-install
  • Add yourself to the video group if not already a member: $ sudo gpasswd -a $(whoami) video
  • Reboot
  • Download the AMD APP SDK (as of 27 Oct 2016, the latest version is 3.0)
  • Extract it: $ tar xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
  • Install system-wide by running as root (accept all the default options): $ sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh

Ubuntu 14.04 / fglrx

Install the official Ubuntu package for the Radeon Software Crimson Edition driver: $ sudo apt-get install fglrx (as of 30 Oct 2016, the latest version is 2:15.201-0ubuntu0.14.04.1)

  • Follow steps 5-8 above: reboot, install the AMD APP SDK...

Ubuntu 16.04 / Nvidia

  • Install the OpenCL development
sudo apt-get install nvidia-opencl-dev nvidia-361
  • Either reboot, or load the kernel driver:
sudo modprobe nvidia_361

Ubuntu 16.04 / Intel

  • Install the OpenCL headers and library:
sudo apt-get install beignet-opencl-icd
  • You must either alter the Makefile below or build silentarmy using
make OPENCL_HEADERS=/usr/lib/x86_64-linux-gnu/beignet/include/ LIBOPENCL=/usr/lib/x86_64-linux-gnu/beignet/ LDLIBS="-lcl -lrt"

Step 2: Python 3.3

SILENTARMY requires Python 3.3 or later (needed to support the use of the yield from syntax). On Ubuntu/Debian systems:

sudo apt-get install python3
  • Verify the Python version is 3.3 or later:
python3 -V

Step 3: C compiler

A C compiler is needed to compile the SILENTARMY solver binary (sa-solver):

sudo apt-get install build-essential

Step 4: Get SILENTARMY

Download it as a ZIP from github: https://github.com/mbevand/silentarmy/archive/master.zip

Or clone it from the command line:

cd /usr/local/src/
git clone https://github.com/mbevand/silentarmy.git

Or, for Arch Linux users, get the silentarmy AUR package.

Step 5: Compile and install

Compiling SILENTARMY is easy:

$ make

You may need to specify the paths to the locations of your OpenCL C headers and libOpenCL.so if the compiler does not find them, eg.:

$ make OPENCL_HEADERS=/usr/local/cuda-8.0/targets/x86_64-linux/include LIBOPENCL=/usr/local/cuda-8.0/targets/x86_64-linux/lib

Self-testing the command-line solver (solves 100 all-zero 140-byte blocks with their nonces varying from 0 to 99):

$ make test

For more testing run sa-solver --nonces 10000. It should finds 18627 solutions which is less than 1% off the theoretical expected average number of solutions of 1.88 per Equihash run at (n,k)=(200,9).

For installing, just copy silentarmy and sa-solver to the same directory.