<<  >> (p.102)
    Author Topic: Bitcoin puzzle transaction ~32 BTC prize to who solves it  (Read 325414 times)
    crewchill
    Newbie
    *
    Offline Offline

    Activity: 5
    Merit: 0


    View Profile
    January 23, 2023, 02:06:15 PM
     #2021

    Code:
    [...]
    num = 50000000
    [...]
    #cpu_time = cpu_gen(length, num, randStr)
    gpu_time = gpu_gen(length, num, randStr)
    print("****************************************************")
    print("CPU and GPU execution time comparison")
    #print("CPU Time: {0} s".format(cpu_time))
    print("GPU Time: {0} s".format(gpu_time))

    I was curious to see if and how fast the GPU part is done. So I disabled the CPU part in your code and raised num to 50 million. Before starting I opened my Nvidia System app to monitor the load of my GPU. After about 1.5 sec my Nvidia System Monitor showed
    Quote
    Used Dedicated Memory: 3531 MB (43%)
    GPU Utilization: 0%

    that means that data was loaded into the dedicated memory, but GPU utilization remains during the complete run at 0% which is unusual. Whenever I run other tools like VanitySearch, BitCrack, KeyHunt-Cuda, etc. GPU utilization is at 100%. I doubt that everything is running at optimum speed inside the GPU part.

    Also, when measuring the execution time it takes 39sec. and not only 0.9sec as stated by the program.

    Quote
    $ time python3 crewchill.py
    GPU Time: 0.9311995506286621 s
    ****************************************************
    Random Strings gnerated by GPU
    ****************************************************
    CPU and GPU execution time comparison
    GPU Time: 0.9311995506286621 s

    real   0m39,594s
    user   0m38,058s
    sys   0m3,153s

    0.9 seconds is too fast to activate gpu.

    39s because you print space.

    Code:
    for i in range(totChar):
    if i>1 and i % length==0:print('' ,end='')    <=hide this print and try again
Page 101
Viewing Page: 102