Pages:
Author

Topic: [BOUNTY 35 BTC] Integrate support for "other devices" in the cgminer API (Read 4091 times)

legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
Here is my little contribution 26cff7aaab5a40bfb507205acda817fb827cbb2ace12009622fbd9bf9d38b4bc
Yep received also thanks gnar1ta$!!

I took a sidetrack with the ZTEX boards (which I failed to do - as I said in the cgminer thread) but anyway ...

There is still an issue with compiling in support for both Bitforce and Icarus into the same binary.
I was thinking it was some sort of Icarus issue, but Xiangfu mentioned it's probably the Bitforce test code itself never getting a reply and thus hanging for eternity.
(I'm not a fan of Luke-jr's suggested fix either - it shouldn't fail by default in my opinion - it should only attempt on anything not specified that is known to be a Bitforce, by default)

I'll look into that after the current pull goes into the main git then hopefully in the not too distant future when having multiple FPGA code is stable we can convince ckolivas to enable both by default rather than everyone having to recompile it themselves.
vip
Activity: 1358
Merit: 1000
AKA: gigavps
Here is my little contribution 26cff7aaab5a40bfb507205acda817fb827cbb2ace12009622fbd9bf9d38b4bc

Awesome. Thanks gnar1ta$. We'll consider this feature done. Hopefully conman comes back to btc land soon.
donator
Activity: 798
Merit: 500
Here is my little contribution 26cff7aaab5a40bfb507205acda817fb827cbb2ace12009622fbd9bf9d38b4bc
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
My part of the bounty has been paid.

http://blockchain.info/tx-index/3120210/b0dcd4f9fb28c2b690ec5ce93a4aee955b5708e2395def8c379df7c66970135a

Thanks Kano, you are the man!   Wink
Thanks gigavps!!
Yep it's in my wallet.

I did the testing and found one error (only a display error that didn't affect anything) with an error message which I fixed and then sent the pull request.
It's been a pull request in ckolivas' git for 4 days now.
I was gonna post here once he merged it in.
I'll post again anyway when that happens.
(He's not paying much attention to Bitcoin at the moment as he said)

Again Thanks!! Smiley
vip
Activity: 1358
Merit: 1000
AKA: gigavps
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
Got the Icarus working tonight
(BFL talking to it to test if Icarus is a BFL seems to stuff it up - I'll need to sort that out in the near future)
I'll do the thorough testing of the API changes tomorrow (it's now 11:30pm)
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
Well ... I have my 2 Icarus ... but can't get them to mine Sad
So it may be a little way off yet until I test it well enough.
Hopefully tomorrow Saturday ... (It's almost midnight now)
vip
Activity: 1358
Merit: 1000
AKA: gigavps
Fix #11 for BAMT provides cgminer 2.3.1f with the api.c patch.  Bitforce and Icarus are enabled.

As I also don't any hardware to test with, I can't say much more than "it builds, and it works for gpu mining".

I should be able to test this out tomorrow. Thanks lodcrappo!
hero member
Activity: 616
Merit: 506
Fix #11 for BAMT provides cgminer 2.3.1f with the api.c patch.  Bitforce and Icarus are enabled.

As I also don't any hardware to test with, I can't say much more than "it builds, and it works for gpu mining".

donator
Activity: 798
Merit: 500
Well I don't have any FPGA's to test it with yet so let me know how it turns out...especially on BAMT.

That build now gives the correct version:
Code:
root@5970:~/cgminer# ./cgminer --version
cgminer 2.3.1f
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
No, no bounty yet please Smiley
I want it tested fully first.
I can't do a thorough test until I get my Icarus', and the bounty was not until it gets into ckolivas' git.
... well the exact words are "a release of cgminer" but I consider being in his git necessary at least before that Smiley
So yeah I won't be sending the pull request to ckolivas quite yet.
(hmm I should go check where that parcel is now on the ems web site ...)
Edit: nice, it says customs here in Sydney now - I might get it before the weekend after all
donator
Activity: 798
Merit: 500
Thanks Kano, I updated it to clone your git.  It will be several hours for me to get to my wallet to send the bounty.
sr. member
Activity: 349
Merit: 250
It's not in ckolivas git yet.
So you'll have to grab api.c from my git (or clone my whole git instead of ckolivas)
Since I haven't actually tested and run the 'PGA' code yet on anything I'm not gonna request ckolivas put it in his master git yet of course Smiley

To just grab the single file (api.c): (after you use the git clone command on ckolivas' git)
Code:
wget https://github.com/kanoi/cgminer/raw/master/api.c
If you do that in a directory that already has api.c it will call the new copy api.c.1 and you'll have to rename it
Code:
mv api.c.1 api.c
It is definitely working.  I have bash script running to monitor hashing devices - here is the screen.

Ah good thanks for that Smiley
As mentioned I haven't got my Icarus' yet so any testing of the "PGA" code is greatly appreciated.

I guess you noticed that it calls it "PGA":0 but also says "Name":"BFL" and "ID":0 as you've used that name for it.
The code is all "PGA" everywhere since, like "GPU", it doesn't want different commands for similar "PGA" devices but passes that extra info so you can use the "BFL" or "ICA" names that cgminer shows on it's screen.
I posted the script here, it is using nc(netcat) to connect to the sockets. I'm not really happy with the quality of the script, but it was quick.  Roll Eyes
https://bitcointalksearch.org/topic/m.775740
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
It's not in ckolivas git yet.
So you'll have to grab api.c from my git (or clone my whole git instead of ckolivas)
Since I haven't actually tested and run the 'PGA' code yet on anything I'm not gonna request ckolivas put it in his master git yet of course Smiley

To just grab the single file (api.c): (after you use the git clone command on ckolivas' git)
Code:
wget https://github.com/kanoi/cgminer/raw/master/api.c
If you do that in a directory that already has api.c it will call the new copy api.c.1 and you'll have to rename it
Code:
mv api.c.1 api.c
It is definitely working.  I have bash script running to monitor hashing devices - here is the screen.

Ah good thanks for that Smiley
As mentioned I haven't got my Icarus' yet so any testing of the "PGA" code is greatly appreciated.

I guess you noticed that it calls it "PGA":0 but also says "Name":"BFL" and "ID":0 as you've used that name for it.
The code is all "PGA" everywhere since, like "GPU", it doesn't want different commands for similar "PGA" devices but passes that extra info so you can use the "BFL" or "ICA" names that cgminer shows on it's screen.
sr. member
Activity: 349
Merit: 250
It's not in ckolivas git yet.
So you'll have to grab api.c from my git (or clone my whole git instead of ckolivas)
Since I haven't actually tested and run the 'PGA' code yet on anything I'm not gonna request ckolivas put it in his master git yet of course Smiley

To just grab the single file (api.c): (after you use the git clone command on ckolivas' git)
Code:
wget https://github.com/kanoi/cgminer/raw/master/api.c
If you do that in a directory that already has api.c it will call the new copy api.c.1 and you'll have to rename it
Code:
mv api.c.1 api.c
It is definitely working.  I have bash script running to monitor hashing devices - here is the screen.
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
It's not in ckolivas git yet.
So you'll have to grab api.c from my git (or clone my whole git instead of ckolivas)
Since I haven't actually tested and run the 'PGA' code yet on anything I'm not gonna request ckolivas put it in his master git yet of course Smiley

To just grab the single file (api.c): (after you use the git clone command on ckolivas' git)
Code:
wget https://github.com/kanoi/cgminer/raw/master/api.c
If you do that in a directory that already has api.c it will call the new copy api.c.1 and you'll have to rename it
Code:
mv api.c.1 api.c
donator
Activity: 798
Merit: 500
gigavps here is build instructions for BAMT.  I don't usually use autogen so I'm not sure if it pulls the new api.c, kano could clarify that and probably clean up my install - my Linux-jitsu is not that great.

Code:
apt-get install libncurses-dev libcurl4-openssl-dev autoconf automake
cd /opt/
mkdir ADL
cd ADL/
wget http://download2-developer.amd.com/amd/GPU/zip/ADL_SDK_3.0.zip
unzip ADL_SDK_3.0.zip
cd miners/
mv cgminer/ cgminer.orig
git clone https://github.com/kanoi/cgminer.git
cd cgminer/
./autogen.sh
cp /opt/ADL/include/*.h /opt/miners/cgminer/ADL_SDK/
CFLAGS="-O2 -Wall -march=native -I/opt/AMD-APP-SDK-v2.4-lnx32/include/" LDFLAGS="-L/opt/AMD-APP-SDK-v2.4-lnx32/lib/x86/" ./configure --enable-bitforce
make

Edited to clone kano's git and pull the new api.c.
vip
Activity: 1358
Merit: 1000
AKA: gigavps
Thanks kano!

I'll try to hit you up in IRC this evening to get this thing on my BAMT rig.
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
OK code changes are in my github for support of both Icarus and BitForce FPGA's (called PGA/pga in the API)

 https://github.com/kanoi/cgminer

Only one file change is needed if you just want to grab the difference required: api.c

The build instructions are:
(of course don't forget to first copy the 3 ADL *.h files into the ADL_SDK/ directory for ADL GPU mining support)
Code:
./autogen.sh
CFLAGS="-O2 -W -Wall" ./configure --enable-bitforce --enable-icarus
make

If you clone my whole git:
I also changed README to update the API docs
and modified configure.ac to temporarily make the version 2.3.1f

I don't have my Icarus' yet so I can't actually test it 100% - so it would be good if anyone else can test it.
Since ckolivas isn't around at the moment, I'll leave it in my git (I wont issue a pull request to ckolivas yet) until I've been able to test it conclusively myself.

I've also made a linux ubuntu 11.04 executable download: http://www.tradebtc.net/cgminer
If anyone needs a different version, come visit me in IRC at Freenode in #cgminer
If anyone tests it, come visit me in IRC at Freenode in #cgminer
If anyone has any questions, come visit me in IRC at Freenode in #cgminer

It of course works normally as a miner (since I only changed the api.c code) and the new API is responding as expected for me.

Since I'm in Aus, I'll probably not respond in IRC from about 2 hours after this post until about 8 hours after this post.
It's pretty quiet in IRC lately (and no ckolivas there makes it even quieter)
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
LOL - OK - OK I get it
gigavps you already said 30 BTC - and I said that was a lot
It's on priority 1 now Smiley
Pages:
Jump to: