ethereum-mining / ethminer

Ethereum miner with OpenCL, CUDA and stratum support
GNU General Public License v3.0
5.98k stars 2.29k forks source link

AMD R9 390 Benchmark 30mhs but actual running is 0 mhs #211

Closed maxlam79 closed 7 years ago

maxlam79 commented 7 years ago

Hi,

I have an AMD R9 390 with Crimson Driver ver 17.4.4 installed, using ethminer.exe v0.11. By running, the benchmark with: ethminer.exe -G --benchmark

The result shown was something like: min/mean/max: 30942726/31060244/31097388 H/s inner mean: 20721240 H/s

But when I executed it with: ethminer.exe -G -F <miner and wallet address>

It shows: Found suitable OpenCL device [Hawaii] with 8589934592 bytes of GPU memory m 22:26:21|main Getting work package... m 22:26:22|main Got work package: #35fcd73a m 22:26:22|main Mining on PoWhash #35fcd73a : 0.00MH/s [A0+0:R0+0:F0] m 22:26:23|main Mining on PoWhash #35fcd73a : 0.00MH/s [A0+0:R0+0:F0] m 22:26:25|main Mining on PoWhash #35fcd73a : 0.00MH/s [A0+0:R0+0:F0] m 22:26:26|main Mining on PoWhash #35fcd73a : 0.00MH/s [A0+0:R0+0:F0] m 22:26:27|main Mining on PoWhash #35fcd73a : 0.00MH/s [A0+0:R0+0:F0]

It is displaying 0.00MH/s

derubm commented 7 years ago

does it actually go to build a dag ?or is that the message you recieve all the time

maxlam79 commented 7 years ago

Yes, I receive this message all the time. By the way how could I verify it it builds a dag? Do educate me please. I can provide more info if needed.

derubm commented 7 years ago

you would see t in the miner´s window in the very first 30 or 40 seconds as a ongoing message. with percentage before it. after creating the dag you hashrate should be normal. ( no Dag nothing to work)

maxlam79 commented 7 years ago

Cool. I'll try this again...

nolemtempo commented 5 years ago

Hi, I'm having the same issue here for my secondary GPU (I have Vega FE also and that works just fine) When I run benchmark

ethminer 0.18.0-alpha.3-3+commit.88758f28
Build: linux/release/gnu

 i 20:47:18 ethminer Selected pool localhost:0
 i 20:47:18 ethminer Established connection to localhost:0
 i 20:47:18 ethminer Spinning up miners...
cl 20:47:18 cl-0     Using PciId : 08:00.0 gfx701 OpenCL 1.2  Memory : 4.00 GB
 i 20:47:18 cl-0     Adjusting CL work multiplier for 40 CUs.Adjusted work multiplier: 72818
 i 20:47:18 sim      Epoch : 0 Difficulty : 4.29 Gh
 i 20:47:18 sim      Job: 16ff25f8? block 2 localhost:0
cl 20:47:19 cl-0     Generating DAG + Light : 1.02 GB
cl 20:47:19 cl-0     OpenCL kernel
cl 20:47:19 cl-0     Loading binary kernel /home/user_name/mine/ethminer/build/ethminer/kernels/ethash_gfx701_lws128.bin
 X 20:47:19 cl-0     Failed to load binary kernel: /home/user_name/mine/ethminer/build/ethminer/kernels/ethash_gfx701_lws128.bin
 X 20:47:19 cl-0     Falling back to OpenCL kernel...
cl 20:47:19 cl-0     Creating light cache buffer, size: 16.00 MB
cl 20:47:19 cl-0     Creating DAG buffer, size: 1024.00 MB, free: 2.98 GB
cl 20:47:19 cl-0     Loading kernels
cl 20:47:19 cl-0     Writing light cache buffer
cl 20:47:19 cl-0     Creating buffer for header.
cl 20:47:19 cl-0     Creating mining buffer
 m 20:47:23 ethminer 0:00 A0 0.00 h { cl0 0.00 }
cl 20:47:26 cl-0     1024.00 MB of DAG data generated in 7076 ms.
 m 20:47:28 ethminer 0:00 A0 0.00 h { cl0 0.00 }
 m 20:47:33 ethminer 0:00 A0 27.95 Mh { cl0 27.95 }
 m 20:47:38 ethminer 0:00 A0 27.95 Mh { cl0 27.95 }
 m 20:47:43 ethminer 0:00 A0 27.95 Mh { cl0 27.95 }
cl 20:47:48 cl-0     Job: 16ff25f8? Sol: 0xbc19bf58c2f39e2d
 i 20:47:48 ethminer **Accepted   1 ms. localhost:0
 m 20:47:48 ethminer 0:00 A1 27.95 Mh { cl0 27.95 }
 m 20:47:53 ethminer 0:00 A1 27.95 Mh { cl0 27.95 }
 m 20:47:58 ethminer 0:00 A1 27.95 Mh { cl0 27.95 }
 m 20:48:03 ethminer 0:00 A1 27.95 Mh { cl0 27.95 }
 m 20:48:08 ethminer 0:00 A1 27.95 Mh { cl0 27.95 }
 m 20:48:13 ethminer 0:00 A1 27.95 Mh { cl0 27.95 }
 m 20:48:18 ethminer 0:01 A1 27.96 Mh { cl0 27.96 }

But when I try to use it for real I get this

ethminer/ethminer -G -P stratum1+tcp://<address>@eu1.ethermine.org:4444 --opencl-devices 0 --cl-local-work 128

And then this

ethminer 0.18.0-alpha.3-3+commit.88758f28
Build: linux/release/gnu

 i 20:52:24 ethminer Configured pool eu1.ethermine.org:4444
 i 20:52:24 ethminer Selected pool eu1.ethermine.org:4444
 i 20:52:24 ethminer Established connection to eu1.ethermine.org  [172.65.207.106:4444]
 i 20:52:24 ethminer Spinning up miners...
 i 20:52:24 ethminer Stratum mode : ETHPROXY Compatible
 i 20:52:24 ethminer Logged in!
cl 20:52:24 cl-0     Using PciId : 08:00.0 gfx701 OpenCL 1.2  Memory : 4.00 GB
 i 20:52:24 cl-0     Adjusting CL work multiplier for 40 CUs.Adjusted work multiplier: 72818
 i 20:52:24 ethminer Epoch : 228 Difficulty : 4.00 Gh
 i 20:52:24 ethminer Job: 4363a754? block 6844690 eu1.ethermine.org  [172.65.207.106:4444]
cl 20:52:25 cl-0     Generating DAG + Light : 2.82 GB
cl 20:52:25 cl-0     OpenCL kernel
 m 20:52:29 ethminer 0:00 A0 0.00 h { cl0 0.00 }
cl 20:52:30 cl-0     Loading binary kernel /home/user_name/mine/ethminer/build/ethminer/kernels/ethash_gfx701_lws128.bin
 X 20:52:30 cl-0     Failed to load binary kernel: /home/user_name/mine/ethminer/build/ethminer/kernels/ethash_gfx701_lws128.bin
 X 20:52:30 cl-0     Falling back to OpenCL kernel...
cl 20:52:30 cl-0     Creating light cache buffer, size: 44.50 MB
cl 20:52:30 cl-0     Creating DAG buffer, size: 2.78 GB, free: 1.18 GB
cl 20:52:30 cl-0     Loading kernels
cl 20:52:30 cl-0     Writing light cache buffer
cl 20:52:30 cl-0     Creating buffer for header.
cl 20:52:30 cl-0     Creating mining buffer
 m 20:52:34 ethminer 0:00 A0 0.00 h { cl0 0.00 }
 m 20:52:39 ethminer 0:00 A0 0.00 h { cl0 0.00 }
 m 20:52:44 ethminer 0:00 A0 0.00 h { cl0 0.00 }
 i 20:52:47 ethminer Job: d9450b91? block 6844691 eu1.ethermine.org  [172.65.207.106:4444]
 m 20:52:49 ethminer 0:00 A0 0.00 h { cl0 0.00 }
 m 20:52:54 ethminer 0:00 A0 0.00 h { cl0 0.00 }
 m 20:52:59 ethminer 0:00 A0 0.00 h { cl0 0.00 }
 m 20:53:04 ethminer 0:00 A0 0.00 h { cl0 0.00 }

I wonder how you solved this issue?

AndreaLanfranchi commented 5 years ago

There is no problem going on. You simply don't leave enough time for Dag to be generated. Wait for a line which says "Dag generated in ..."

nolemtempo commented 5 years ago

oh, I see. Thanks!

nolemtempo commented 5 years ago

I tried this now and added a logging statement in this code https://github.com/ethereum-mining/ethminer/blob/master/libethash-cl/CLMiner.cpp#L900-L905 (which is executed for the DAG generation) I only get one printed output when the CL kernel is started. Then no more output for at least 30 min after I started. Is it expected that the generation will take very long time? On my other GPU it runs quite fast and in this case I would guess that the CL kernel gets stuck is some infinite loop or something.

AndreaLanfranchi commented 5 years ago

I think it's pretty clear it's a GPU problem. If one works and the other doesn't there's not much ethminer can do. The problem is downstream: from OpenCL call, to driver interaction, to pci bus communication, to GPU memory and so on.

nolemtempo commented 5 years ago

Yeah I agree. I guess the benchmark code works a bit differently so it doesn't run the exact same code path?

AndreaLanfranchi commented 5 years ago

The benchmark code is exactly the same code of real mining (in benchmarking we only send a "fake" job to the miners).

The real difference is this : your benchmark test with -M 2 means you're testing against block 2 (or in other words epoch 1) which has a very small DAG (1Gb). When you "real" mine you get a DAG of 2.84 GB (ethereum is at block 6847624 right now) which you can see from line

cl 20:52:25 cl-0     Generating DAG + Light : 2.82 GB

This is almost 3 times more memory required on GPU than your initial benchmark test. A huge difference in memory allocation

nolemtempo commented 5 years ago

Ah yeah. Sounds like it's some issue with the GPU then as the CL kernel works just fine smaller sizes. Anyway, thanks for the help and details :)