Git Product home page Git Product logo

opencl-miner's Introduction

Beam Equihash 150/5 OpenCL Miner

Copyright 2018 The Beam Team
Copyright 2018 Wilke Trei 

Usage

One Liner Examples

Linux: ./beamMiner --server <hostName>:<portNumer> --key <apiKey> --devices <deviceList>
Windows: ./beamMiner --server <hostName>:<portNumer> --key <apiKey> --devices <deviceList>

Parameters

--server

Passes the address and port of the node the miner will mine on to the miner. The server address can be an IP or any other valid server address.- For example when the node is running on the same computer and listens on port 17000 then use --server localhost:17000

--key

Pass a valid API key from "stratum.api.keys" to the miner. Required to authenticate the miner at the node

--devices (Optional)

Selects the devices to mine on. If not specified the miner will run on all devices found on the system. For example to mine on GPUs 0,1 and 3 but not number 2 use --devices 0,1,3 To list all devices that are present in the system and get their order start the miner with --devices -2 . Then all devices will be listed, but none selected for mining. The miner closes when no devices were selected for mining or all selected miner fail in the compatibility check.

--force3G (Optional)

Force the miner to use the 3G implementation even if the GPUs have 4G or more. This can resolve compatibility problems with 4G GPUs with screen attached or uncommon memory configurations like Nvidia GTX 970.

--beamHashI (Optional)

Force the miner to use the (pre fork) BeamHash I. If this is not set the miner will a) Switch between BeamHash I and BeamHash II automatically depending on the block height sended over stratum. b) Use BeamHash II in case the stratum server did not send the information required.

How to build

Windows

  1. Install Visual Studio >= 2017 with CMake support.
  2. Download and install Boost prebuilt binaries https://sourceforge.net/projects/boost/files/boost-binaries/1.68.0/boost_1_68_0-msvc-14.1-64.exe, also add BOOST_ROOT to the Environment Variables.
  3. Download and install OpenSSL prebuilt binaries https://slproweb.com/products/Win32OpenSSL.html (Win64 OpenSSL v1.1.0h for example).
  4. Download and install CUDA Toolkit https://developer.nvidia.com/cuda-downloads
  5. Add .../boost_1_68_0/lib64-msvc-14.1 to the System Path.
  6. Open project folder in Visual Studio, select your target (Release-x64 for example, if you downloaded 64bit Boost and OpenSSL) and select CMake -> Build All.
  7. Go to CMake -> Cache -> Open Cache Folder -> beam-opencl-miner (you'll find beam-opencl-miner.exe).

Linux (Ubuntu 14.04)

  1. Install gcc7 boost ssl packages.
  sudo add-apt-repository ppa:ubuntu-toolchain-r/test
  sudo apt update
  sudo apt install g++-7 libboost-all-dev libssl-dev -y
  1. Set it up so the symbolic links gcc, g++ point to the newer version:
  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
                           --slave /usr/bin/g++ g++ /usr/bin/g++-7 
  sudo update-alternatives --config gcc
  gcc --version
  g++ --version
  1. Install OpenCL
  sudo apt install ocl-icd-* opencl-headers
  1. Install latest CMake
  wget "https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.sh"
  sudo sh cmake-3.12.0-Linux-x86_64.sh --skip-license --prefix=/usr
  1. Go to beam-opencl-miner project folder and call cmake -DCMAKE_BUILD_TYPE=Release . && make -j4.
  2. You'll find beam-opencl-miner binary in bin folder.

Mac

  1. Install Brew Package Manager.
  2. Installed necessary packages using brew install openssl boost cmake command.
  3. Add export OPENSSL_ROOT_DIR="/usr/local/opt/openssl" to the Environment Variables.
  4. Go to beam-opencl-miner project folder and call cmake -DCMAKE_BUILD_TYPE=Release . && make -j4.
  5. You'll find beam-opencl-miner binary in bin folder.

Build status

Build Status

opencl-miner's People

Contributors

anatolse avatar frankcoderl avatar halogenius avatar lolliedieb avatar roman-strilets avatar vrvaderom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencl-miner's Issues

tls does not work correctly

Hi there:

I keep getting this error message when I try to read from the socket. I goggled and said it is because the client does not use https
image

2 GB AMD Cards?

I would like to know if whether there is any chance for 2 GB AMD cards to be supported in the future? Initially the miner stated 4 GB was required but I now see that even 3 GB cards are supported. So hoping 2 GB will also be supported.

Is my OpenCL miner creating solutions?

When I run my opencl miner against the beam-node from a pool, I see these verbose:

Performance: 20.67 sol/s
Submitting solution to job 133 with nonce 8fe89431aa299286
Solution for work id 133accepted
Performance: 21.53 sol/s
Submitting solution to job 133 with nonce 28e99431aa299286

But when I run my miner against my own beam-node, I see these:

New work received with id 45 at difficulty 74843008.00
Performance: 20.20 sol/s
New work received with id 46 at difficulty 74238628.00
Performance: 20.07 sol/s
Performance: 19.00 sol/s

... which is missing the Submitting solution to job... logs. Does that mean my miner+node are not mining correctly?

Is TLS working properly?

Are you sure, TLS is working correctly? I have 3 nodes. For each, generated key and cert using command:

openssl req -x509 -newkey rsa:4096 -keyout stratum.key -out stratum.crt -days 365 -nodes

It doesn't matter which one I use for miner, it can connect for any of those 3 nodes.

relocation error

I get the following error when running beam-opencl-miner on EthOS. The beamMiner binary in testnet4 worked fine in EthOS.

./beam-opencl-miner: relocation error: ./beam-opencl-miner: symbol _ZTVNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

GTX 980 TI only works at 15% performance

Platform: Windows 10
GPU: GTX 980 TI
Driver: 417.35 NVIDIA official

It can only mines at 0.7 -1.8 sol/s. theoretically it should be ~ 7 sol/s.

on TESTNET 3 of which the GUI wallet has the built-in GPU mining, it seemed to work fine. I could mine >10000 TEST BEAM per day.

gpu-z

miner

card order & Avg harshrate/ sol/s

Hello,

I have two suggested improvements:

  • Can you please add average sol/s to the miner window output?
  • AMD cards, at least on windows, are ordered differently then in other SW - it would be great if it was in same order as in other sw for easier identification and optimization of individual card performance

When miner is reporting 0.00 sol/sec after a while nothing happens -> add watchdog please

Bug description
When a GPU card stops mining (e.g. when GPU became to hot) the GPU mining doesn't resume

To Reproduce
Steps to reproduce the behaviour:

  1. Run miner
  2. Let the miner run for a while until a mining problem occurs on a GPU card that results in 0.00 sol/sec

Current behaviour
GPU stops mining after a GPU problem occurs.
Only when manually interrupting the miner and manually restarting the miner the miner resumes

If the OpenCl miner controls more than one GPU card it seems to be more vulnerable to fall back to 0.00 sol/s.
A card that stopped regularly after a while in a group of devices, does not has this behaviour when i start a separate opencl miner with the --device switch

Expected behaviour
Watchdog in miner: the miner should try to restart automatically when a mining problem occurs.

Platform and build

  • Linux
  • L(Ubuntu) 10.04 LTS
  • AMD-GPUPRO driver
  • mainnet-release and current git

Screen output

...
Performance: 8.13 sol/s 3.87 sol/s 14.73 sol/s 12.00 sol/s | Total: 38.73 sol/s 
Performance: 10.33 sol/s 4.47 sol/s 13.67 sol/s 11.47 sol/s | Total: 39.93 sol/s 
...
Performance: 0.00 sol/s 3.93 sol/s 15.13 sol/s 12.93 sol/s | Total: 32.00 sol/s 
Performance: 0.00 sol/s 2.73 sol/s 15.07 sol/s 13.40 sol/s | Total: 31.20 sol/s 
...
-> COMMENT: the first GPU card will never recover and stays on 0.00 sol/s ,
    only when manually stop/start the miner, the first GPU will start mining again

Build failed on MacOS

after I execute "cmake -DCMAKE_BUILD_TYPE=Release` . && make -j4", these pops up.

-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Boost version: 1.67.0
-- Found the following Boost libraries:
-- system
-- date_time
-- thread
-- chrono
-- atomic
-- Found OpenSSL: /usr/local/opt/openssl/lib/libcrypto.a (found version "1.0.2q")
-- Using OpenSSL 1.0.2q
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - not found
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - found
-- Found OpenCL: /System/Library/Frameworks/OpenCL.framework (found version "1.2")
-- Using OpenCL 1.2
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mac/desktop/opencl-miner
Scanning dependencies of target beam-opencl-miner
[ 25%] Building CXX object CMakeFiles/beam-opencl-miner.dir/beamStratum.cpp.o
[ 25%] Building CXX object CMakeFiles/beam-opencl-miner.dir/clHost.cpp.o
[ 37%] Building C object CMakeFiles/beam-opencl-miner.dir/crypto/sha256.c.o
[ 50%] Building CXX object CMakeFiles/beam-opencl-miner.dir/main.cpp.o
[ 62%] Building CXX object CMakeFiles/beam-opencl-miner.dir/beam/core/difficulty.cpp.o
[ 75%] Building CXX object CMakeFiles/beam-opencl-miner.dir/beam/core/uintBig.cpp.o
[ 87%] Building CXX object CMakeFiles/beam-opencl-miner.dir/beam/utility/common.cpp.o
[100%] Linking CXX executable beam-opencl-miner
clang: error: unsupported option '-static-libgcc'
make[2]: *** [beam-opencl-miner] Error 1
make[1]: *** [CMakeFiles/beam-opencl-miner.dir/all] Error 2
make: *** [all] Error 2

cmake seems working perfectly, but something went wrong in make.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.