ethereum-mining / ethminer

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

Unable to select OpenCL devices with command line arguments #304

Closed Disjaukifa closed 6 years ago

Disjaukifa commented 7 years ago

When I go to select what OpenCL devices I want by setting them up in a bash file, I'm not able to select the Open-CL devices I would like to run, it auto defaults to my first GPU.

ethminer.exe -G -F http://<MINING_POOL>/<WALLET>/<RIG_NAME>/<EMAIL> --opencl-devices 4,5,6,7,8,9,10

However when I do this using the Cuda command it works exactly as I want

ethminer.exe -U -F http://<MINING_POOL>/<WALLET>/<RIG_NAME>/<EMAIL> --cuda-devices 0,1,2,3

I have 4 1060s, and 7 RX470s on my rig, I'm trying to setup ethminer so that I can mine Cuda with my NVidia GPUs and OpenCL with my RX470s.

I've also tried specifying this with -X and --cuda-opencl but both seem to just default to my first NVidia card.

I'm running on Windows 10x64 and using the AMD Blockchain Beta Driver. I am able to see all my cards correct with --device-list which is where I'm getting my device numbers from.

Any help would be appreciated.

Thanks

smurfy commented 7 years ago

use --opencl-platform 1 or --opencl-platform 2 in the opencl start to mine with AMD cards. -X currently only work in stratum mode. (there is a PR which fixes that)

smurfy commented 7 years ago

307 tries to make the importance of also specifing --opencl-platform clearer

Speldosa commented 7 years ago

I have a similar issue. I have two 1070 cards, where I want to mine using the second one. When trying to just use one of them by using the --cuda-devices 1 command, both are still used.

chrismlarson commented 7 years ago

I figured it out thanks to this string of comments. I screwed this up when I tried it first. I had to change the platform, not the device. Thanks for the clearer information. When I check for devices (just to test on this machine): ethminer -G --list-devices I get:

Listing OpenCL devices.
FORMAT: [platformID] [deviceID] deviceName
[0] [0] Intel(R) HD Graphics 4600
        CL_DEVICE_TYPE: GPU
        CL_DEVICE_GLOBAL_MEM_SIZE: 1708759450
        CL_DEVICE_MAX_MEM_ALLOC_SIZE: 427189862
        CL_DEVICE_MAX_WORK_GROUP_SIZE: 512
[1] [0] GeForce GTX 770
        CL_DEVICE_TYPE: GPU
        CL_DEVICE_GLOBAL_MEM_SIZE: 4294967296
        CL_DEVICE_MAX_MEM_ALLOC_SIZE: 1073741824
        CL_DEVICE_MAX_WORK_GROUP_SIZE: 1024

So then I try to target the GeForce: ethminer -M -G --opencl-devices 1 --opencl-platform 1 --opencl-device 0 And then it starts in on the GeForce, where everything else would go on the integrated Intel device:

  i  08:41:00|main      Found suitable OpenCL device [ GeForce GTX 770 ] with 4294967296  bytes of GPU memory
Benchmarking on platform: CL
Preparing DAG for block #0

I think what I'm doing is specifying to use a single device with --opencl-devices 1 then specifying the platform --opencl-platform 1 then the GeForce card --opencl-device 0.

kugo2006 commented 6 years ago

I think technically all you need there is --opencl-platform 1, and then it will grab the only device at that platform

osoluche commented 6 years ago

Listing OpenCL devices. FORMAT: [platformID] [deviceID] deviceName [0] [0] Intel(R) HD Graphics 630 CL_DEVICE_TYPE: GPU CL_DEVICE_GLOBAL_MEM_SIZE: 1610612736 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 402653184 CL_DEVICE_MAX_WORK_GROUP_SIZE: 256 [0] [1] AMD Radeon Pro 555 Compute Engine CL_DEVICE_TYPE: GPU CL_DEVICE_GLOBAL_MEM_SIZE: 2147483648 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 536870912 CL_DEVICE_MAX_WORK_GROUP_SIZE: 256

--opencl-platform 0 --opencl-device 1 not working for me; any idea ?

contentfree commented 6 years ago

Same issue as @osoluche (on a Mackbook pro with a Radeon Pro 460).

$ ethminer --list-devices

Listing OpenCL devices.
FORMAT: [platformID] [deviceID] deviceName
[0] [0] Intel(R) HD Graphics 530
    CL_DEVICE_TYPE: GPU
    CL_DEVICE_GLOBAL_MEM_SIZE: 1610612736
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 402653184
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
[0] [1] AMD Radeon Pro 460 Compute Engine
    CL_DEVICE_TYPE: GPU
    CL_DEVICE_GLOBAL_MEM_SIZE: 4294967296
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 1073741824
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 256

$ ethminer -M -G --opencl-platform 0 --opencl-device 1
  ℹ  23:42:30|          Found suitable OpenCL device [ Intel(R) HD Graphics 530 ] with 1610612736  bytes of GPU memory
Benchmarking on platform: CL
Preparing DAG for block #0
 cl  23:42:30|cl-0      No work. Pause for 3 s.

Notice that it chooses device 0 0 and not 0 1 as instructed. :( What do?

contentfree commented 6 years ago

Looking at the code around https://github.com/ethereum-mining/ethminer/blob/6f28ec56a8075b69406931bfea2a1262958ef019/libethash-cl/CLMiner.cpp#L325 it doesn't appear to do anything with the device number. It simply returns the first device that has enough memory for the DAG. @smurfy ?

1mike12 commented 6 years ago

Just adding another datapoint. I see the same thing as @contentfree Also getting ~3 MH/s since I assume it's not using the right graphics card.

Macbookpro 2016 w/ rx580 that's connected via an egpu. It gets ~22MH/s in windows no problem.

mikes-mbp:Desktop mike$ ./ethminer -G --list-devices

Listing OpenCL devices.
FORMAT: [platformID] [deviceID] deviceName
[0] [0] Intel(R) HD Graphics 530
    CL_DEVICE_TYPE: GPU
    CL_DEVICE_GLOBAL_MEM_SIZE: 1610612736
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 402653184
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
[0] [1] AMD Radeon Pro 450 Compute Engine
    CL_DEVICE_TYPE: GPU
    CL_DEVICE_GLOBAL_MEM_SIZE: 2147483648
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 536870912
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
[0] [2] AMD Radeon RX 580 Compute Engine
    CL_DEVICE_TYPE: GPU
    CL_DEVICE_GLOBAL_MEM_SIZE: 4294967296
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 1073741824
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
./ethminer -G -S eth-us-east1.nanopool.org:9999 -O <my_address> --opencl-platform 0 --opencl-device 2
  ℹ  13:27:59|          Found suitable OpenCL device [ Intel(R) HD Graphics 530 ] with 1610612736  bytes of GPU memory
  ℹ  13:27:59|          Connecting to stratum server eth-us-east1.nanopool.org:9999
ThunderTrent commented 6 years ago

I'm having the same result with Macbook Pro:

Listing OpenCL devices. FORMAT: [platformID] [deviceID] deviceName [0] [0] Intel(R) HD Graphics 530 CL_DEVICE_TYPE: GPU CL_DEVICE_GLOBAL_MEM_SIZE: 1610612736 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 402653184 CL_DEVICE_MAX_WORK_GROUP_SIZE: 256 [0] [1] AMD Radeon Pro 450 Compute Engine CL_DEVICE_TYPE: GPU CL_DEVICE_GLOBAL_MEM_SIZE: 2147483648 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 536870912 CL_DEVICE_MAX_WORK_GROUP_SIZE: 256

Trents-MBP:Desktop trentbrown$ ./ethminer -G --opencl-platform 0 --opencl-device 1 Found suitable OpenCL device [ Intel(R) HD Graphics 530 ] with 1610612736 bytes of GPU memory

smurfy commented 6 years ago

Its quite strange, that it shows intel + amd on the same platform. On linux+windows they are two different platforms.

You can try --opencl-platform 1, but i'm not sure this will work. You also can try disabling the onboard intel card :)

avleen commented 6 years ago

Forcing the switch to the discrete card (eg, using gfxCardStatus) doesn't make a difference. Using --opencl-platform 1 causes ethminer to exit with status 1.

On Sat, Dec 23, 2017 at 11:30 PM Philipp Andreas notifications@github.com wrote:

Its quite strange, that it shows intel + amd on the same platform. On linux+windows they are two different platforms.

You can try --opencl-platform 1, but i'm not sure this will work. You also can try disabling the onboard intel card :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ethereum-mining/ethminer/issues/304#issuecomment-353754134, or mute the thread https://github.com/notifications/unsubscribe-auth/AAg7hfcgdOXsGiuoPlIXajyGlrFBdYszks5tDY0MgaJpZM4PRx2O .

jorge507 commented 6 years ago

Im trying to use a Intel Iris 540 gpu , Listing OpenCL devices. FORMAT: [deviceID] deviceName [0] Intel(R) Iris(TM) Graphics 540 CL_DEVICE_TYPE: GPU CL_DEVICE_GLOBAL_MEM_SIZE: 6816753255 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 2147483647 CL_DEVICE_MAX_WORK_GROUP_SIZE: 256 which parameters for opengl must use ?

maweis1981 commented 6 years ago

same issue. on MacBook Pro, always choose 530 graphic device.

videodoctor commented 6 years ago

I can confirm that I'm experiencing the same issue with Ubuntu 16 and legacy OpenCL (meaning, I had to compile the AMDGPU-PRO drivers the --opencl=legacy flag). I have two R9 290x 's and it's only mining on one (the first one) and nothing else.

DeadManWalkingTO commented 6 years ago

Try latest version and feedback please. Thank you!

Ben-and-Ellen commented 6 years ago

Using Ubuntu 16.04.3 LTS ethminer version 0.14.0.dev3+git.83693003 build

My system has two 1070ti cards and one RX580 card. ethminer does mine, however only with the 1070ti cards. The system can see the 1070tis and the 580 but it only mines with the 1070tis...

=ETHMINER VERSION=

$ ethminer -V ethminer version 0.14.0.dev3+git.83693003 Build: linux/release/gnu

=ETHMINER - What cards installed?=

$ ethminer --list-devices

Listing OpenCL devices. FORMAT: [platformID] [deviceID] deviceName [0] [0] GeForce GTX 1070 Ti CL_DEVICE_TYPE: GPU CL_DEVICE_GLOBAL_MEM_SIZE: 8513978368 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 2128494592 CL_DEVICE_MAX_WORK_GROUP_SIZE: 1024 [0] [1] GeForce GTX 1070 Ti CL_DEVICE_TYPE: GPU CL_DEVICE_GLOBAL_MEM_SIZE: 8513978368 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 2128494592 CL_DEVICE_MAX_WORK_GROUP_SIZE: 1024 [1] [0] Ellesmere CL_DEVICE_TYPE: GPU CL_DEVICE_GLOBAL_MEM_SIZE: 8571142144 CL_DEVICE_MAX_MEM_ALLOC_SIZE: 4244635648 CL_DEVICE_MAX_WORK_GROUP_SIZE: 256

Listing CUDA devices. FORMAT: [deviceID] deviceName [0] GeForce GTX 1070 Ti Compute version: 6.1 cudaDeviceProp::totalGlobalMem: 8513978368 Pci: 0000:0c:00 [1] GeForce GTX 1070 Ti Compute version: 6.1 cudaDeviceProp::totalGlobalMem: 8513978368 Pci: 0000:0e:00

=TRYING TO MINE=

Using ethminer with -X option set: only mines with the 1070s

Using ethminer with -G option set: set --opencl-platform to 0 ethminer uses platform 0 - the two Nvidia cards set --opencl-platform to 1 but ethminer used platform 0 - the two Nvidia cards set --opencl-platform to 2 but ethminer used platform 0 - the two Nvidia cards

=ETHMINER with -X=

=OUTPUT=

$ ethminer -X --cuda-devices 0 1 --opencl-platform 1 --opencl-device 0 -SP 2 -U -S daggerhashimoto.eu.nicehash.com:3353 -O XXXXXXXXXXXXXXXXXXXX m 18:06:44|ethminer| ethminer version 0.14.0.dev3 m 18:06:44|ethminer| Build: linux / release +git. 83693003 cu 18:06:45|ethminer| Using grid size 8192 , block size 128 cu 18:06:45|ethminer| Found suitable CUDA device [ GeForce GTX 1070 Ti ] with 8513978368 bytes of GPU memory cu 18:06:45|ethminer| Found suitable CUDA device [ GeForce GTX 1070 Ti ] with 8513978368 bytes of GPU memory m 18:06:45|ethminer| not-connected ℹ 18:06:45|stratum | Connected to daggerhashimoto.eu.nicehash.com ℹ 18:06:45|stratum | Spinning up miners... ℹ 18:06:45|cuda-0 | No work. Pause for 3 s. ℹ 18:06:45|cuda-1 | No work. Pause for 3 s. ℹ 18:06:45|stratum | Extranonce set to 39c6ab ℹ 18:06:45|stratum | Subscribed to stratum server ℹ 18:06:45|stratum | Authorized worker XXXXXXXXXXXXXXXXXXXX ℹ 18:06:45|stratum | Difficulty set to 0.5 ℹ 18:06:45|stratum | New pool difficulty: 2.1475 gigahashes ℹ 18:06:45|stratum | Received new job #e8deb245… from daggerhashimoto.eu.nicehash.com ℹ 18:06:48|cuda-0 | Initialising miner 0 ℹ 18:06:48|cuda-1 | Initialising miner 1 cu 18:06:50|cuda-0 | Using device: GeForce GTX 1070 Ti (Compute 6.1) cu 18:06:50|cuda-0 | Set Device to current cu 18:06:50|cuda-0 | Resetting device cu 18:06:50|cuda-1 | Using device: GeForce GTX 1070 Ti (Compute 6.1) cu 18:06:50|cuda-1 | Set Device to current cu 18:06:50|cuda-1 | Resetting device m 18:06:50|ethminer| Speed 0.00 Mh/s gpu/0 0.00 gpu/1 0.00 [A0+0:R0+0:F0] Time: 00:00 cu 18:06:50|cuda-0 | Allocating light with size: 39320768 cu 18:06:50|cuda-0 | Generating mining buffers cu 18:06:50|cuda-1 | Allocating light with size: 39320768 cu 18:06:51|cuda-0 | Generating DAG for GPU # 0 with dagSize: 2516582272 gridSize: 8192 cu 18:06:51|cuda-1 | Generating mining buffers cu 18:06:51|cuda-1 | Generating DAG for GPU # 1 with dagSize: 2516582272 gridSize: 8192 ℹ 18:06:55|stratum | Received new job #aae63a98… from daggerhashimoto.eu.nicehash.com m 18:06:55|ethminer| Speed 0.00 Mh/s gpu/0 0.00 gpu/1 0.00 [A0+0:R0+0:F0] Time: 00:00 m 18:07:05|ethminer| Speed 50.95 Mh/s gpu/0 25.48 gpu/1 25.48 [A0+0:R0+0:F0] Time: 00:00

=ETHMINER with -G=

$ ethminer -G --opencl-platform 1 -SP 2 -U -S daggerhashimoto.eu.nicehash.com:3353 -O XXXXXXXXXXXXXXXXXXXX

=OUTPUT= m 17:45:19|ethminer| ethminer version 0.14.0.dev3 m 17:45:19|ethminer| Build: linux / release +git. 83693003 cu 17:45:21|ethminer| Using grid size 8192 , block size 128 m 17:45:21|ethminer| not-connected ℹ 17:45:21|stratum | Connected to daggerhashimoto.eu.nicehash.com ℹ 17:45:21|stratum | Spinning up miners... ℹ 17:45:21|cuda-0 | No work. Pause for 3 s. ℹ 17:45:21|cuda-1 | No work. Pause for 3 s. ℹ 17:45:21|stratum | Extranonce set to 2554 ℹ 17:45:21|stratum | Subscribed to stratum server ℹ 17:45:21|stratum | Authorized worker XXXXXXXXXXXXXXXXXXXX ℹ 17:45:21|stratum | Difficulty set to 0.5 ℹ 17:45:21|stratum | New pool difficulty: 2.1475 gigahashes ℹ 17:45:21|stratum | Received new job #561e7a5f… from daggerhashimoto.eu.nicehash.com ℹ 17:45:24|cuda-0 | Initialising miner 0 ℹ 17:45:24|cuda-1 | Initialising miner 1 cu 17:45:25|cuda-0 | Using device: GeForce GTX 1070 Ti (Compute 6.1) cu 17:45:25|cuda-0 | Set Device to current cu 17:45:25|cuda-1 | Using device: GeForce GTX 1070 Ti (Compute 6.1) cu 17:45:25|cuda-0 | Resetting device cu 17:45:25|cuda-1 | Set Device to current cu 17:45:25|cuda-1 | Resetting device cu 17:45:25|cuda-1 | Allocating light with size: 21364544 cu 17:45:25|cuda-1 | Generating mining buffers cu 17:45:25|cuda-0 | Allocating light with size: 21364544 cu 17:45:25|cuda-1 | Generating DAG for GPU # 1 with dagSize: 1367339392 gridSize: 8192 cu 17:45:25|cuda-0 | Generating mining buffers cu 17:45:25|cuda-0 | Generating DAG for GPU # 0 with dagSize: 1367339392 gridSize: 8192 m 17:45:36|ethminer| Speed 47.21 Mh/s gpu/0 23.29 gpu/1 23.92 [A0+0:R0+0:F0] Time: 00:00

lendeezy commented 6 years ago

Im having an issue with 3 of my radeon cards, 6 of them are running, all 580s, all same drivers. ASUS B250 Motherboard. http://tinypic.com/r/2w2fwib/9 i download amd catalyst and made sure theyre open but theyre open they just cant be used it seem/ any fix?

AndreaLanfranchi commented 6 years ago

@lendeezy pic you posted is from PhoenixMiner : ask them.