From 5990acf61cbcf36478147b3f2012c53eac91c5c9 Mon Sep 17 00:00:00 2001 From: Ethan Tira-Thompson Date: Sat, 27 May 2017 12:29:08 -0700 Subject: [PATCH 1/3] adding Makefile --- Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..447589b --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +ETH = $(shell realpath ../genoil-ethereum-master) +ETHLIBS = ethash ethash-cl ethcore devcore + +CC = g++ +CFLAGS = -Wall -g -std=c++11 -fPIC +INCLUDES = -I/usr/local/include -I$(ETH) $(shell pkg-config --cflags Qt5Network) +LFLAGS = $(foreach path,$(foreach lib,$(ETHLIBS),$(ETH)/build/lib$(lib)),-Wl,-L$(path) -Wl,-rpath,$(path)) -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib +LIBS = $(foreach lib,$(ETHLIBS),-l$(lib)) -lOpenCL -lboost_filesystem -lboost_system -lboost_thread $(shell pkg-config --libs Qt5Network) + +.ONESHELL: + +all: qtminer + +qtminer: qtminer.o main.o QtMiner.moc.o + $(CC) $(CFLAGS) -o qtminer qtminer.o main.o QtMiner.moc.o $(LFLAGS) $(LIBS) + echo '#!/bin/sh' > qtminer.sh + cat >> qtminer.sh < Date: Sat, 27 May 2017 12:29:49 -0700 Subject: [PATCH 2/3] rename qtminer.h to QtMiner.h for case sensitive file systems --- qtminer.h => QtMiner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename qtminer.h => QtMiner.h (97%) diff --git a/qtminer.h b/QtMiner.h similarity index 97% rename from qtminer.h rename to QtMiner.h index 0f5ce36..cf0a75e 100644 --- a/qtminer.h +++ b/QtMiner.h @@ -61,7 +61,7 @@ class QtMiner: public QObject unsigned m_globalWorkSizeMultiplier = ethash_cl_miner::c_defaultGlobalWorkSizeMultiplier; unsigned m_localWorkSize = ethash_cl_miner::c_defaultLocalWorkSize; - unsigned m_msPerBatch = ethash_cl_miner::c_defaultMSPerBatch; + unsigned m_msPerBatch = 0; //ethash_cl_miner::c_defaultMSPerBatch; // default value is 350MB of GPU memory for other stuff (windows system rendering, e.t.c.) From d6cc161808ef4f475ed628dac9a07ff5c95bfcf6 Mon Sep 17 00:00:00 2001 From: Ethan Tira-Thompson Date: Sat, 27 May 2017 12:30:34 -0700 Subject: [PATCH 3/3] modifications to compile against 'modern' genoil based ethminer --- qtminer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qtminer.cpp b/qtminer.cpp index 03f053f..d5b9c88 100644 --- a/qtminer.cpp +++ b/qtminer.cpp @@ -187,12 +187,13 @@ void QtMiner::startMining() { if (!EthashGPUMiner::configureGPU( m_localWorkSize, m_globalWorkSizeMultiplier, - m_msPerBatch, m_openclPlatform, m_openclDevice, m_clAllowCPU, m_extraGPUMemory, - m_currentBlock + m_currentBlock, + 0, + 0 )) exit(1); EthashGPUMiner::setNumInstances(m_miningThreads); @@ -210,7 +211,7 @@ void QtMiner::startMining() { (void)_recheckPeriod; f.setSealers(sealers); - f.start(_m); + f.start(_m,0); f.onSolutionFound([&](EthashProofOfWork::Solution sol) { cnote << "Solution found; Submitting ...";