Wednesday, April 9, 2014

Building a Many GPU LTC rig

 I acquired most of my BTC gear through eBay (only a couple of Hashbusters directly from Ukraine and a Single while BFL had them on sale). They cost a premium there, but it was fun playing around with the variety of gear. I have resold most of the things by now and received a note about strange power usage from Simply Energy. I wanted to save myself some trouble and get an LTC rig off eBay, but the prices seem not worthwhile. The description of the rig is generic, almost like a pre-order, the seller is offering to build it for you assuming you cannot handle motherboards and pci-riser cards.

So I decided to have a go and thanks to the numerous guides and forum posts, setting up a rig with 2 GigaByte AMD 270x cards was a breeze (opencl calls them pitcairn). The 270x's are power hungry, taking about 200W each, you will need at least a 600W PSU with 2 cards to keep up. Get a modular PSU and will come in really handy in keeping all the cables neat and tidy and switching to powered PCI-e riser cards. I was planning to build a 4+ cards unit, so I got the Corsair RM1000 PSU.

Next was the choice of a Motherboard, it ended up getting the MSI Z87-43 with 2 x16 slots and 2 x1 slots usable with risers. In retrospect the Z87-45 would have been a better choice since it can handle more PCI cards or the made for BTC ASRock H81 pro BTC. After that there are behemoths such as the Trenton PCI host board with 18slots.

Getting the AMD Catalyst Drivers installed on Linux is a major pain. Finding the right patch requires some searching, but in the end it works quite nicely. After getting 1 machine working I imaged the SD card using win32diskimager and set up other motherboards I had lying around to run the same config. Just as I got going I realized that with the advent of ASIC's the supposedly ASIC resistant scrypt mining is now beyond GPU's time to look into vertcoin or dedicate these to Folding@Home.

Meanwhile if you are still playing with Scrypt based altcoins check out wafflepool and my Android widget to keep tabs on it.

Friday, December 13, 2013

A few days in Samoa - Reefs, Thieves and Blue waters

We went to Samoa (the Western one not the American one) for a few days to experience sun, surf and the typical tropical paradise things. However paradises are very fragile, snorkeling is difficult since reefs are dying after a tropical cyclone, which flattened some of the best resorts.
Beach Fales
Beach Fales along the Eastern shores of Upolu

Churches are everywhere, our resort was right next to a very large Methodist compound. The biggest building in Apia is probably the L.D.S. church with a shiny top. In spite of all the religious zeal the commandments are not obeyed, we had been warned about theft at the resort by TripAdvisor and it did happen. Some money disappears from our resort room, the police got called in to take statements from the staff. Only fair given Australian Federal Police is shoring up the policing in Samoa.
To-Suo Swimming hole
The To-Suo water hole at low tide

We drove around for a couple of days, getting througly lost and finding some wonderful places. Samoans only started driving on the left side of the road recently and about 50% of the cars are still left-hand drive, sharing the road with them is dangerous at best. I went off road for a bit and managed to get stuck in mud in pouring rain. A local thankfully came by and helped us extricate the car with some well placed planks.

Eventually we got to To-suo after repeated searching at opposite ends of Upolu. I had a stroll through the Livingstone museum and took photos of falls at sunset. Ate greasy food at the local market, stared at huge taros and rode the local bus (one of which was swept of a ford by a river the day after we left). I was a fun holiday overall.
Sopoaga Falls
Falls near Falefa

Saturday, November 30, 2013

Reflashing BFL Jalapeno with UDOO

I funded the UDOO kickstarter a while back and received it a few weeks ago. The bot I was planning to put it on already has a controller, so the UDOO now lives a sad life as a BTC mining hub.
JTAG Port Pinout - Jalapeno has silk screen for 1 and 9

Testing the GPIOs on the UDOO manually
I have a couple of Jalapenos which I overpaid for on eBay and are all sold out due to Black Friday, but the prices are going up on BTC and I figured I could make them slightly more desirable for resale by performing a firmware upgrade. There are guides for performing the upgrade using the AVR-Dragon JTAG and the Raspberry Pi. Since the UDOO claims to be 4-Pi's in one it should be more than capable of running urJTAG using the GPIO cable and reflashing. The compilation took a couple of attempts due to the lack of back-up battery on the UDOO, every time I rebooted the time had an epoch reset and make got stuck in an eternal loop, eventually it settled down. You can also apt-get install urjtag, but that version does not have the GPIO cable.
UDOO GPIO pins used

On the UDOO we have a very large selection of GPIO's to choose from, for convenience I selected 4-near the edge - 88,56,105,89 and 144 for reset. Then used the Pandaboard GPIO toggling guide to get into the /sys/class/gpio file structure and quickly test these pins with an LED. The UDOO GPIO's are at 3.3v so it is safe to use them with the Jalapeno. I also colour coded the cables for future reference. Here is the table of the colours and pins on both the UDOO and the Jalapeno. The reset pin can be toggled using the LED testing method above to reset the board if you get stuck, simply output "low" then "high" to GPIO 144.
Cabling between Jalapeno and UDOO
Function Colour Jalapeno  GPIO
RESET Grey 6 144
TCK Yellow 1 89
TDO Purple 3 104
TMS Orange 5 56
TDI Blue 9 88
GND Black 2 GND
Once everything is connected fire up the Jalapeno and reflash it using the JTAG command chain below. I would really like to gather some statistics on the results of the detect command to see which CPU people have.
urJTAG reflashing of Jalapeno AVR
That's it, a great use for the many UDOO GPIO's go crazy and hook up 10 Jalapenos at once and run a reflashing service or send it to me for a reflash. If you found this useful BTC donations are welcome - 1JGoD1muFP5RiGPUWF12ncYz2WreYk35Rh .

Saturday, November 23, 2013

All forms of LTC mining - CPU and GPU (OpenCL/CUDA)

CPU mining is definitely deprecated. You never get the bang for power, unless you have machines with 32 cores and free power. Well at least for BTC. For LTC cpu mining (very slowly) is still feasible. Quite good if you have one of those 32 core - 128GB RAM beasts lying idle, or you are Amazon or Google. Just fire up pooler's minerd and take up a bunch of CPU's. A little bit of math shows EC2 CPU power will not be worth the investment, but with LTC prices heading north of $10 theres is no telling what people will try - including writing minerd into viruses. Amazon might stop EC2 service and start CPU/GPU miners itself.

CGMiner 3.7.2 with scrypt support can also get a fairly good rate on AMD Radeon cards with better OpenCL support. The ROI on these cards is definitely better than any of the miners in hand. Meanwhile people are pay AUD700 for 5GH BFL Jalapenos on ebay and joining the BTC bandwagon. Fun times ahead.

I am enjoying myself trading LTC/BTC and getting cheap thrills on penny stocks. Much better than when my horse (Verema) came last at the Melbourne cup, stumbled fell and had to be put down. I still won for last place. Even if like the horse, this vaporware currencies stumble fall and have to be put down they will leave behind legends and fiat currency millionaires.

Monday, November 18, 2013

Big Mole hill to fill holes - Meshlab

For a few days I was battling holes in a very dense mesh, a taste of which you can find here - Aero3Dpro. Meshlab is pretty handy for working with these, but there was a UI bug in edit_holes plugin preventing sorting of the holes to identify and squash the biggest ones. So in addition to filing a bug I decided to look into it myself.

There was a small run into the Qt change of ownership dilemma, tracking down the tools required some digging. Eventually I tracked down a working source set, had to compile it myself since the x64 binary I was depending on was built without QtScript support which Meshlab uses. By the end of all the trial and error I had 3 versions of Qt kicking around in my system - 4.8.0, 4.8.1 and 4.8.3. At least they all work for various projects.

Time to start writing my own meshlab plugins such as polygon based selection as featured in 3D Studio Max (called Fence Selection) or Cloud Compare(called Manual Segmentation). Also the Edit holes tool can be modified to automatically select larger holes to fill. Fixing up the textures to vertex colour transfer, since only the first texture is sampled -
path = path.left(std::max(path.lastIndexOf('\\'),path.lastIndexOf('/'))+1)

Also linking up with libLAS to allow LAS format saving with offsets and scale avoiding quantisation errors. More meshlab development to come.

Coming late to the party - Coin mining

Deep in the days of custom built ASIC miner boxes, mining with USB miners and hubs is considered a waste of electricity. Unless of course you are the government and own Three Gorges, still large miners are more efficient. Still I needed to get started and picked up a bunch of now collectors item - Icarus USB miners of eBay. Cgminer makes these really easy to use, with proper modules (in linux) or usb driver substituion with Zadig.

Next comes the fun part, choosing a pool to mine at. All say they are fair and there are so many pay-out algorithms, worth a PhD in economics by themselves for rewarding people for work done. Eligius has the CPPSRB, Bitminter uses PPLNS with donations. Some support all SHA256(SHA256) based coins, both BTC and NMC. Miners practice aggresive pool hopping (and currency hopping) to pick up the one with best luck. Some pools require registration, other just the payout address. All fertile ground for bots to play at.

After playing with BTC for a while I looked into LTC. Since it is still mined on the GPU (with scrypt CGMiner 3.7.2) and has less aggresive speculation. It might also just become irrelevant, but not being mainstream has some allure. Indeed these are the days of panning gold in early California or even closer to home at Eureka. Individuals issuing currency causes some disruption to monetary policy and governance. May be there will a tax put on selling mining ASICs, similar to a mining licence. Overall it is an intersting economic experiment.

Thursday, October 10, 2013

Short Holiday in Hobart - Meeting David Walsh

It has slightly more than a year since I left Hobart. I did make some very good friends, back here and I wanted to come back and catch up with them. Especially the people at MONA and fellow Salsa dancers, as well as the motley crew at the Prince of Wales. So when I was invited to visit MONA and catch up with David Walsh, I jumped at the opportunity.
While living in Hobart I used to visit the museum every Sunday. Funny how only religions are associated with regular activities, I must have signed myself upto the religion of feasting sense on the weird.

I went through the museum and noted all the changes since I was last there. Listened to the chatter from visitors and made some notes which came back to bite me when one of David's guest picked up my notebook.

David has made his made his fortune gambling. He is not the James Bond sort of poker player, rather he is a mathematician and sort of a programmer. I have some theories about why we persist in gambling in spite of the apparent losses to individuals.

Gambling exists to redistribute wealth, preventing it from accumulating over generations in one family causing resentment and decimation of the family through revolt and aggression from the rest of the society. Though decimation of powerful families does happen in spite of the gambling habits as shown by the Russian revolution or even more recently the Nepalese royal family. The best way to stave of socialism and revolts is for the wealthy to voluntarily dispense of their wealth in gambles. Just means of justifying wealth accumulated by David, under the nose of ATO. Apparently David used to work for the ATO before he declared himself dead and quit.

The conversation drifted to light rails for Hobart and the need for personal ownership of assets i.e. cars vs public infrastructure such as rails. This debate has been raging on even recently in the roads vs rails talk. A psychologist was around outlining a Jungian experiments in a Victorian mansion, people participating dreamt of fires. There were some stories about table tennis diplomacy and frame dragging, and lots of conversations with constant backup from wikipaedia.

Dinner on MONA
I was invited to dinner at David's place with take-away from his restaurant. David and his wife are pescetarian. Dinner was followed by a David Bowie variety hour on Youtube and hanging out with the MONA music co-ordinator who has encyclopaedic knowledge of the songs. I finally slunk away rather dazed by the days events.