Post
Topic
Board Mining (Altcoins)
Re: [ANN] dstm's ZCash / Equihash Nvidia Miner v0.6 (Linux / Windows)
by
ruphus
on 25/02/2018, 15:27:13 UTC
Any way to restart the miner after GPU unresponsiveness?

Code:
2018-02-21 14:20:28|gpu_id 4 54 1 unspecified launch failure
2018-02-21 14:20:28|gpu 4 unresponsive - check overclocking
2018-02-21 14:20:28|cudaMemcpy 1 failed

Use this Miner Autorun (Watchdog)

https://bitcointalk.org/index.php?topic=2071108.0

Thank you for that recommendation. That looks fine, but requires to use windows. I am running a linux rig... :-/ Any other idea?

You can use this little python script that I made to handle the miner:

Code:
#!/usr/bin/env python3

import subprocess
import sys

def restart_miner(proc):
    print('Restarting miner...')
    proc.kill()

def process_line(proc, line):
    if 'cudaMemcpy 1 failed' in line:
        restart_miner(proc)
    else:
        print(line, end='')

if __name__ == '__main__':
    while True:
        proc = subprocess.Popen(sys.argv[1:], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
        for line in proc.stdout:
            process_line(proc, line.decode())

Copy/paste the code in a file, make it executable and run it with "./filename your_launch_command". With a file named "start.py" and for the default dstm's launch script the command would be "./start.py ./zm --cfg-file zm.cfg".

The script will restart the miner when it sees the "cudaMemcpy 1 failed" error message.

BTW, it should work on Windows too if you have python3 installed. Remove the first line and replace "sys.argv[1:]" by "['zm.exe', '--cfg-file', 'zm.cfg']" (or whatever your launch command is).


yaay! thank you very much! I will check out your script today. i was hoping for such a way! thank you pustul!!