Permalink
Browse files

advise installing adl3 only to AMD users, warn others there's no temp…

…erature control
  • Loading branch information...
1 parent cc79127 commit 1b04e7343794f1b89138d12c12944d7af20d4318 @m0mchil committed Nov 9, 2012
Showing with 11 additions and 4 deletions.
  1. +10 −3 OpenCLMiner.py
  2. +1 −1 poclbm.py
View
@@ -32,6 +32,12 @@
except Exception:
print '\nNo OpenCL\n'
+def has_amd():
+ for platform in cl.get_platforms():
+ if 'amd' in platform.name.lower():
+ return True
+ return False
+
if OPENCL:
try:
from adl3 import ADL_Main_Control_Create, ADL_Main_Memory_Alloc, ADL_Main_Control_Destroy, \
@@ -46,9 +52,10 @@
ADL = True
adl_lock = Lock()
except ImportError:
- print '\nWARNING: no adl3 module found (github.com/mjmvisser/adl3), temperature control is disabled\n'
- except OSError:# if no ADL is present ie no AMD platform
- pass
+ if has_amd():
+ print '\nWARNING: no adl3 module found (github.com/mjmvisser/adl3), temperature control is disabled\n'
+ except OSError:# if no ADL is present i.e. no AMD platform
+ print '\nWARNING: ADL missing (no AMD platform?), temperature control is disabled\n'
else:
print "\nNot using OpenCL\n"
View
@@ -33,7 +33,7 @@ def socketwrap(family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0):
group.add_option('-e', '--estimate', dest='estimate', default=900, help='estimated rate time window in seconds, default 900 (15 minutes)', type='int')
group.add_option('-t', '--tolerance', dest='tolerance', default=2, help='use fallback pool only after N consecutive connection errors, default 2', type='int')
group.add_option('-b', '--failback', dest='failback', default=60, help='attempt to fail back to the primary pool after N seconds, default 60', type='int')
-group.add_option('--cutoff-temp', dest='cutoff_temp',default=[], help='(for OpenCL requires github.com/mjmvisser/adl3) comma separated temperatures at which to skip kernel execution, in C, default=95')
+group.add_option('--cutoff-temp', dest='cutoff_temp',default=[], help='AMD GPUs, BFL only. For GPUs requires github.com/mjmvisser/adl3. Comma separated temperatures at which to skip kernel execution, in C, default=95')
group.add_option('--cutoff-interval', dest='cutoff_interval',default=[], help='how long to not execute calculations if CUTOFF_TEMP is reached, in seconds, default=0.01')
group.add_option('--no-server-failbacks', dest='nsf', action='store_true', help='disable using failback hosts provided by server')
parser.add_option_group(group)

0 comments on commit 1b04e73

Please sign in to comment.