netxshare (OP)
|
|
May 16, 2011, 05:18:28 AM |
|
I slapped this together last night I needed a easy way to access ADL from python so I could configure things remotely. Now all this is a wrapper for AMDOverdriveCtrl ( http://amdovdrvctrl.sourceforge.net/ ) all I have done is turned it into a python extended library, all ADL code is by Thorsten Gilling. I am not sure if anyone will find a use for it but it is something I wanted. It works on Windows and Linux. I would like to put it in with a miner next. ADL SDK - http://developer.amd.com/Downloads/ADL_SDK_3.0.zipPut the ADL SDK in ./ADL_SDK Functions pyADL.SetupADL(DeviceIndex) - This sets the GPU you wish to use. pyADL.getTemp() - Returns the GPU Temp. pyADL.getFanSpeed() - Returns the fan speed percent. pyADL.getFanRPM() - Returns the fan RPMs. pyADL.getCoreClockSpeed() - Returns Current Core Clock Speed. pyADL.getMemoryClockSpeed() - Returns Current Memory Clock Speed. pyADL.getVoltage() - Returns Current Voltage. pyADL.setFanSpeed(Precent) - Sets The Fan Speed. pyADL.setCoreClockSpeed(Level,Speed) - Sets Core Clock Speed. Level(0,1,2) pyADL.setMemoryClockSpeed(Level,Speed) - Sets Memory Clock Speed. Level(0,1,2) pyADL.setVoltage(Level, Voltage) - Sets Voltage. Level(0,1,2) Example import pyADL pyADL.SetupADL(0) print pyADL.getTemp() print pyADL.getFanSpeed() print pyADL.getFanRPM() print pyADL.getCoreClockSpeed() print pyADL.getMemoryClockSpeed() print pyADL.getVoltage() pyADL.setFanSpeed(75) pyADL.SetupADL(5) # Switch to Second GPU on 6990 print pyADL.getTemp() http://www.bitshift.io/pyADL/https://github.com/bitshiftio/pyADL
|
donations: 1CWddfhXagPoWgzUCs7oVHFjwBmqbAoJRr
|
|
|
|
|
|
|
|
In order to achieve higher forum ranks, you need both activity points and merit points.
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
jedi95
|
|
May 16, 2011, 06:55:00 AM |
|
This could be very useful if implemented into a kernel for Phoenix. Especially when combined with MMP which supports sending meta to the server. That would allow for some interesting remote monitoring capabilities. Right now I have to run another script alongside the miners to update the temps.
|
Phoenix Miner developer Donations appreciated at: 1PHoenix9j9J3M6v3VQYWeXrHPPjf7y3rU
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
May 17, 2011, 11:59:52 PM |
|
that is cool. I will try it tomorrow. The big GUIs to overclock start making me sick.
how do the levels work? is there some kind of automatic switching?
|
|
|
|
fpgaminer
|
|
May 18, 2011, 02:09:53 AM |
|
I am very interested in this! Haven't had the time to play with it yet, but I appreciate your work! *HIGH FIVE*
|
|
|
|
bolapara
Member
Offline
Activity: 78
Merit: 10
|
|
May 18, 2011, 02:59:48 AM |
|
I was contemplating writing this exact thing. Thank you. Will check it out.
|
|
|
|
Cryptoman
|
|
May 18, 2011, 05:31:15 AM |
|
Now all this is a wrapper for AMDOverdriveCtrl ( http://amdovdrvctrl.sourceforge.net/ ) all I have done is turned it into a python extended library, all ADL code is by Thorsten Gilling. I'm a bit confused. Do I still need AMDOverdriveCtrl compiled and running on my system in order to use pyADL? I've been unable to get AMDOverdriveCtrl to compile because of wxWidgets.
|
"A small body of determined spirits fired by an unquenchable faith in their mission can alter the course of history." --Gandhi
|
|
|
Cryptoman
|
|
May 18, 2011, 05:08:47 PM |
|
OK, I answered my own question. You don't need to compile the AMDOverdriveCtrl GUI first. However, the author seems to have only partially changed the extension name from ADL to pyADL. You still need to refer to it as ADL, viz: import ADL
ADL.SetupADL(0) print ADL.getTemp() print ADL.getCoreClockSpeed() print ADL.getMemoryClockSpeed() ADL.setMemoryClockSpeed(0,300) ADL.setMemoryClockSpeed(1,300) ADL.setMemoryClockSpeed(2,300)
I'm not sure what the levels refer to, but it would probably be clear if I read the SDK notes. At any rate, it appears that level 2 is the one that is engaged on the GPUs while mining under full load.
|
"A small body of determined spirits fired by an unquenchable faith in their mission can alter the course of history." --Gandhi
|
|
|
gat3way
|
|
May 18, 2011, 05:40:46 PM |
|
Welcome to the hell of properly mapping ADL adapters to OpenCL devices The scenario with unsupported by OCL onboard adapters is easy to manage...but you have lots of other peculiarities there. E.g some 5970s are reported as a single adapter (2 devices in OpenCL)....some as 4 adapters with different ids (still 2 devices in OpenCL). The good thing is that I haven't seen yet a case where we have different ordering of devices...that would really be a problem. I've asked the AMD OpenCL guys if it's possible to create an extension that exports temperature/fan speed data to OpenCL...never got any reply.
|
|
|
|
teknohog
|
|
May 18, 2011, 05:48:21 PM |
|
Thanks, this looks nice I was thinking of doing something similar the other day, but I noticed that AMDOverdriveCtrl can also run on the command line (with a proper DISPLAY= variable in the environment). The only problem was that in this mode, it can only load one default setting, so it takes some scripting to set multiple cards. In my case, the card indices are 0 and 3, so my config files are default-0.ovdr and default-3.ovdr. Each is symlinked to default.ovdr in turn, for running the overdrive command. CMD=AMDOverdriveCtrl DIR=~/.AMDOverdriveCtrl LINK=default.ovdr
cd $DIR
export DISPLAY=:0
INDICES="`ls default-*.ovdr | sed -e 's/default-\([0-9]\+\).ovdr/\1/'`"
for i in $INDICES; do rm $LINK ln -s default-$i.ovdr $LINK $CMD -i $i -a -b done
|
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
May 19, 2011, 07:56:43 AM |
|
ok, I got it to work. the installation was a royal pain. it's cool but there still are some problems.
it's crashing badly (randomly?) every couple hundred calls with a runtime error in pythonw, I am still looking into that.
it's very verbose on the command line. Is there an easy way to redirect it's output to something else than stdout (besides modifying the .cpp)?
|
|
|
|
netxshare (OP)
|
|
May 19, 2011, 01:26:19 PM |
|
Sorry, was not aware anyone else had posted in this thread.
You do not need AMDOverdriveCtrl to use this. I did as you noticed change it from pyADL to ADL in the python code using pyADL was not correct.
I think I know what is causing the crashing I will take a look in to it and update the code. I can also add a option to enable/disable the output, this way it can be enabled when you are configuring the system and disable when you need it to run all the time.
|
donations: 1CWddfhXagPoWgzUCs7oVHFjwBmqbAoJRr
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
May 19, 2011, 02:23:55 PM |
|
It might be some deallocation problem. I got this error once: fatal python error dealocating none mostly it crashes with pretty much no information why. I am so used to having nice Python tracebacks. =)
Is there a particular reason you return NULL sometimes and not Py_None? Or is it the same?
It would be interesting to build a temperature controlled miner with this tool.
|
|
|
|
netxshare (OP)
|
|
May 19, 2011, 03:39:23 PM |
|
It might be some deallocation problem. I got this error once: fatal python error dealocating none mostly it crashes with pretty much no information why. I am so used to having nice Python tracebacks. =)
Is there a particular reason you return NULL sometimes and not Py_None? Or is it the same?
It would be interesting to build a temperature controlled miner with this tool.
I updated a line of code on github I am not sure if this will make a difference at all, but I ran a loop for a while and had no problems. Could you please update and give it a shot.
|
donations: 1CWddfhXagPoWgzUCs7oVHFjwBmqbAoJRr
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
May 19, 2011, 03:57:02 PM |
|
Unfortunately still the same problem. I'll take another look at it later. Now sports =)
|
|
|
|
bolapara
Member
Offline
Activity: 78
Merit: 10
|
|
May 19, 2011, 06:56:15 PM Last edit: May 19, 2011, 08:10:42 PM by bolapara |
|
Odd, can't get core or memory clocks from one of my two 5870s. core: getCoreClockSpeed() Failed. mem: getMemoryClockSpeed() Failed.
Edit: typo, should be 5870.
|
|
|
|
netxshare (OP)
|
|
May 20, 2011, 06:18:08 AM |
|
Odd, can't get core or memory clocks from one of my two 5870s. core: getCoreClockSpeed() Failed. mem: getMemoryClockSpeed() Failed.
Edit: typo, should be 5870. Are you running it on linux? if so did you do env Display= :0.1 or whatever you need to do? I have done a few tests and I ran the current version in a for loop of 1550 with calls to every getXXX function on each gpu, no errors. I also started working on an example of something I am using pyADL for It is a real time chart so it updates on it's own, will be useful when all the remote monitoring is done.
|
donations: 1CWddfhXagPoWgzUCs7oVHFjwBmqbAoJRr
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
May 20, 2011, 10:38:18 AM |
|
it's definiteley much more stable now! did not crash on me so far. donated a coin (and unfortunately I am not one of the old dragons sitting on a big pile of early btc).
|
|
|
|
Mononofu
Newbie
Offline
Activity: 15
Merit: 0
|
|
May 20, 2011, 01:37:45 PM |
|
Any plans on releasing that realtime temperature tracker? Looks awesome, and would save me quite some work
|
|
|
|
bolapara
Member
Offline
Activity: 78
Merit: 10
|
|
May 21, 2011, 07:47:12 PM |
|
Are you running it on linux? if so did you do env Display= :0.1 or whatever you need to do?
Yep. DISPLAY is set properly. Other calls (like setfanspeed) work. Those two calls always fail.
|
|
|
|
|
|