Part of my reason for doing another RetroChallenge this year was to try something whimsical and lighthearted and those kinds of projects are often hard to plan or come up with in advance.
I've been puttering away slowly at the 2014 Winter Warmup RetroChallenge and I only really discovered what my finale would be during this last week of the competition. I've been hearing about Bitcoins, Litecoins, and Dogecoins in my online circles and I thought I should look into the technology and see if a Silicon Graphics system would be up to the task.
The first issue was I didn't know what a Litecoin really was or how I would generate them through a "mining" process. I did know it would be an neat project to try a crypto currency mining task on an 18 year old computer. I started by comparing the different mining technologies and decided to go with an open source program called "cpu miner".
I downloaded the cpuminer source code from sourceforge and started the porting process.
At this point I already had a working GCC compiler toolchain on the SGI O2 from my previous RetroChallenge activities. The only major dependencies for cpu miner were listed as the curl library and this didn't sound too bad. Of course in true IRIX style this meant I had to sort out the curl dependencies and install a total of 11 libraries using the IRIX installation manager to get curl up and running.
I ended up adding the following Nekoware compiled packages:
The included cpuminer README file suggested the porting task would be easy so I tried the simple 3 step process:
This led to a string of errors and warning that related to the lack of pthread support on IRIX, and a GCC issue with each occurrence of <stdint.h> in the source code.
I searched the Nekochan forum for threads about <stdint.h> problems and came up with a few tips.
Following this Nekochan suggestion I commented out the references in the cpuminer code to #include <stdint.h> and wrote in #include <inttypes.h> in their place. After the code was updated I then recompiled the source again.
At this point I got a bit further and was presented with a set of of new errors:
I got a few more GCC warnings like ld32: WARNING 134 weak definition and ld32: WARNING 85 but the compiling process completed anyway. The GCC compiler then blessed me with a shiny new executable called minerd which is the CPU Miner Daemon program.
When I ran make install I was greeted with a ksh gawk not found message that led me to add the IRIX version of AWK to the system using the neko_gawk-3.1.5.tardist file I mentioned above. Once gawk was installed I was able to get minerd copied into the /usr/local/bin folder. Next I added the minerd path to my ~/.profile so it would be easier to launch from the command line.
When I ran the minerd program it listed the available command line options. For some reason the IRIX build accepts command arguments with a single dash - but doesn't recognize inputs with double dashes --. This turned out to be only a minor annoyance because I was able to reformat the commands to start Litecoin mining to use the single dash arguments.
Normally cpuminer would be started using command line args like:
minerd --url=stratum+tcp://mining.usa.hypernova.pw:3333 --userpass=username.computer:password
Since I could only enter options using single dashes I used a command line args like:
minerd -o stratum+tcp://mining.usa.hypernova.pw:3333 -O username.computer:password
To my amazed delight the terminal started outputting the scrypt based mining status and started generating tiny amounts of Litecoins. The SGI O2 system has a 195 MHz R10K processor and generates a blazing 0.08 khash/second ( 80 Scrypt hashes per second).
Do you have an IRIX system? I highly recommend you download a precompiled copy of cpuminer for IRIX 6.5 and play along at home: irix-cpuminer.zip
For comparison I tested the same cpuminer code on a few computers in my house:
- 2008 Apple Mac Pro Xeon - 8 core 3.2GHz System (25.6 GHz) = 8 threads x 4.78 khash/s
- 2006 HP DC5750 Desktop AMD Athlon 64 X2 - 2 core 2.1 Ghz (4.2Ghz) = 2 threads x 1.6 khash/s
- 2013 Raspberry Pi ARM 700 MHz = 0.33 khash/s
- 1996 SGI O2 195 MHz MIPS R10K = 0.08 khash/s
Another benchmark of a RetroChallenge project is the type of humor you can generate. Receiving a Jurassic Park related joke for a retro-computing project has pretty much validated the entire effort for me.
Feb 1, 2014 RetroChallenge Wrapup Notes
I posted a thread on the Nekochan SGI forum about Litecoin mining on IRIX. It has been really interesting to see other SGI retro-computer users benchmark their systems. It looks like an Octane2 system narrowly beats the Raspberry Pi with a 0.34 khash/s compared to the Raspberry Pi's 0.33 khash/s mining rate.
The user Nekonoko was really kind and powered up his SGI Onyx2 deskside supercomputer for the cpuminer test. His Onyx2 system had four R14K 500MHz MIPS CPUs along with IR3 graphics. Each cpuminer thread ran at 0.23 khash/sec.
Leave a Reply
Note: Comments will have spelling errors corrected before they are posted. If you have a specific question please provide your email address so I can send you a direct reply.