Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Open
wants to merge 1 commit into from

2 participants

@rawler

Support read-only install by locating cached .elf-files in system-temp-folder. Closes #14.

@m0mchil
Owner

Greetings from the pull request resurrection daemon ;)

There are just many different setups possible - for example some machines booting from LAN and having only in-memory /tmp and /var/tmp - writing cache files to such non-persistent locations will do actually more harm. is there any problem with just making the working directory writable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 29, 2011
  1. @rawler
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 BitcoinMiner.py
View
4 BitcoinMiner.py
@@ -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
@@ -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')
Something went wrong with that request. Please try again.