Bitcoin Forum
December 14, 2017, 11:02:30 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: clGetDeviceIDs() failure  (Read 1454 times)
rick2718
Jr. Member
*
Offline Offline

Activity: 53


View Profile
May 14, 2013, 12:18:25 AM
 #1

I have a tiny script to launch cgminer which works fine.


go:

  #!/bin/sh
  set -x
  cd /x/y/z
  /x/y/z/cgminer ...


UNLESS I launch it from rc.local:

  nohup /x/y/z/go > /dev/null 2>&1 &



in this case clGetDeviceIDs() fails, which causes clDevicesNum() in ocl.c to fail, which aborts everything.


 [2013-05-13 19:56:01] Started cgminer 3.1.0
 [2013-05-13 19:56:01] Started cgminer 3.1.0 No protocol specified
 [2013-05-13 19:56:02] CL Platform 0 vendor: Advanced Micro Devices, Inc.
 [2013-05-13 19:56:02] CL Platform 0 name: AMD Accelerated Parallel Processing
 [2013-05-13 19:56:02] CL Platform 0 version: OpenCL 1.2 AMD-APP (1124.2)
 [2013-05-13 19:56:02] Error -1: Getting Device IDs (num)
 [2013-05-13 19:56:02] clDevicesNum returned error, no GPUs usable
 [2013-05-13 19:56:02] CL Platform 0 vendor: Advanced Micro Devices, Inc.
 [2013-05-13 19:56:02] CL Platform 0 name: AMD Accelerated Parallel Processing
 [2013-05-13 19:56:02] CL Platform 0 version: OpenCL 1.2 AMD-APP (1124.2)
 [2013-05-13 19:56:02] Error -1: Getting Device IDs (num)
 [2013-05-13 19:56:02] clDevicesNum returned error, no GPUs usable
 [2013-05-13 19:56:02] All devices disabled, cannot mine!
 [2013-05-13 19:56:02] All devices disabled, cannot mine!

(I edited out the ASCII escape sequences used for screen display)




rc.local is launched as the final thing coming up into run level 3 -  S99rc.local  in rc3.d   starts it up.


If I run rc.local directly, it also works, if I reboot it does not, and fails as above.


What's different between the two cases? I captured the environment for the working case:

env > xxx

then sourced it from go:

  #!/bin/sh
  set -x
  cd /x/y/z
  . /x/y/z/xxx
  /x/y/z/cgminer ...

but that did not help either.


One side note is the "No protocol specified" error in the does-not-work case, which I don't think comes from
cgminer source.


I thought I'd ask before digging deeper.

thanks




There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin-Qt, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513292550
Hero Member
*
Offline Offline

Posts: 1513292550

View Profile Personal Message (Offline)

Ignore
1513292550
Reply with quote  #2

1513292550
Report to moderator
1513292550
Hero Member
*
Offline Offline

Posts: 1513292550

View Profile Personal Message (Offline)

Ignore
1513292550
Reply with quote  #2

1513292550
Report to moderator
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2366


Ruu \o/


View Profile WWW
May 14, 2013, 12:27:12 AM
 #2

Launch it via screen.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
ZERO FEE Pooled mining at ckpool.org 1% Fee Solo mining at solo.ckpool.org
-ck
rick2718
Jr. Member
*
Offline Offline

Activity: 53


View Profile
May 14, 2013, 11:09:00 PM
 #3

thanks for that. I expect I'm being obtuse, but can you
tell me why this does not work?


rc.local:
/usr/bin/screen -dmS cgm /x/y/z/go


/x/y/z/go:
#!/bin/sh
sleep 30
export DISPLAY=:0
cd /x/y/z
/x/y/z/cgminer -o http ...    > /tmp/looky 2>&1


/tmp/looky:
 [2013-05-14 18:20:05] Started cgminer 3.1.0
 [2013-05-14 18:20:05] Started cgminer 3.1.0
No protocol specified
 [2013-05-14 18:20:05] clDevicesNum returned error, no GPUs usable
 [2013-05-14 18:20:05] clDevicesNum returned error, no GPUs usable
 [2013-05-1418:20:05] All devices disabled, cannot mine!
 [2013-05-14 18:20:05] All devices disabled, cannot mine!
(with escape sequences edited out)


clGetDeviceIDs() still fails


thanks for any insight
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!