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

TypeError: %x format: an integer is required, not float #7

Closed
dhhh30 opened this issue Mar 12, 2020 · 2 comments
Closed

TypeError: %x format: an integer is required, not float #7

dhhh30 opened this issue Mar 12, 2020 · 2 comments

Comments

@dhhh30
Copy link

dhhh30 commented Mar 12, 2020

it is not working.
` 12/03/2020 19:54:58, started OpenCL miner on platform 0, device 0 (Intel(R) HD Graphics 6000 BroadWell U-Processor GT3)
12/03/2020 19:54:58, Setting server (dchen4 @ prohashing.com:3335)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/yurun/miniconda3/lib/python3.7/site-packages/apoclypsebm/mining/opencl.py", line 369, in load_kernel
binary = open(cache_name, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'acbab1fcffe34393b82e590d4a8df7ae.elf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/yurun/miniconda3/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/home/yurun/miniconda3/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/yurun/miniconda3/lib/python3.7/site-packages/apoclypsebm/mining/opencl.py", line 188, in mining_thread
self.load_kernel()
File "/home/yurun/miniconda3/lib/python3.7/site-packages/apoclypsebm/mining/opencl.py", line 374, in load_kernel
self.program = cl.Program(self.context, kernel).build(self.defines)
File "/home/yurun/miniconda3/lib/python3.7/site-packages/pyopencl/init.py", line 462, in build
options_bytes=options_bytes, source=self._source)
File "/home/yurun/miniconda3/lib/python3.7/site-packages/pyopencl/init.py", line 506, in _build_and_catch_errors
raise err
pyopencl.cffi_cl.RuntimeError: clBuildProgram failed: BUILD_PROGRAM_FAILURE -

Build on <pyopencl.Device 'Intel(R) HD Graphics 6000 BroadWell U-Processor GT3' on 'Intel Gen OCL Driver' at 0x7f7220a03ac0>:

fatal error: malformed or corrupted AST file: 'could not find file '/home/conda/feedstock_root/build_artifacts/beignet_1571975919345/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/beignet/include/ocl_types.h' referenced by AST file '/home/yurun/miniconda3/lib/beignet//beignet.pch''

(options: -DOUTPUT_SIZE=256 -DOUTPUT_MASK=255 -I /home/yurun/miniconda3/lib/python3.7/site-packages/pyopencl/cl)
(source saved as /tmp/tmpw9ha_e7x.cl)

prohashing.com:3335 12/03/2020 19:54:59, Setting new difficulty: 131072.0
error: uncaptured python exception, closing channel <apoclypsebm.work_sources.stratum.Handler connected 50.225.198.65:3335 at 0x7f721c4e0e50> (<class 'TypeError'>:%x format: an integer is required, not float [/home/yurun/miniconda3/lib/python3.7/asyncore.py|read|83] [/home/yurun/miniconda3/lib/python3.7/asyncore.py|handle_read_event|422] [/home/yurun/miniconda3/lib/python3.7/asynchat.py|handle_read|171] [/home/yurun/miniconda3/lib/python3.7/site-packages/apoclypsebm/work_sources/stratum.py|found_terminator|343] [/home/yurun/miniconda3/lib/python3.7/site-packages/apoclypsebm/work_sources/stratum.py|handle_message|194] [/home/yurun/miniconda3/lib/python3.7/site-packages/apoclypsebm/work_sources/stratum.py|queue_work|317])
prohashing.com:3335 12/03/2020 19:55:12, IO errors - 1, tolerance 2
Traceback (most recent call last):
File "/home/yurun/miniconda3/bin/apoclypse", line 8, in
sys.exit(main())
File "/home/yurun/miniconda3/lib/python3.7/site-packages/apoclypsebm/command.py", line 128, in main
switch.loop()
File "/home/yurun/miniconda3/lib/python3.7/site-packages/apoclypsebm/switch.py", line 123, in loop
failback = self.server_source().loop()
File "/home/yurun/miniconda3/lib/python3.7/site-packages/apoclypsebm/work_sources/stratum.py", line 87, in loop
self.queue_work(self.current_job, miner)
File "/home/yurun/miniconda3/lib/python3.7/site-packages/apoclypsebm/work_sources/stratum.py", line 317, in queue_work
list(chunks('%064x' % self.server_difficulty, 2))[::-1])
TypeError: %x format: an integer is required, not float
`

@JustinTArthur
Copy link
Owner

I'm not very familiar with conda or beignet, but your initial issue looks very similar to conda-forge/beignet-feedstock#1. May want to check with that project or do a simpler environment with virtualenv and pip.

@JustinTArthur
Copy link
Owner

@dhhh30 I've made a fix that can be found in 1.1.4 (on PyPI/pip now). Let me know if it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants