[Ethereum] Getting weird OpenCL error messages and a 0 H/s benchmark result when mining. What could be wrong

ethminermining

I am trying to mine Ethereum using geth and ethminer using a single AMD Radeon HD 7850 with 2 GB of memory on Ubuntu 16.04. I installed the latest recommended driver, ran geth --maxpeers 0 (to avoid syncing with the blockchain) and then tried to benchmark my setup using ethminer -G -M. I get a few possible OpenCL error messages when trial 1 is beginning, then that phase ends with a hashrate of 0, same for trial 2, 3, 4 and 5. After the fifth trial, the program just keeps running, but nothing is happening. But have a look for yourself:

$ ethminer -G -M
[OPENCL]:Found suitable OpenCL device [Pitcairn] with 1692704768 bytes of GPU memory
  ◇  23:12:24.160|ethminer  #00004000…
Benchmarking on platform: { "platform": "AMD Accelerated Parallel Processing", "device": "Pitcairn", "version": "OpenCL 1.2 AMD-APP (2348.3)" }
Preparing DAG...
Warming up...
  ℹ  23:12:24.160|gpuminer0  workLoop 0 #00000000… #00000000…
  ℹ  23:12:24.160|gpuminer0  Initialising miner...
Trial 1... [OPENCL]:Using platform: AMD Accelerated Parallel Processing
[OPENCL]:Using device: Pitcairn(OpenCL 1.2 AMD-APP (2348.3))
[OPENCL]:clCreateCommandQueue(-6)
[OPENCL]:clEnqueueWriteBuffer(-36)
0
Trial 2... 0
Trial 3... 0
Trial 4... 0
Trial 5... 0

I tried reinstalling the graphics driver and ethminer. Mining without the -G parameter works just fine, but is way too slow, of course. I searched for people having the same problem and there are a few, but they didn't find any solution or the thread just died. I hope someone here can help!

Best Answer

You can set these environment variables:

export GPU_MAX_HEAP_SIZE=100

export GPU_SINGLE_ALLOC_PERCENT=100

export GPU_FORCE_64BIT_PTR=1

export GPU_USE_SYNC_OBJECTS=1

export GPU_MAX_ALLOC_PERCENT=100

then start ethminer.

Related Topic