Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use more than one GPU #93

Closed
PlamenVasilev opened this issue Aug 8, 2017 · 8 comments
Closed

Cannot use more than one GPU #93

PlamenVasilev opened this issue Aug 8, 2017 · 8 comments

Comments

@PlamenVasilev
Copy link

I'm trying to use btcrecover under windows with 4 GPUs
The setup is made as it is written on the setup guide.

PS C:\btcrecover> python .\btcrecover.py --list-gpu
#1 Tahiti
#2 Tahiti
#3 Hawaii
#4 Hawaii
#5 Intel(R) Celeron(R) CPU G1840 @ 2.80GHz

Everything looks normal and working, so I try to use one GPU

PS C:\btcrecover> python .\btcrecover.py --wallet dc.dat --performance --enable-gpu
btcrecover.py: error: can't automatically determine best GPU(s), please use the --gpus option

As I see there is no --gpus option, but we have --gpu-name so I tried one GPU

PS C:\btcrecover> python .\btcrecover.py --wallet dc.dat --performance --no-dupchecks --enable-gpu --gpu-name "#1"
Wallet difficulty: 107,142 SHA-512 iterations
Using OpenCL GPU Tahiti
- 8192  elapsed: 0:00:06  rate:   1.21 kP/s
Interrupted after finishing password # 8192

Looks good, but when I try to use more than one GPU i receive this error:

PS C:\btcrecover> python .\btcrecover.py --wallet dc.dat --performance --no-dupchecks --enable-gpu --gpu-names "#1,#2"
btcrecover.py: error: can't find GPU whose name contains '#1,#2' (use --list-gpus to display available GPUs)

And currently I cannot use more than one GPU :(

How this can be fixed?

p.s. I'm using Power shell, but I have tried with cmd.exe also and the result is the same. the only difference is that in powershell the gpu names have to be in " "

@kost123
Copy link

kost123 commented Aug 8, 2017

--gpu-names=1,2 without #

Good luck

gurnec added a commit that referenced this issue Aug 8, 2017
@PlamenVasilev
Copy link
Author

It doesn't work

PS C:\btcrecover> python .\btcrecover.py --wallet dc.dat --performance --no-dupchecks --enable-gpu --gpu-names=1,2
btcrecover.py: error: unrecognized arguments: 2

When I wrap them in "" the result is:

PS C:\btcrecover> python .\btcrecover.py --wallet dc.dat --performance --no-dupchecks --enable-gpu --gpu-names="1,2"
btcrecover.py: error: can't find GPU whose name contains '1,2' (use --list-gpus to display available GPUs)

@kost123
Copy link

kost123 commented Aug 8, 2017

Works fine for me..

btcrecover.py --wallet=wallet.dat --no-dupchecks --enable-gpu --performance --gpu-names=1,2
Using 2 OpenCL devices:
GPU GeForce GTX 1080 Ti
GPU GeForce GTX 1080

  • 16384 elapsed: 0:00:05 rate: 3.08 kP/s
    Interrupted after finishing password # 16384

I'm on windows though..

@gurnec

@gurnec
Copy link
Owner

gurnec commented Aug 8, 2017

Oops, that --gpus error message is now fixed, thanks for catching it.

Actually the syntax changed in a recent version to better match up with the standard way which most other Python programs parse multiple arguments to a single option.

As per the new --help message,

  --gpu-names NAME-OR-ID [NAME-OR-ID ...]
                        choose GPU(s) on multi-GPU systems (default: auto)

so it's --gpu-names 1 2 or --gpu-names 1 2 3 4, etc.

Likewise if you want to use different --global-ws or --local-ws options on a per-GPU basis, e.g. --gpu-names 1 2 3 4 --global-ws 2048 2048 4096 4096.

@PlamenVasilev
Copy link
Author

PlamenVasilev commented Aug 8, 2017

yes, the last one is working.
Thanks!

@winnph
Copy link

winnph commented Feb 3, 2018

I'm getting a segmentation fault when I try to do this:

 winn@alpha:~/btcrecover-master$ ./btcrecover.py --list-gpus
 Starting btcrecover 0.17.10 on Python 2.7.13 64-bit, 21-bit unicodes, 64-bit ints
 #1 pthread-Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
 #2 Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
 #3 GeForce GTX 1060 3GB
 #4 GeForce GTX 1060 3GB
 winn@alpha:~/btcrecover-master$ ./btcrecover.py --wallet wallet.dat --performance --enable-gpu --gpu-names 3 4 --global-ws 65536 65536 --local-ws 1024 1024
 Starting btcrecover 0.17.10 on Python 2.7.13 64-bit, 21-bit unicodes, 64-bit ints
 Segmentation fault

It works fine with just --gpu-names 3, but when I try to use 4 alone it gives this error:

 winn@alpha:~/btcrecover-master$ ./btcrecover.py --wallet wallet.dat --performance --enable-gpu --gpu-names 4 --global-ws 65536 --local-ws 1024
 Starting btcrecover 0.17.10 on Python 2.7.13 64-bit, 21-bit unicodes, 64-bit ints
 btcrecover.py: warning: --performance without --no-dupchecks will eventually cause an out-of-memory error
 Wallet difficulty: 80,645 SHA-512 iterations
 Traceback (most recent call last):
   File "./btcrecover.py", line 38, in <module>
     (password_found, not_found_msg) = btcrpass.main()
   File "/home/winn/btcrecover-master/btcrecover/btcrpass.py", line 5489, in main
     print("Using OpenCL", pyopencl.device_type.to_string(cl_devices[0].type), cl_devices[0].name.strip())
   File "/usr/lib/python2.7/dist-packages/pyopencl/cffi_cl.py", line 291, in to_string
     % (value, cls.__name__))
ValueError: a name for value 3 was not found in device_type

Any idea what's going on here?

@winnph
Copy link

winnph commented Feb 4, 2018

The problem is btcrecover is not assigning the numbers correctly, and numbers 1, 2 and 4 were all attempting to use the CPU instead. This works, though:

winn@alpha:~/btcrecover-master$ ./btcrecover.py --wallet wallet.dat --performance --enable-gpu --gpu-names "geforce" "geforce" --global-ws 65536 --local-ws 1024
Starting btcrecover 0.17.10 on Python 2.7.13 64-bit, 21-bit unicodes, 64-bit ints
btcrecover.py: warning: --performance without --no-dupchecks will eventually cause an out-of-memory error
Wallet difficulty: 80,645 SHA-512 iterations
Using 2 OpenCL devices:
  GPU GeForce GTX 1060 3GB
  GPU GeForce GTX 1060 3GB
\ 393216  elapsed: 0:00:40  rate:   9.76 kP/s   

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@winnph @gurnec @PlamenVasilev @kost123 and others