Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: rick2718 on May 14, 2013, 12:18:25 AM



Title: clGetDeviceIDs() failure
Post by: rick2718 on May 14, 2013, 12:18:25 AM
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






Title: Re: clGetDeviceIDs() failure
Post by: -ck on May 14, 2013, 12:27:12 AM
Launch it via screen.


Title: Re: clGetDeviceIDs() failure
Post by: rick2718 on May 14, 2013, 11:09:00 PM
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