Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Workaround for standard strictness enforcement on OS X #63

Merged
merged 3 commits into from

3 participants

@JasonLunn

Use platform specific logic to avoid known OS X pitfall; see http://wiki.tiker.net/OpenCLOddities

@JasonLunn JasonLunn Update OpenCLMiner.py
Use platform specific logic to avoid know OS X pitfall; see http://wiki.tiker.net/OpenCLOddities
d9b30e0
@m0mchil
Owner

I changed detect.py to use sys.platform

Can you please use it instead of importing sys.platform in OpenCLMiner?

I.e. leave only vectors_definition and 'from detect import MACOSX'

@JasonLunn

Done. Works for me on OS X 10.7.5.

@m0mchil m0mchil merged commit 2ae15b7 into from
@JustinTArthur

Thanks, @m0mchil and @JasonLunn! I was wondering what was wrong with vectors for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 8, 2013
  1. @JasonLunn

    Update OpenCLMiner.py

    JasonLunn authored
    Use platform specific logic to avoid know OS X pitfall; see http://wiki.tiker.net/OpenCLOddities
  2. @JasonLunn

    Merge pull request #1 from m0mchil/master

    JasonLunn authored
    Upstream update
  3. @JasonLunn

    Use MACOSX from detect

    JasonLunn authored
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 OpenCLMiner.py
View
8 OpenCLMiner.py
@@ -1,3 +1,4 @@
+from detect import MACOSX
from Miner import Miner
from Queue import Empty
from hashlib import md5
@@ -32,6 +33,11 @@
except Exception:
print '\nNo OpenCL\n'
+def vectors_definition():
+ if MACOSX:
+ return '-D VECTORS'
+ return '-DVECTORS'
+
def is_amd(platform):
if 'amd' in platform.name.lower():
return True
@@ -149,7 +155,7 @@ def nonce_generator(self, nonces):
def mining_thread(self):
say_line('started OpenCL miner on platform %d, device %d (%s)', (self.options.platform, self.device_index, self.device_name))
- (self.defines, rate_divisor, hashspace) = ('-DVECTORS', 500, 0x7FFFFFFF) if self.vectors else ('', 1000, 0xFFFFFFFF)
+ (self.defines, rate_divisor, hashspace) = (vectors_definition(), 500, 0x7FFFFFFF) if self.vectors else ('', 1000, 0xFFFFFFFF)
self.defines += (' -DOUTPUT_SIZE=' + str(self.output_size))
self.defines += (' -DOUTPUT_MASK=' + str(self.output_size - 1))
Something went wrong with that request. Please try again.