Forums - CGMiner OpenCL Problem

8 posts / 0 new
Last post
CGMiner OpenCL Problem
Lantis
Join Date: 2 Sep 13
Posts: 4
Posted: Fri, 2013-09-13 07:41

Probably a long shot here but... :)

I managed to compile cgminer in Android and trying to run it in my SGS4 with opencl, and I had stumbled on a problem to run it. cgminer is an open source cryptocurrency miner that supports opengl for GPU accelerated mining. More about here: https://github.com/ckolivas/cgminer

Anyway-- running cgminer -n gives me:


[2013-09-13 12:07:15] CL Platform 0 vendor: QUALCOMM
[2013-09-13 12:07:15] CL Platform 0 name : Snapdragon(TM)
[2013-09-13 12:07:15] CL Platform 0 name : OpenCL 1.1 QUALCOMM build: (CL3579225)
Build Date: 04/22/13 Mon
Local Branch: adreno_sba_20130419
Remote Branch:
Local Patches:
Reconstruct Branch:
[2013-09-13 12:07:15] Platform 0 devices: 1
[2013-09-13 12:07:15] 0 QUALCOMM Adreno(TM)
[2013-09-13 12:07:15] 1 GPU devices max detected

Trying to run cgminer with the usual parameters (--scrypt -o <host:port> -u <username> -p <password>) gives me:


[2013-09-13 12:08:12] Started cgminer 3.1.1
[2013-09-13 12:08:12] Probing for an alive pool Assertion failed: !spillIs.empty() && "No spill intervals?", file vendor/qcom/proprietary/gles/adreno200/llvm/lib/CodeGen/QGPURegAlloc.cpp, line 2628

I compiled cgminer with libraries I found in OpenCL Adreno SDK, tried to use libOpenCL.so from the android NDK, from the Adreno SDK, and from my SGS4 itself when compiling, but same result. Thoughts?

  • Up0
  • Down0
Lantis
Join Date: 2 Sep 13
Posts: 4
Posted: Mon, 2013-09-16 04:29

Ok, got more progress. It seems the assertion fails in loading the source kernel (via clBuildProgram)

https://github.com/ckolivas/cgminer/blob/master/scrypt130511.cl

But I'm stuck in here since I don't know about this "spill interval" assertion-- well there's a lot of math in that source, so I'm assuming one of the functions are actually not supported?

  • Up0
  • Down0
Krystian
Join Date: 16 Sep 13
Posts: 1
Posted: Mon, 2013-09-16 12:49

The error message sounds like an issue within spill fill algorithm during register allocation. This is deep in the bowels of the openCL compiler. It may or may not be due to some intricacies of the kernel you are trying to compile.

I would say two things come to mind: try to fiddle with the kernel to reduce potential register pressure. It may or may not help, you might get a kernel that doesn't trigger this unlucky code path. Another thing is to file a bug report attaching this kernel as a test case. This might be a genuine compiler bug. 

  • Up0
  • Down0
Lantis
Join Date: 2 Sep 13
Posts: 4
Posted: Tue, 2013-09-17 12:53

Got it-- trimming the kernel code is not something I had in mind, but I'll try and see what happens.  Thanks.

  • Up0
  • Down0
Lantis
Join Date: 2 Sep 13
Posts: 4
Posted: Thu, 2013-09-19 02:10

A bit more progress, but it doesn't look promising.

I ran clinfo apk in my Galaxy S4 and see that the OpenCL property Compile Available : False on Adreno.  Dreading the gut feeling, I found this link:

http://stackoverflow.com/questions/18527450/main-difference-between-open...

That means I cannot load the source and compile, correct?  If so how can I compile the source externally and load the compiled source to the kernel?

  • Up0
  • Down0
jlrsb9000
Join Date: 8 May 14
Posts: 1
Posted: Thu, 2014-05-08 21:25

Some devices, such as the Kindle Fire HDX, support compilation of kernels. I would be more than welcome if you were to send the compiled binary for me to test. 

  • Up0
  • Down0
ssaikatsaha1996
Join Date: 22 Oct 20
Posts: 11
Posted: Wed, 2020-12-16 03:32
I want help please help me Cgminer OpenCL not found But in my device already available OpenCL 2.0 But in termux showing OpenCL platform available please help me..
  • Up0
  • Down0
ssaikatsaha1996
Join Date: 22 Oct 20
Posts: 11
Posted: Wed, 2021-05-26 14:46
Hi! Lantis Can you help me I already build but got make error with ipthread... Can you please help ?..
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.