Bitcoin Forum
May 12, 2024, 10:31:57 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: clGetDeviceIDs() failure  (Read 1568 times)
rick2718 (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


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




1715553117
Hero Member
*
Offline Offline

Posts: 1715553117

View Profile Personal Message (Offline)

Ignore
1715553117
Reply with quote  #2

1715553117
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715553117
Hero Member
*
Offline Offline

Posts: 1715553117

View Profile Personal Message (Offline)

Ignore
1715553117
Reply with quote  #2

1715553117
Report to moderator
1715553117
Hero Member
*
Offline Offline

Posts: 1715553117

View Profile Personal Message (Offline)

Ignore
1715553117
Reply with quote  #2

1715553117
Report to moderator
1715553117
Hero Member
*
Offline Offline

Posts: 1715553117

View Profile Personal Message (Offline)

Ignore
1715553117
Reply with quote  #2

1715553117
Report to moderator
-ck
Legendary
*
Offline Offline

Activity: 4102
Merit: 1633


Ruu \o/


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

Launch it via screen.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
rick2718 (OP)
Newbie
*
Offline Offline

Activity: 53
Merit: 0


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!