Pages:
Author

Topic: X6500 Custom FPGA Miner - page 38. (Read 220050 times)

full member
Activity: 148
Merit: 100
January 14, 2012, 10:30:47 AM
i gave the miningloop the chain_list, an called the 2 fpga's serial (in the miningloop) no more parallel, the lock is still in my code but it would also work if i delete does line Wink and the miningloop is still a thread

the thought behind is to make a miningloop per X6500, so i only need to add code for the board handling and some more adoption to be compatible with X6000
but i have not much motivation in making more card support since i only have one
my next step will be checking compatibily with P2P, i havn't looked into it but i heard it isn't working now or has it anybody running on P2P-pool?

maybe i should think about getting an github account so we could work together and not always working on the same idea in parallel Smiley

hero member
Activity: 720
Merit: 525
January 14, 2012, 10:19:36 AM
Why do I have the feeling that shad and I have been working on the same thing again? Wink

I'm testing a rewrite with are no more Lock()'s and it appears to work. The cool thing about this is that it paves the way towards mining with many boards within one instance. I'll push my changes to Github after testing it for some more time, then it will be interesting to see what effect it has on the lock-up bug.
sr. member
Activity: 445
Merit: 250
January 14, 2012, 08:02:24 AM
Thanks shad, will do.
full member
Activity: 148
Merit: 100
January 14, 2012, 07:47:04 AM
the exeption is as i thought
jtag can not read, i guess the interface is at use in that moment
is you system under great load?

i have a mine.py with a major change, i am running it since 10hours without troubles and at the usual MHash/sec
i believe it fixes the hangup,
as you have this problem more frequently than i, i would like so send you my modified mine.py for testing, maybe you could send me an PM with your mail-adress
sr. member
Activity: 445
Merit: 250
January 14, 2012, 06:47:35 AM
This one's just stalled:
Code:
2012-01-14 11:32:52 | (FPGA1) Golden nonce found
2012-01-14 11:32:52 | (FPGA1) accepted 7d1cf548L
2012-01-14 11:32:57 | Long-poll: new block 00000be305aa0b10
2012-01-14 11:32:57 | (FPGA0) jobqueue loaded (1)
2012-01-14 11:32:58 | (FPGA1) jobqueue loaded (1)
2012-01-14 11:32:58 | (FPGA0) Job data loaded
2012-01-14 11:32:58 | (FPGA1) Job data loaded
2012-01-14 11:33:02 | (FPGA0) Golden nonce found
2012-01-14 11:33:03 | (FPGA0) accepted e9237680L
2012-01-14 11:33:13 | (FPGA0) Golden nonce found
2012-01-14 11:33:13 | (FPGA0) accepted 53c4cb99L
2012-01-14 11:33:18 | (FPGA0) jobqueue loaded (1)
2012-01-14 11:33:18 | (FPGA1) jobqueue loaded (1)
2012-01-14 11:33:38 | (FPGA0) jobqueue loaded (1)
2012-01-14 11:34:07 | Long-poll: new block 00000be305aa0b10
2012-01-14 11:34:07 | (FPGA0) jobqueue loaded (1)
2012-01-14 11:34:07 | (FPGA1) jobqueue loaded (1)
310.62 MH/s | 0: 178/2/0 1.1%/0.0% | 1: 183/0/0 0.0%/0.0% | 1h24m | AH00WIBS
cttl-c gives:
Code:
2012-01-14 11:33:13 | (FPGA0) accepted 53c4cb99L
2012-01-14 11:33:18 | (FPGA0) jobqueue loaded (1)
2012-01-14 11:33:18 | (FPGA1) jobqueue loaded (1)
2012-01-14 11:33:38 | (FPGA0) jobqueue loaded (1)
2012-01-14 11:34:07 | Long-poll: new block 00000be305aa0b10
2012-01-14 11:34:07 | (FPGA0) jobqueue loaded (1)
2012-01-14 11:34:07 | (FPGA1) jobqueue loaded (1)
Exception in thread Thread-4:
Traceback (most recent call last):
  File "c:\python267\lib\threading.py", line 534, in __bootstrap_inner
    self.run()
  File "c:\python267\lib\threading.py", line 486, in run
    self.__target(*self.__args, **self.__kwargs)
  File "mine.py", line 274, in mineloop
    nonce = fpgaReadNonce(jtag[chain])
  File "mine.py", line 129, in fpgaReadNonce
    byte = fpgaReadByte(jtag)
  File "mine.py", line 115, in fpgaReadByte
    byte = bits2int(jtag.read_dr(bits))
  File "C:\x6500\xx\jtag.py", line 159, in read_dr
    return self.shift_dr(bits, read=True)
  File "C:\x6500\xx\jtag.py", line 156, in shift_dr
    return self.read_tdo(len(bits)+self._tckcount)[:len(bits)-self.current_part]

  File "C:\x6500\xx\jtag.py", line 163, in read_tdo
    data = self.ft232r.read_data(num)
  File "C:\x6500\xx\ft232r.py", line 229, in read_data
    self.flush()
  File "C:\x6500\xx\ft232r.py", line 207, in flush
    self._setAsyncMode()
  File "C:\x6500\xx\ft232r.py", line 197, in _setAsyncMode
    raise DeviceNotOpened()
DeviceNotOpened

 E                                                                           xce
ption in thread Thread-3:
Traceback (most recent call last):
  File "c:\python267\lib\threading.py", line 534, in __bootstrap_inner
    self.run()
  File "c:\python267\lib\threading.py", line 486, in run
    self.__target(*self.__args, **self.__kwargs)
  File "mine.py", line 260, in mineloop
    nonce = fpgaReadNonce(jtag[chain])
  File "mine.py", line 129, in fpgaReadNonce
    byte = fpgaReadByte(jtag)
  File "mine.py", line 115, in fpgaReadByte
    byte = bits2int(jtag.read_dr(bits))
  File "C:\x6500\xx\jtag.py", line 159, in read_dr
    return self.shift_dr(bits, read=True)
  File "C:\x6500\xx\jtag.py", line 156, in shift_dr
    return self.read_tdo(len(bits)+self._tckcount)[:len(bits)-self.current_part]

  File "C:\x6500\xx\jtag.py", line 163, in read_tdo
    data = self.ft232r.read_data(num)
  File "C:\x6500\xx\ft232r.py", line 246, in read_data
    while self.handle.getQueueStatus() < wrote:
AttributeError: 'NoneType' object has no attribute 'getQueueStatus'

2012-01-14 11:38:30 | Exiting...
Run Summary:
-------------
Device: 1
Serial: AH00WIBS
JTAG chain: 2
Number of FPGAs: 2
Running time: 1h26m
Getwork interval: 20 secs
FPGA 0:
  Accepted: 178
  Rejected: 2 (1.11%)
  Invalid: 0 (0.00%)
  Hashrate (all nonces): 149.56 MH/s
  Hashrate (valid nonces): 149.56 MH/s
  Hashrate (accepted shares): 147.90 MH/s
FPGA 1:
  Accepted: 183
  Rejected: 0 (0.00%)
  Invalid: 0 (0.00%)
  Hashrate (all nonces): 153.71 MH/s
  Hashrate (valid nonces): 153.71 MH/s
  Hashrate (accepted shares): 152.05 MH/s
Total hashrate for device: 303.28 MH/s / 303.28 MH/s / 299.95 MH/s
Hope it helps.
sr. member
Activity: 445
Merit: 250
January 14, 2012, 04:24:31 AM
could someone having the bug...
Running on one board now, seeing
jobqueue loaded (1)
I'll swap some other boards over to this version a little later...
hero member
Activity: 720
Merit: 525
January 13, 2012, 05:48:00 PM
Sorry, things have been really busy with my day job this week, so I only have a minute to address the lock-up bug a few people have been having. Shad, thanks for finding the info about the possible python bug where threads could obtain the lock at the same time. To test this, could someone having the bug uncomment line 166 in rpcClient.py? It also needs a couple self.'s added to it. It should read:

self.logger.reportDebug("(FPGA%d) jobqueue loaded (%d)" % (chain, self.jobqueue[chain].qsize()))

This would tell us if the miner threads are locked up, but the rpcClient is still running. This only adds one line before each "Job data loaded" output so it shouldn't overwhelm the log output.
full member
Activity: 148
Merit: 100
January 13, 2012, 12:17:35 PM
dont know if its really needed if you have a trusted network
Changelog 2.6.6 to 2.6.7
Quote
What's New in Python 2.6.7 rc 2?
================================

*Release date: 2011-05-20*

*NOTE: Python 2.6 is in security-fix-only mode.  No non-security bug fixes are
 allowed.  Python 2.6.7 and beyond will be source only releases.*


Library
-------

- Issue #11662: Make urllib and urllib2 ignore redirections if the
  scheme is not HTTP, HTTPS or FTP (CVE-2011-1521).

- Issue #11442: Add a charset parameter to the Content-type in SimpleHTTPServer
  to avoid XSS attacks.


What's New in Python 2.6.7 rc 1?
================================

*Release date: 2011-05-06*

Library
-------

- Issue #9129: smtpd.py is vulnerable to DoS attacks deriving from missing
  error handling when accepting a new connection.
sr. member
Activity: 410
Merit: 252
Watercooling the world of mining
January 13, 2012, 12:11:04 PM
Maybe just to remind it.

Please add a link to the executable of python 2.6.7 for the Windows users Smiley

http://www.activestate.com/activepython/downloads

Thanks
full member
Activity: 148
Merit: 100
January 13, 2012, 10:56:33 AM
1. i am also at slush's, i believe this guy isn't sleeping Smiley if there is a pool problem it is fixed so fast

2. i dont like this "maybe" MHs/sec, i am testing some optimization and i wanted a stable allover measurement so i did some changes
Quote
            accsum = 0
            for chain in self.chain_list:
               acc = self.accepted_count[chain]
               accsum = accsum + acc
               rej = self.rejected_count[chain]
               tot = self.nonce_count[chain]
               inv = self.invalid_count[chain]
               try:
                  rej_pct = 100.*rej/(acc+rej)
               except ZeroDivisionError:
                  rej_pct = 0
               try:
                  inv_pct = 100.*inv/tot
               except ZeroDivisionError:
                  inv_pct = 0
               status += ' | %d: %d/%d/%d %.1f%%/%.1f%%' % (chain, acc, rej, inv, rej_pct, inv_pct)
            status += ' | ' + formatTime(time()-self.start_time)
            status += ' | %.2f Gn/min' % (accsum/((time()-self.start_time+1)/60))
i removed the id thing because of space, even with the original mine.py the line is becoming to long for a windows-console.... i am thinking about a 2line status-line, but thats not the priority atm
i get 4.7Gn/min with the github code
and 4.8Gn/min with my code
so now its .2f, have to test this over a longer time and i guess the problem of "hanging up" has to do with the python lock() thing
you implemantation of lock() is clean afaik
found some forum posts on the internet with people having problems that 2 threads lock at the same time
but if its really a python bug... we are running on an old version so hard to say
i am doing some testing with a main-thread and only 1 mining thread for 2 chains, because the only part of the code that needs time is the communication-part, everything else i measured with 0.0000 seconds

3. @thirdlight: what OS do you have? and what python version? i guess 2.6.6 or 2.6.7?

4. @fizzisist: forget the last PM i send you yesterday, now i realized that you need to run 2 time mine.py if you have 2 cards Wink i only have one

legendary
Activity: 3080
Merit: 1080
January 13, 2012, 10:31:53 AM
quick tip (maybe you know this already) but find the pool with the lowest latency to you (ping test it). It will help improve your hashrate.
sr. member
Activity: 447
Merit: 250
January 13, 2012, 09:37:51 AM
freshzive, what kind of hub are you using? Is it slow when a single board is connected to the hub, meaning that the hub itself is to blame? I'm currently using 2 of seven port hubs with one connected to the other and I see no slowdown.

I'm using this one: http://www.amazon.com/Plugable-USB-Port-Power-Adapter/dp/B00483WRZ6/ref=sr_1_2?ie=UTF8&qid=1326465373&sr=8-2 . And yes, it happens even when a single FPGA is connected, so maybe the hub just blows. Weird that it sped up a little with the new software though.

On a more positive note, my boards are at <1% rejects this morning as shad had mentioned. This is on slush's pool. Still chugging away at a high hashrate too, yay!
                          
329.55 MH/s | 0: 1500/7/7 0.5%/0.5% | 1: 1473/2/10 0.1%/0.7% | 10h55m | AH00WOVL
314.09 MH/s | 0: 1431/6/9 0.4%/0.6% | 1: 1519/7/6 0.5%/0.4% | 10h56m | AH00WOWI
hero member
Activity: 531
Merit: 505
January 13, 2012, 07:14:14 AM
Well, I might as well put the question to you guys. How would you keep a rolling counter of the number of valid nonces received in the past N seconds? I wouldn't be surprised if shad comes up with the exact same idea as me. Wink
You have two possibilities. Either keep the data in some cyclic buffer and recalculate upon new insertion to this buffer. Or, less precisely, but easy to code, use the exponential decay formulae:

AvgValue = decay*OldValue + (1-decay)*NewValue

where decay is something like 0.99 or so.
donator
Activity: 1654
Merit: 1351
Creator of Litecoin. Cryptocurrency enthusiast.
January 13, 2012, 03:52:15 AM
I just had the 0 mhash bug happened to me. Stopping the mining and restarting didn't help. I had to reprogram it and things are back to normal.
hero member
Activity: 720
Merit: 525
January 13, 2012, 03:20:41 AM
I've noticed the Mhash display in software sometimes goes crazy and displays an insanely high value, only to freeze there for a moment before dropping back down. The timer still works all the time though, not sure what"s going on there.

I think I know exactly why this is, and it has to do with the somewhat stupid way that it calculates the hashrate based on the last 3 hours. This was done in a real "quick and dirty" method and not a very clever one. I'll play around with it a bit more to see if I can come up with something more intelligent.

Well, I might as well put the question to you guys. How would you keep a rolling counter of the number of valid nonces received in the past N seconds? I wouldn't be surprised if shad comes up with the exact same idea as me. Wink

Btw, shad, I see about the same number of rejects as before (1-2%). What pool are you using? Are you still getting such low reject rates?

freshzive, what kind of hub are you using? Is it slow when a single board is connected to the hub, meaning that the hub itself is to blame? I'm currently using 2 of seven port hubs with one connected to the other and I see no slowdown.
sr. member
Activity: 302
Merit: 250
sr. member
Activity: 447
Merit: 250
January 12, 2012, 10:38:52 PM
Faster using my hub now with the updates, but still ~20Mh/s slower than connecting them directly.
sr. member
Activity: 447
Merit: 250
January 12, 2012, 09:39:42 PM
fpga1

before:
Code:
Total hashrate for device: 287.48 MH/s / 290.07 MH/s
after:
Code:
Total hashrate for device: 325.48 MH/s / 322.11 MH/s / 317.05 MH/s

fpga2

before:
Code:
Total hashrate for device: 277.52 MH/s / 279.72 MH/s
after:
Code:
Total hashrate for device: 309.55 MH/s / 309.55 MH/s / 301.81 MH/s

Seems like there is a 30MH/s or more increase using the new version, thanks for the great update. My rejects are still in the 1-2% range though.

Now to test whether I get these great speeds using my hub Smiley
donator
Activity: 1654
Merit: 1351
Creator of Litecoin. Cryptocurrency enthusiast.
January 12, 2012, 09:08:47 PM
Testing now on a couple of mine. What's the command to update using git? "clone" will only let me use empty directories which is super annoying.

git pull
sr. member
Activity: 447
Merit: 250
January 12, 2012, 08:53:57 PM
Testing now on a couple of mine. What's the command to update using git? "clone" will only let me use empty directories which is super annoying.
Pages:
Jump to: