Author

Topic: How To Open 6 Terminals, Set GPU Clocks, And Start POCLBM On Ubuntu Startup??? (Read 5320 times)

jr. member
Activity: 56
Merit: 10
This is most strange... can you manually:

1. cd /home/administrator/phoenix/
2. python /home/administrator/phoenix/phoenix.py -u http://[email protected]_0:[email protected]:8332/ -k poclbm VECTORS BFI_INT AGGRESSION=12 WORKSIZE=128 DEVICE=0

?

If that does not work I'm completely stumped.

Have the same problem and this does not resolve it. Running phoenix.py with the above command (at btcguild.com) from where its located (i have it at /opt/miners/phoenix/) gives the same error.
member
Activity: 104
Merit: 35
once the cd line goes back in I get....


:~$ [05/06/2011 10:11:14] FATAL kernel error: Failed to load OpenCL kernel!
member
Activity: 78
Merit: 10
This is the way I do it.

Code:
user@miner00:~$ cat screen_mining.rc
screen -t GPU0 0 /home/user/mine.sh 1
screen -t GPU1 1 /home/user/mine.sh 2
screen -t GPU2 2 /home/user/mine.sh 3
user@miner00:~$

mine.sh sets up the clocks, the fans, etc on the specified card and launches the miner.

just run like this: screen -c screen_mining.rc
member
Activity: 104
Merit: 35

#!/bin/bash
export DISPLAY=:0
export LD_LIBRARY_PATH=/home/administrator/ati-stream-sdk-v2.1-lnx64/lib/x86_64/:
/usr/bin/python /home/administrator/phoenix/phoenix.py -u http://[email protected]_0:[email protected]:8332/ -k poclbm VECTORS BFI_INT AGGRESSION=12 WORKSIZE=128 DEVICE=0
member
Activity: 104
Merit: 35
 Could not locate the specified kernel!     Huh
member
Activity: 104
Merit: 35
/usr/bin/python: can't open file 'phoenix.py': [Errno 2] No such file or directory

uh oh, no python folder, but how am I able to run the miner manually..


member
Activity: 104
Merit: 35
ok, now I'm getting   python: can't open file 'phoenix.py': [Errno 2] No such file or directory

perhaps a path statement to correct?
member
Activity: 104
Merit: 35



Ok, tried that now I'm getting ...

~/phoenix$ [05/06/2011 09:05:21] FATAL kernel error: Failed to load OpenCL kernel!
member
Activity: 104
Merit: 35
I'm getting closer....  now I get this message when I ssh to the screen.

 No device specified or device not found, use DEVICE=ID to specify one of the following



This is my start_miners script..


start_miners
shell /bin/bash

chdir /home/administrator/phoenix/
screen 0
exec ./test.sh


I call this during startup via the startup programs with the following command line :    screen -d -m -c /home/administrator/phoenix/start_miners


This is my test.sh script;


#!/bin/bash
export DISPLAY=0:0
export LD_LIBRARY_PATH=/home/administrator/ati-stream-sdk-v2.1-lnx64/lib/x86_64/:
python phoenix.py -u http://xxxx@xxxx_0:[email protected]:8332/ -k poclbm VECTORS BFI_INT AGGRESSION=12 WORKSIZE=128 DEVICE=1



copper member
Activity: 56
Merit: 0

Check ldconfig -p | grep -o opencl

In my experience, make sure you -
export DISPLAY=0:0

(or whatever your display is with the ATI driver) before you try to use something that needs OpenCL.


I wish NVIDIA hashed better.... I don't even have to init the driver to use CUDA. Sad

member
Activity: 104
Merit: 35
Could this be something wrong with python?,, btw my miners work fine if I launch manually from terminal

:~/phoenix$ Traceback (most recent call last):
  File "phoenix.py", line 123, in
    miner.start(options)
  File "/home/administrator/phoenix/Miner.py", line 75, in start
    self.kernel = self.options.makeKernel(KernelInterface(self))
  File "phoenix.py", line 111, in makeKernel
    kernelModule = imp.load_module(module, file, filename, smt)
  File "kernels/poclbm/__init__.py", line 22, in
    import pyopencl as cl
  File "/usr/local/lib/python2.7/dist-packages/pyopencl-0.92-py2.7-linux-x86_64.egg/pyopencl/__init__.py", line 3, in
    import pyopencl._cl as _cl
ImportError: libOpenCL.so: cannot open shared object file: No such file or directory
member
Activity: 104
Merit: 35
Hi Monoquark, just checked that and it is correct...  :~/ati-stream-sdk-v2.1-lnx64/lib$
member
Activity: 104
Merit: 35
Hi Guys, tryting to get this auto launch script to run my miners on ubuntu 11.04 then access them via ssh and screen command...  I have the autologon and auto card config running but getting this error after I ssh to the running terminal, and the miners are not launched....  Any ideas?


:~/phoenix$ Traceback (most recent call last):
  File "phoenix.py", line 123, in
    miner.start(options)
  File "/home/administrator/phoenix/Miner.py", line 75, in start
    self.kernel = self.options.makeKernel(KernelInterface(self))
  File "phoenix.py", line 111, in makeKernel
    kernelModule = imp.load_module(module, file, filename, smt)
  File "kernels/poclbm/__init__.py", line 22, in
    import pyopencl as cl
  File "/usr/local/lib/python2.7/dist-packages/pyopencl-0.92-py2.7-linux-x86_64.egg/pyopencl/__init__.py", line 3, in
    import pyopencl._cl as _cl
ImportError: libOpenCL.so: cannot open shared object file: No such file or directory
sr. member
Activity: 280
Merit: 252
Perfect, thanks guys!

I am unfamiliar with screen but I will not be by the end of tonight... and will send a few your way if/when I get it implemented!
newbie
Activity: 59
Merit: 0
This is how I do it. It could be a lot more polished, but when I got it working, I just let it be. I assume you know how to use screen.

set_ati_profiles.sh sets clocks and fan settings

Code:
#!/bin/bash

DISPLAY=:0
export LD_LIBRARY_PATH=/home/xxxx/ati-stream-sdk-v2.1-lnx64/lib/x86_64/:

cd /home/xxxx

AMDOverdriveCtrl -i 0 card2.core1.safe.ovdr > /dev/null &
AMDOverdriveCtrl -i 3 card2.core2.safe.ovdr > /dev/null &
AMDOverdriveCtrl -i 4 card4.core1.safe.ovdr > /dev/null &
AMDOverdriveCtrl -i 7 card4.core2.safe.ovdr > /dev/null &

start1.sh starts miner for the first core:
Code:
#!/bin/bash
export DISPLAY=:0
export LD_LIBRARY_PATH=/home/xxxx/ati-stream-sdk-v2.1-lnx64/lib/x86_64/:
python phoenix.py -u http://xxxx:[email protected]:8332/ DEVICE=1 VECTORS BFI_INT AGGRESSION=11

Then I have a custom screenrc called start_miners:

Code:
shell /bin/bash

chdir /home/xxxx/bitcoin-0.3.21/bin/64/
screen 0
exec ./bitcoind -daemon
             
chdir /home/xxxx/phoenix-1.46/
screen 1
exec ./start1.sh
screen 2
exec ./start2.sh
screen 3
exec ./start3.sh
screen 4
exec ./start4.sh

After that set your X to auto login, and add two commands to "startup programs" in that nice GUI config tool in Ubuntu (startup settings or something like that?)

set_ati_profiles.sh
screen -d -m -c /home/xxxx/start_miners

That starts screen in detached mode, and you can just login with ssh to check up on your miners. No need for monitor/keyboard/mouse.

Some of the extra maneuvering in those scripts are done, because screen didn't seem to pass LD_LIBRARY_PATH if I tried give the miner command line directly to the screen. Also it felt like I had to be logged in on X for everything to work ok reliably, so that's why I used that "startup programs" menu, so they would be called after the login.
newbie
Activity: 7
Merit: 0
I'd just run them inside screen sessions, then you can connect from wherever and check on them.

Just something like:
screen -S "name of screen session here" -X screen  2>&1 1>/dev/null


One line like that for each instance of the miner and run it from whever, such as /etc/init/rc.local

I'm sure there should be a way to overclock from the commandline too, just have a search and run that command before spawning the miners.
sr. member
Activity: 280
Merit: 252
The title says it all.

I don't want to have to manually tweak my rigs every time I power them on.

There must be a simple way to open up multiple terminal screens, change all gpu clocks, and start mining - but I haven't figured it out!
Jump to: