Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed fix to #14. Write .elf-files in temp-directory. #39

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion BitcoinMiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
from log import *
from sha256 import *
from struct import pack
from tempfile import gettempdir
from threading import Thread
from time import sleep, time
from util import *
import log
import os.path as path
import pyopencl as cl


Expand Down Expand Up @@ -165,7 +167,7 @@ def load_kernel(self):
kernel = kernel_file.read()
kernel_file.close()
m = md5(); m.update(''.join([self.device.platform.name, self.device.platform.version, self.device.name, self.defines, kernel]))
cache_name = '%s.elf' % m.hexdigest()
cache_name = path.join(gettempdir(), 'poclbm-%s.elf' % m.hexdigest())
binary = None
try:
binary = open(cache_name, 'rb')
Expand Down