nicehash / nheqminer

Equihash miner for NiceHash
https://www.nicehash.com
MIT License
769 stars 583 forks source link

How to build nheqminer v0.5c on Ubuntu 16.04 #355

Open messkaline opened 6 years ago

messkaline commented 6 years ago

Looks like readme is not really clear in Ubuntu section, because I've ran into some issues during build. So I've created the following instruction. Do steps under root user or use sudo to install dependencies. Quick steps are:

Get and install latest cuda repo(https://developer.nvidia.com/cuda-downloads):

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
apt-get update

Install build essential:

apt-get install cmake build-essential libboost-all-dev

Install Nvidia drivers 384.111 and Cuda SDK 8.0:

apt-get --no-install-recommends install  nvidia-384 nvidia-384-dev cuda-toolkit-8-0 libcuda1-384

Get latest nheqminer:

git clone https://github.com/nicehash/nheqminer.git

Configure and build:

cd nheqminer/cpu_xenoncat/asm_linux/
chmod +x fasm 
sh assemble.sh
cd ../../../
mkdir build && cd build
cmake -DCUDA_CUDART_LIBRARY="/usr/local/cuda-8.0/lib64/libcudart.so" ../nheqminer
make -j $(nproc)
joseortiz3 commented 6 years ago

This is a great guide you have written, incorporating all the recent discussions.

I would also add that if you have a new cuda version (9.1 in my case), you are going to have to delete #include "device_functions_decls.h" from cuda_djezo/eqcuda.hpp

Also I think the installation guide is misleading in that you don't seem to need boost 1.58 to compile. I went through a lot of trouble building boost 1.66 in a custom directory, which means that cmake needs another argument specifying -DBOOST_ROOT, or you can set export BOOST_ROOT=/path/to/custom/boost/build/ before calling cmake.

Also, I think the build directory should be relocated into the root git directory, like all the other github builds...maybe that's just aesthetic.

The hash-rates were a little disappointing after all the compilation effort. Some work needs to be done on the cuda algorithms.

ccarterc commented 6 years ago

Is it necessary to do that cpu/xenocat/asm_linux step if you only want gpu mining?