options.platform = 0 devices = platforms[options.platform].get_devices() if (options.device == -1 or options.device >= len(devices)): print 'No device specified or device not found, use -d to specify one of the following\n' for i in xrange(len(devices)): print '[%d]\t%s' % (i, devices[i].name) sys.exit() miner = None try: miner = BitcoinMiner(devices[options.device], options.host, options.user, options.password, options.port, options.rate, options.askrate, options.worksize, options.vectors, options.verbose) miner.fps_slow = options.fps_slow miner.fps_fast = options.fps_fast miner.swapFrame() miner.mine() except KeyboardInterrupt: print '\b\b \nStopping...' finally: if miner: miner.exit() sleep(1.1)
print 'Wrong platform or more than one OpenCL platforms found, use --platform to select one of the following\n' for i in xrange(len(platforms)): print '[%d]\t%s' % (i, platforms[i].name) sys.exit() if options.platform == -1: options.platform = 0 devices = platforms[options.platform].get_devices() if (options.device == -1 or options.device >= len(devices)): print 'No device specified or device not found, use -d to specify one of the following\n' for i in xrange(len(devices)): print '[%d]\t%s' % (i, devices[i].name) sys.exit() miner = None try: miner = BitcoinMiner(devices[options.device], options.host, options.user, options.password, options.port, options.rate, options.askrate, options.worksize, options.vectors, options.verbose) miner.fps_slow = options.fps_slow miner.fps_fast = options.fps_fast miner.swapFrame() miner.mine() except KeyboardInterrupt: print '\b\b \nStopping...' finally: if miner: miner.exit() sleep(1.1)