Bitcoin Forum
April 27, 2024, 05:28:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 [45] 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 »
  Print  
Author Topic: DiabloMiner GPU Miner  (Read 866201 times)
nmat
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501


View Profile
July 13, 2011, 03:15:12 PM
 #881

You initialise the networkStates array with a length of 0 if the url command line option is not used, resulting in an ArrayIndexOutOfBoundsException on line 427:
Code:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at com.diablominer.DiabloMiner.DiabloMiner.execute(DiabloMiner.java:427)
        at com.diablominer.DiabloMiner.DiabloMiner.main(DiabloMiner.java:133)
Initialising it to 1 with the command line arguments:
Code:
-dd -o "swepool.net" -r 8337 -p "mypwd" -u "myuser" -w 128
I get the following exception:
Code:
Exception in thread "DiabloMiner GetWorkAsync for swepool.net" java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:33)
        at org.codehaus.jackson.JsonFactory.createJsonParser(JsonFactory.java:427)
        at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1285)
        at org.codehaus.jackson.map.ObjectMapper.readTree(ObjectMapper.java:1007)
        at com.diablominer.DiabloMiner.DiabloMiner$NetworkState.doJSONRPC(DiabloMiner.java:688)
        at com.diablominer.DiabloMiner.DiabloMiner$NetworkState$GetWorkAsync.run(DiabloMiner.java:815)
        at java.lang.Thread.run(Thread.java:680)

A little more testing without the url option might be in order...

I still have this error on Ubuntu 10.04. Did you fix it only in the code or are the binaries also updated?
1714195716
Hero Member
*
Offline Offline

Posts: 1714195716

View Profile Personal Message (Offline)

Ignore
1714195716
Reply with quote  #2

1714195716
Report to moderator
1714195716
Hero Member
*
Offline Offline

Posts: 1714195716

View Profile Personal Message (Offline)

Ignore
1714195716
Reply with quote  #2

1714195716
Report to moderator
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714195716
Hero Member
*
Offline Offline

Posts: 1714195716

View Profile Personal Message (Offline)

Ignore
1714195716
Reply with quote  #2

1714195716
Report to moderator
1714195716
Hero Member
*
Offline Offline

Posts: 1714195716

View Profile Personal Message (Offline)

Ignore
1714195716
Reply with quote  #2

1714195716
Report to moderator
1714195716
Hero Member
*
Offline Offline

Posts: 1714195716

View Profile Personal Message (Offline)

Ignore
1714195716
Reply with quote  #2

1714195716
Report to moderator
kaosbit
Newbie
*
Offline Offline

Activity: 25
Merit: 0


View Profile
July 13, 2011, 09:17:21 PM
 #882

And the argument that a JSON-RPC request has to be a POST is irrelevant because the LP request as defined by the Deepbit spec is not a JSON-RPC request just because its response looks like a JSON-RPC response.
A a protocol is mutual agreement on proper procedure, so yeah, you can pretty well do anything you want if people play along. But you should not call it HTTP or JSON-RPC then, if it merely happens to look similar.
Diablo chooses to follow the very well established HTTP standard and the somewhat established JSON-RPC standard, rather than the quite ad-hoc LP spec. This is a good thing, even if current pool practice also accommodates the JSON-RPC-ish GET LP, as you indicate:

Fortunately, it's easy enough for pools and proxies to support both by not caring if there is a POST body or not.
twmz
Hero Member
*****
Offline Offline

Activity: 737
Merit: 500



View Profile
July 13, 2011, 09:26:20 PM
 #883

But you should not call it HTTP or JSON-RPC then, if it merely happens to look similar.

Fortunately, the deepbit.net LP spec doesn't call it JSON-RPC.  And it does happen to be perfectly compliant use of HTTP (make a GET request; get back a response).

Was I helpful?  1TwmzX1wBxNF2qtAJRhdKmi2WyLZ5VHRs
WoT, GPG

Bitrated user: ewal.
DiabloD3 (OP)
Legendary
*
Offline Offline

Activity: 1162
Merit: 1000


DiabloMiner author


View Profile WWW
July 14, 2011, 03:28:37 AM
 #884

You initialise the networkStates array with a length of 0 if the url command line option is not used, resulting in an ArrayIndexOutOfBoundsException on line 427:
Code:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at com.diablominer.DiabloMiner.DiabloMiner.execute(DiabloMiner.java:427)
        at com.diablominer.DiabloMiner.DiabloMiner.main(DiabloMiner.java:133)
Initialising it to 1 with the command line arguments:
Code:
-dd -o "swepool.net" -r 8337 -p "mypwd" -u "myuser" -w 128
I get the following exception:
Code:
Exception in thread "DiabloMiner GetWorkAsync for swepool.net" java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:33)
        at org.codehaus.jackson.JsonFactory.createJsonParser(JsonFactory.java:427)
        at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1285)
        at org.codehaus.jackson.map.ObjectMapper.readTree(ObjectMapper.java:1007)
        at com.diablominer.DiabloMiner.DiabloMiner$NetworkState.doJSONRPC(DiabloMiner.java:688)
        at com.diablominer.DiabloMiner.DiabloMiner$NetworkState$GetWorkAsync.run(DiabloMiner.java:815)
        at java.lang.Thread.run(Thread.java:680)

A little more testing without the url option might be in order...

I still have this error on Ubuntu 10.04. Did you fix it only in the code or are the binaries also updated?

The binary is also updated. And don't put -o -p and -u args in quotes, thats nonsensical.

nmat
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501


View Profile
July 14, 2011, 05:50:51 AM
 #885

The binary is also updated. And don't put -o -p and -u args in quotes, thats nonsensical.

Thanks, I got it working and it's a little faster than poclbm. Are there stable releases or is everything just "up to date"? Not complaining, just asking Smiley

But now I have other problems. I am testing things out with a slow card (I am still thinking about investing in newer hardware) so I am running at ~15 Mhash/s with an ATI 5450 on Ubuntu 10.04. The miner runs, but after a while java pushes one of my CPU cores to 100% and stays there. My connection is a little unstable and sometimes the miner prints connection errors, but nothing else... Any idea?
ancow
Full Member
***
Offline Offline

Activity: 373
Merit: 100


View Profile WWW
July 14, 2011, 06:36:51 AM
 #886

The binary is also updated. And don't put -o -p and -u args in quotes, thats nonsensical.
I'd watch myself before calling anything I don't understand nonsensical. Especially -p and -u arguments may contain special characters that should be escaped from the shell, so it's generally good practice to put them in double-quotes when using them in a shell script.

BTC: 1GAHTMdBN4Yw3PU66sAmUBKSXy2qaq2SF4
DiabloD3 (OP)
Legendary
*
Offline Offline

Activity: 1162
Merit: 1000


DiabloMiner author


View Profile WWW
July 14, 2011, 08:30:18 AM
 #887

The binary is also updated. And don't put -o -p and -u args in quotes, thats nonsensical.
I'd watch myself before calling anything I don't understand nonsensical. Especially -p and -u arguments may contain special characters that should be escaped from the shell, so it's generally good practice to put them in double-quotes when using them in a shell script.

Sure, if you're on a shell that actually handles that. Windows afaik doesn't.

ellipsis
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
July 15, 2011, 03:20:49 AM
Last edit: July 15, 2011, 08:25:21 PM by ellipsis
 #888

Diablo, I ran into a few NPEs from commit 63d5dbb9732c6253cde2ae962aa2ae456f4ce02f. Would you like a patch sent somewhere?
DiabloD3 (OP)
Legendary
*
Offline Offline

Activity: 1162
Merit: 1000


DiabloMiner author


View Profile WWW
July 15, 2011, 10:45:59 PM
 #889

Diablo, I ran into a few NPEs from commit 63d5dbb9732c6253cde2ae962aa2ae456f4ce02f. Would you like a patch sent somewhere?

Get an account on github and send me a merge request. Its the easiest way to send me code.

ellipsis
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
July 16, 2011, 10:03:42 PM
 #890

Eh, too much trouble. I see you already fixed the exec java bit for Linux. For the others, replace your !"".equals(String) calls (8 instances) with a call to a method like this:

Code:
protected boolean hasLength(String str) {
    return str != null && str.length() > 0;
}

Your splitting on commas for pool support breaks values with commas in them (e.g., passwords).

Around 831, there should be a null check on getWorkParser.
DiabloD3 (OP)
Legendary
*
Offline Offline

Activity: 1162
Merit: 1000


DiabloMiner author


View Profile WWW
July 17, 2011, 02:04:39 AM
 #891

Eh, too much trouble. I see you already fixed the exec java bit for Linux. For the others, replace your !"".equals(String) calls (8 instances) with a call to a method like this:

Code:
protected boolean hasLength(String str) {
    return str != null && str.length() > 0;
}

Your splitting on commas for pool support breaks values with commas in them (e.g., passwords).

Around 831, there should be a null check on getWorkParser.

Java coders prefer checking against "" instead of checking length for some reason. Almost all the places I check also check for null as well.

And why around 831? At no point can that be null.

ellipsis
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
July 17, 2011, 02:28:42 AM
 #892

Eh, too much trouble. I see you already fixed the exec java bit for Linux. For the others, replace your !"".equals(String) calls (8 instances) with a call to a method like this:

Code:
protected boolean hasLength(String str) {
    return str != null && str.length() > 0;
}

Your splitting on commas for pool support breaks values with commas in them (e.g., passwords).

Around 831, there should be a null check on getWorkParser.

Java coders prefer checking against "" instead of checking length for some reason. Almost all the places I check also check for null as well.

Maybe retarded Java coders. !"".equals(null) evaluates as true (!false). You intend for it to return false, as in this case:

Code:
        if(!"".equals(url.getUserInfo())) {
          String[] userPassSplit = url.getUserInfo().split(":");

If url.getUserInfo() returns null, you will proceed into the conditional block and dereference a null.

Code:
        if(hasLength(url.getUserInfo())) {
          String[] userPassSplit = url.getUserInfo().split(":");

hasLength will return false, and skip the block. Hurrah.

And why around 831? At no point can that be null.

Really? What if you get an InterruptedException before you return from getWorkQueue.take()?

Lesson complete.
nmat
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501


View Profile
July 17, 2011, 03:53:35 AM
 #893

I want to reduce GPU usage because I use the computer where I mine. I suppose this is done with the -f option, but I can't find any documentation for it (except "target execution timing"). What sort of values should be used here?
ihokamik
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
July 17, 2011, 06:49:26 AM
 #894

I want to reduce GPU usage because I use the computer where I mine. I suppose this is done with the -f option, but I can't find any documentation for it (except "target execution timing"). What sort of values should be used here?

It's a matter of preference but here is the values I use.

-f 30 for browsing
-f 60 for HD video
-f 240 for games

It's also a good idea to disable flash acceleration and aero.
DiabloD3 (OP)
Legendary
*
Offline Offline

Activity: 1162
Merit: 1000


DiabloMiner author


View Profile WWW
July 17, 2011, 08:30:06 AM
 #895

Really? What if you get an InterruptedException before you return from getWorkQueue.take()?

Lesson complete.

Then I should be checking for the exception, not if it is != null.

ellipsis
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
July 17, 2011, 07:16:03 PM
 #896

Really? What if you get an InterruptedException before you return from getWorkQueue.take()?

Then I should be checking for the exception, not if it is != null.
Yes, a better alternative would be to move your getWorkParser variable declaration at 819 and everything below and outside of the catch (830-853) into the try block. Since I'm a stickler about these things, I would also make getWorkParser final and toss the unnecessary null assignments to get rid of another possible null dereference compiler warning. Smiley If you were aggressively nulling the variable because it was in a loop because you were worried about holding a reference in the loop, that GC weirdness workaround hasn't been necessary for a very long time. Besides, you will be reducing scope now, which is cleaner than null assignment, and the GC is non-deterministic, anyway.
nmat
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501


View Profile
July 18, 2011, 12:03:03 AM
 #897

It's a matter of preference but here is the values I use.

-f 30 for browsing
-f 60 for HD video
-f 240 for games

It's also a good idea to disable flash acceleration and aero.

Thank you
macrum
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
July 18, 2011, 07:14:16 PM
 #898

Hello!

I've found a bug in the current version...

I can't connect to my mining pool with the -l option anymore. -o still works. Please check this out.

Also i have this problem here with my second card i installed today:

[7/18/11 9:01:36 PM] Started                                                 
[7/18/11 9:01:36 PM] Connecting to: http://174.133.197.173:8332/             
[7/18/11 9:01:37 PM] Using AMD Accelerated Parallel Processing OpenCL 1.1 AMD-APP-SDK-v2.4 (595.10)
[7/18/11 9:01:40 PM] BFI_INT patching enabled, disabling hardware checking   
[7/18/11 9:01:40 PM] Added Cayman (#1) (24 CU, local work size of 256)       
[7/18/11 9:01:44 PM] BFI_INT patching enabled, disabling hardware checking   
[7/18/11 9:01:44 PM] Added Cayman (#2) (24 CU, local work size of 256)       
[7/18/11 9:01:46 PM] 174.133.197.173 accepted block 1 from Cayman (#1)       
[7/18/11 9:02:00 PM] 174.133.197.173 accepted block 2 from Cayman (#2)       
[7/18/11 9:02:12 PM] 174.133.197.173 accepted block 3 from Cayman (#1)       
[7/18/11 9:02:14 PM] 174.133.197.173 accepted block 4 from Cayman (#2)       
[7/18/11 9:02:22 PM] 174.133.197.173 accepted block 5 from Cayman (#1)       
mhash: 362.1/412.3 | accept: 5 | reject: 0 | hw error: 40718

Please help me, i really don't like those python miners...

I am running on CentOS 6 with two 6950's
If you need more info please tell!
DiabloD3 (OP)
Legendary
*
Offline Offline

Activity: 1162
Merit: 1000


DiabloMiner author


View Profile WWW
July 18, 2011, 08:36:03 PM
 #899

Hello!

I've found a bug in the current version...

I can't connect to my mining pool with the -l option anymore. -o still works. Please check this out.

Also i have this problem here with my second card i installed today:

[7/18/11 9:01:36 PM] Started                                                 
[7/18/11 9:01:36 PM] Connecting to: http://174.133.197.173:8332/             
[7/18/11 9:01:37 PM] Using AMD Accelerated Parallel Processing OpenCL 1.1 AMD-APP-SDK-v2.4 (595.10)
[7/18/11 9:01:40 PM] BFI_INT patching enabled, disabling hardware checking   
[7/18/11 9:01:40 PM] Added Cayman (#1) (24 CU, local work size of 256)       
[7/18/11 9:01:44 PM] BFI_INT patching enabled, disabling hardware checking   
[7/18/11 9:01:44 PM] Added Cayman (#2) (24 CU, local work size of 256)       
[7/18/11 9:01:46 PM] 174.133.197.173 accepted block 1 from Cayman (#1)       
[7/18/11 9:02:00 PM] 174.133.197.173 accepted block 2 from Cayman (#2)       
[7/18/11 9:02:12 PM] 174.133.197.173 accepted block 3 from Cayman (#1)       
[7/18/11 9:02:14 PM] 174.133.197.173 accepted block 4 from Cayman (#2)       
[7/18/11 9:02:22 PM] 174.133.197.173 accepted block 5 from Cayman (#1)       
mhash: 362.1/412.3 | accept: 5 | reject: 0 | hw error: 40718

Please help me, i really don't like those python miners...

I am running on CentOS 6 with two 6950's
If you need more info please tell!

Holy crap dude. What is the entire arguments you're feeding it?

Also, what did you try feeding it with -l? It should work fine if you're using it right.

macrum
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
July 18, 2011, 09:05:50 PM
 #900

Sorry for that little info, i was late.

I am feeding it with this:
./DiabloMiner-Linux.sh -u workername -p password -l nofeemining.com

This worked fine with the release from Wed 06 Jul 2011 (modify date of DiabloMiner-Linux.sh)

Additional Info i am using SDK 2.4 and Catalyst 11.6


Old release:
Code:
[robert@RIG02 DiabloMiner.old]$ ./DiabloMiner-Linux.sh -u username -p password -l nofeemining.com
[7/18/11 10:54:34 PM] Started                                                
[7/18/11 10:54:34 PM] Connecting to: http://nofeemining.com:8332/            
[7/18/11 10:54:34 PM] Using AMD Accelerated Parallel Processing OpenCL 1.1 AMD-APP-SDK-v2.4 (595.10)
[7/18/11 10:54:37 PM] BFI_INT patching enabled, disabling hardware checking  
[7/18/11 10:54:37 PM] Added Cayman (#1) (24 CU, local work size of 256)      
[7/18/11 10:54:42 PM] BFI_INT patching enabled, disabling hardware checking  
[7/18/11 10:54:42 PM] Added Cayman (#2) (24 CU, local work size of 256)      
mhash: 407.6/459.3 | accept: 0 | reject: 0 | hw error: 21104

Newest Binary:
Code:
[robert@RIG02 DiabloMiner]$ ./DiabloMiner-Linux.sh -u username -p password -l nofeemining.com
Exception in thread "main" java.net.MalformedURLException: no protocol: nofeemining.com
    at java.net.URL.<init>(URL.java:583)
    at java.net.URL.<init>(URL.java:480)
    at java.net.URL.<init>(URL.java:429)
    at com.diablominer.DiabloMiner.DiabloMiner.execute(DiabloMiner.java:307)
    at com.diablominer.DiabloMiner.DiabloMiner.main(DiabloMiner.java:133)

Any Ideas where this hardware errors come from(I asume hw = hardware?)? When I install only one card into my rig than there is no problem (tested both of them).
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 [45] 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 »
  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!