From 9263f53d860296291a29e95c2b7e3c5ff4c736e6 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Tue, 28 Feb 2017 23:52:27 +0100 Subject: [PATCH] OpenCL PoW fix - previous commit created some problems, now it should work --- src/openclpow.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/openclpow.py b/src/openclpow.py index 3153c6b6..59375329 100644 --- a/src/openclpow.py +++ b/src/openclpow.py @@ -26,12 +26,11 @@ except: libAvailable = False def initCL(): - global ctx, queue, program, enabledGpus, hash_dt, vendors - gpus = [] + global ctx, queue, program, hash_dt + del enabledGpus[:] + del vendors[:] + del gpus[:] ctx = False - enabledGpus = [] - vendors = [] - hash_dt = None try: hash_dt = numpy.dtype([('target', numpy.uint64), ('v', numpy.str_, 73)]) try: @@ -52,10 +51,10 @@ def initCL(): logger.info("Loaded OpenCL kernel") else: logger.info("No OpenCL GPUs found") - enabledGpus = [] + del enabledGpus[:] except Exception as e: logger.error("OpenCL fail: ", exc_info=True) - enabledGpus = [] + del enabledGpus[:] def openclAvailable(): return (len(gpus) > 0)