Bitcoin Forum
November 11, 2024, 04:12:51 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [BOUNTY 35 BTC] Integrate support for "other devices" in the cgminer API  (Read 4086 times)
jamesg (OP)
VIP
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


AKA: gigavps


View Profile
February 29, 2012, 12:05:45 AM
Last edit: February 29, 2012, 12:20:11 AM by gigavps
 #1

Hello fellow bitcoiners,

It would seem that the cgminer does not support reporting on other devices like FPGA miners in the API. I would like to start a bounty to have this integrated into a release of cgminer.

I will start the bounty with 30 BTC.

  • 30 BTC - gigavps
  • 5 BTC - gnar1ta$

If you would like to contribute, post below and I will update the OP.
gnar1ta$
Donator
Hero Member
*
Offline Offline

Activity: 798
Merit: 500


View Profile
February 29, 2012, 12:08:31 AM
 #2

5 from me

Losing hundreds of Bitcoins with the best scammers in the business - BFL, Avalon, KNC, HashFast.
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
February 29, 2012, 12:56:20 AM
 #3

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

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
February 29, 2012, 10:43:35 AM
Last edit: February 29, 2012, 10:56:09 AM by kano
 #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)

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
jamesg (OP)
VIP
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


AKA: gigavps


View Profile
February 29, 2012, 01:29:00 PM
 #5

Thanks kano!

I'll try to hit you up in IRC this evening to get this thing on my BAMT rig.
gnar1ta$
Donator
Hero Member
*
Offline Offline

Activity: 798
Merit: 500


View Profile
February 29, 2012, 04:34:22 PM
Last edit: February 29, 2012, 09:12:16 PM by gnar1ta$
 #6

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.

Losing hundreds of Bitcoins with the best scammers in the business - BFL, Avalon, KNC, HashFast.
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
February 29, 2012, 07:18:10 PM
 #7

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

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
fred0
Sr. Member
****
Offline Offline

Activity: 349
Merit: 250


View Profile
February 29, 2012, 07:34:47 PM
 #8

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.
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
February 29, 2012, 07:49:11 PM
 #9

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.

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
fred0
Sr. Member
****
Offline Offline

Activity: 349
Merit: 250


View Profile
February 29, 2012, 08:48:46 PM
 #10

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://bitcointalk.org/index.php?topic=66779.msg775740#msg775740
gnar1ta$
Donator
Hero Member
*
Offline Offline

Activity: 798
Merit: 500


View Profile
February 29, 2012, 09:15:37 PM
 #11

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.

Losing hundreds of Bitcoins with the best scammers in the business - BFL, Avalon, KNC, HashFast.
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
February 29, 2012, 09:31:03 PM
 #12

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

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
gnar1ta$
Donator
Hero Member
*
Offline Offline

Activity: 798
Merit: 500


View Profile
March 01, 2012, 03:40:07 AM
 #13

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

Losing hundreds of Bitcoins with the best scammers in the business - BFL, Avalon, KNC, HashFast.
lodcrappo
Hero Member
*****
Offline Offline

Activity: 616
Merit: 506


View Profile
March 02, 2012, 06:50:35 AM
 #14

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".

jamesg (OP)
VIP
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


AKA: gigavps


View Profile
March 02, 2012, 11:13:45 AM
 #15

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!
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
March 02, 2012, 12:26:30 PM
 #16

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)

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
March 03, 2012, 12:32:58 PM
 #17

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)

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
jamesg (OP)
VIP
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


AKA: gigavps


View Profile
March 07, 2012, 07:30:57 PM
 #18

My part of the bounty has been paid.

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

Thanks Kano, you are the man!   Wink
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
March 07, 2012, 10:56:35 PM
 #19

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

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
gnar1ta$
Donator
Hero Member
*
Offline Offline

Activity: 798
Merit: 500


View Profile
March 07, 2012, 11:51:49 PM
 #20

Here is my little contribution 26cff7aaab5a40bfb507205acda817fb827cbb2ace12009622fbd9bf9d38b4bc

Losing hundreds of Bitcoins with the best scammers in the business - BFL, Avalon, KNC, HashFast.
Pages: [1] 2 »  All
  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!