tag:blogger.com,1999:blog-3136896713783924302024-02-19T17:16:58.779+07:00AustralisThese are our stories of sailing across the Pacific, to inspire your own adventures. You may even find some useful tidbits of technical information to help you avoid our mistakes.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.comBlogger63125tag:blogger.com,1999:blog-313689671378392430.post-68271319391218109692015-01-12T13:02:00.001+07:002015-01-12T13:02:12.279+07:00End of the LineAustralis has had a long history of tangles with fishing gear. But on New Years Day, 2015 her EPIRB was set off one last time.<br />
<br />
<div style="background-color: white;">
<div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;">
In 2004, while anchored off San Quintin, Mexico, a fishing trawler passed by in the night, cutting the anchor line. Australis (Wind Rose at the time) was beached before her crew could react. She was salvaged and refurbished. In 2008 on her maiden international voyage as Australis, she got tangled in lobster traps while anchoring in a bay off Cedros Island in preparation for a storm. The storm shifted the winds to onshore and when we went to crank the engine discovered the fouled prop. Her anchors began to drag as fishermen attempted to help by pulling on her stern. The anchor shackle snapped and we were able to retrieve the other anchor and a trawler was able to bring her to safe harbor on Cedros.</div>
<div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;">
In 2009, halfway around the world while heading into port in Indonesia for customs check-in at sunrise, Australis brought with her a 2 mile long long-line, including 6 inch hooks and buoys. Fortunately we discovered the stow-away before one of the many commercial vessels tangled in it along with us.</div>
<div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;">
<br /></div>
<div class="MsoNormal" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;">
Australis lost the last of her 9 lives in Indonesia when Shaun was attempting to make port in Indonesia during a storm...<a href="http://www.abc.net.au/news/2015-01-09/australian-shipwrecked-in-indonesia-shaun-sims/6008672" style="font-size: small;">Australian Shipwrecked in Indonesia</a></div>
</div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;">
<div class="MsoNormal">
<br /></div>
</div>
Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com1tag:blogger.com,1999:blog-313689671378392430.post-72118089755144360032013-04-29T09:07:00.002+07:002013-04-29T09:09:02.060+07:00 Pyopencl (GPU) vs Numpy (CPU) Performance Comparison<span style="font-family: Arial, Helvetica, sans-serif;">While taking the <a href="https://www.udacity.com/course/cs344">Udacity parallel computing class</a> I decided to compare performance between CPU (serial) and GPU (parallel) implementation. So I ran a simple kernel, `a * a + b * b`, for an array of 32-bit random floats between 0 and 1 using pyopencl and numpy. I wanted to see if it was worthwhile to take my GPU BTC mining rig offline periodically to do scientific computing. But even my a bottom-of-the-barrel 64-bit AMD Sempron 145 (2.8 GHz, 5600 bogo-MIPS) processor with 8GB DRAM can beat a Radeon 7750 GPU for all but the largest arrays. And the best-possible throughput gain on the GPU is about 4x.
<br /><br />
So numpy must be well-optimized. I tried optimizing my GPU kernel by minimizing array index lookups, etc, but nothing I came up with made a significant difference for this simple kernel. Both the CPU and GPU gave exactly the same answer, so that's nice.</span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">
Here's the output with execution times...</span><br />
<pre style="background: #ffffff; color: black;"><pre></pre>
<pre></pre>
<pre>GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0115399</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">2.7895e-05</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">0</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">0.241726</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0115771</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">2.19345e-05</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">1</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">0.189464</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0116088</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">2.19345e-05</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">2</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">0.188947</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0115681</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">2.59876e-05</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">3</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">0.22465</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.011663</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">7.70092e-05</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">4</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">0.660289</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.023535</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.000612974</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">5</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">2.60452</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0234549</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0182121</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">6</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">77.6472</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0668991</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.240016</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">7</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">358.773</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.567215</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">2.24371</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">8</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">395.566</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
</pre>
<span style="font-family: Arial, Helvetica, sans-serif;">
With cgminer running at -I 9 on all the GPUs, the speed advantage for a GPU doesn't budge, significantly. So pyopencl is pretty effective at interrupting cgminer and prioritizing its threads.
</span>
<pre style="background: #ffffff; color: black;">GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.179582</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">2.7895e-05</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">0</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">0.0155333</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.263615</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">2.31266e-05</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">1</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">0.00877287</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.263666</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">2.40803e-05</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">2</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">0.00913287</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.011616</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">2.81334e-05</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">3</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">0.242195</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0116951</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">7.60555e-05</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">4</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">0.650317</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.023536</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.000617981</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">5</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">2.62569</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0236619</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0189419</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">6</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">80.0524</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.0630081</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.230431</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">7</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">365.717</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span>
GPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">0.82972</span>
CPU execution <span style="color: #603000;">time</span><span style="color: purple;">:</span> <span style="color: green;">2.4491</span>
CPU<span style="color: #808030;">/</span>GPU speed ratio <span style="color: maroon; font-weight: bold;">for</span> <span style="color: #008c00;">10</span><span style="color: #808030;">^</span><span style="color: #008c00;">8</span> kernel executions<span style="color: purple;">:</span> <span style="color: green;">295.172</span><span style="color: #808030;">%</span>
Difference between the <span style="color: #008c00;">2</span> answers<span style="color: purple;">:</span>
<span style="color: green;">0.0</span></pre>
Installation was a bit tricky. You have to make sure setuptools is overriden by distribute. But Ubuntu 12.04 makes this easy. Thanks to <a href="http://stackoverflow.com/a/14718550/623735">kermit666 on SO</a> for this simple approach to getting virtualenv wrapper and numpy up and running quickly on a fresh Ubuntu install.
<pre style="background: #ffffff; color: black;"><span style="color: dimgrey;">#!</span><span style="color: #007997;">/usr/bin/env</span><span style="color: #bb7977; font-weight: bold;"> sh</span>
sudo apt-get install python-pip python-dev
sudo pip install virtualenv virtualenvwrapper
<span style="color: #bb7977; font-weight: bold;">echo</span> <span style="color: #0000e6;">'export PROJECT_HOME="$HOME/src"'</span> <span style="color: #e34adc;">></span><span style="color: #e34adc;">></span> <span style="color: #797997;">$HOME</span><span style="color: #40015a;">/</span><span style="color: maroon; font-weight: bold;">.</span>bashrc
<span style="color: #bb7977; font-weight: bold;">echo</span> <span style="color: #0000e6;">'export WORKON_HOME="$HOME/.virtualenvs"'</span> <span style="color: #e34adc;">></span><span style="color: #e34adc;">></span> <span style="color: #797997;">$HOME</span><span style="color: #40015a;">/</span><span style="color: maroon; font-weight: bold;">.</span>bashrc
<span style="color: #bb7977; font-weight: bold;">echo</span> <span style="color: #0000e6;">'source /usr/local/bin/virtualenvwrapper.sh'</span> <span style="color: #e34adc;">></span><span style="color: #e34adc;">></span> <span style="color: #797997;">$HOME</span><span style="color: #40015a;">/</span><span style="color: maroon; font-weight: bold;">.</span>bashrc
sudo apt-get install -y gfortran g++
<span style="color: dimgrey;"># sudo apt-get remove -y --purge python-setuptools</span>
<span style="color: dimgrey;"># start a new virtalenv project</span>
mkproject parallel
pip install --upgrade distribute
pip install mako numpy pyopencl
</pre>
</pre>
<pre style="background: #ffffff; color: black;"></pre>
<pre style="background: #ffffff; color: black;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></pre>
<pre style="background: #ffffff; color: black;"><span style="font-family: Arial, Helvetica, sans-serif;">Here's the python code that ran the kernel and measured execution time. It's based on the <a href="http://documen.tician.de/pyopencl/">official pyopencl example</a> ...</span></pre>
<pre style="background: #ffffff; color: black;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></pre>
<pre style="background: #ffffff; color: black;"><span style="color: maroon; font-weight: bold;">import</span> pyopencl as cl
<span style="color: maroon; font-weight: bold;">import</span> numpy
<span style="color: maroon; font-weight: bold;">import</span> numpy<span style="color: #808030;">.</span>linalg as la
<span style="color: maroon; font-weight: bold;">import</span> time
<span style="color: maroon; font-weight: bold;">for</span> M <span style="color: maroon; font-weight: bold;">in</span> <span style="color: #e34adc;">range</span><span style="color: #808030;">(</span><span style="color: #008c00;">0</span><span style="color: #808030;">,</span> <span style="color: #008c00;">8</span><span style="color: #808030;">)</span><span style="color: #808030;">:</span>
N <span style="color: #808030;">=</span> <span style="color: #008c00;">10</span><span style="color: #808030;">*</span><span style="color: #808030;">*</span>M <span style="color: #808030;">*</span> <span style="color: #008c00;">1000</span>
a <span style="color: #808030;">=</span> numpy<span style="color: #808030;">.</span>random<span style="color: #808030;">.</span>rand<span style="color: #808030;">(</span>N<span style="color: #808030;">)</span><span style="color: #808030;">.</span>astype<span style="color: #808030;">(</span>numpy<span style="color: #808030;">.</span>float32<span style="color: #808030;">)</span>
b <span style="color: #808030;">=</span> numpy<span style="color: #808030;">.</span>random<span style="color: #808030;">.</span>rand<span style="color: #808030;">(</span>N<span style="color: #808030;">)</span><span style="color: #808030;">.</span>astype<span style="color: #808030;">(</span>numpy<span style="color: #808030;">.</span>float32<span style="color: #808030;">)</span>
ctx <span style="color: #808030;">=</span> cl<span style="color: #808030;">.</span>create_some_context<span style="color: #808030;">(</span><span style="color: #808030;">)</span>
queue <span style="color: #808030;">=</span> cl<span style="color: #808030;">.</span>CommandQueue<span style="color: #808030;">(</span>ctx<span style="color: #808030;">)</span>
mf <span style="color: #808030;">=</span> cl<span style="color: #808030;">.</span>mem_flags
a_buf <span style="color: #808030;">=</span> cl<span style="color: #808030;">.</span>Buffer<span style="color: #808030;">(</span>ctx<span style="color: #808030;">,</span> mf<span style="color: #808030;">.</span>READ_ONLY <span style="color: #808030;">|</span> mf<span style="color: #808030;">.</span>COPY_HOST_PTR<span style="color: #808030;">,</span> hostbuf<span style="color: #808030;">=</span>a<span style="color: #808030;">)</span>
b_buf <span style="color: #808030;">=</span> cl<span style="color: #808030;">.</span>Buffer<span style="color: #808030;">(</span>ctx<span style="color: #808030;">,</span> mf<span style="color: #808030;">.</span>READ_ONLY <span style="color: #808030;">|</span> mf<span style="color: #808030;">.</span>COPY_HOST_PTR<span style="color: #808030;">,</span> hostbuf<span style="color: #808030;">=</span>b<span style="color: #808030;">)</span>
dest_buf <span style="color: #808030;">=</span> cl<span style="color: #808030;">.</span>Buffer<span style="color: #808030;">(</span>ctx<span style="color: #808030;">,</span> mf<span style="color: #808030;">.</span>WRITE_ONLY<span style="color: #808030;">,</span> b<span style="color: #808030;">.</span>nbytes<span style="color: #808030;">)</span>
prg <span style="color: #808030;">=</span> cl<span style="color: #808030;">.</span>Program<span style="color: #808030;">(</span>ctx<span style="color: #808030;">,</span> <span style="color: dimgrey;">"""</span>
<span style="color: dimgrey;"> __kernel void sum(__global const float *a,</span>
<span style="color: dimgrey;"> __global const float *b, __global float *c)</span>
<span style="color: dimgrey;"> {</span>
<span style="color: dimgrey;"> float a2 = a[gid];</span>
<span style="color: dimgrey;"> float b2 = b[gid];</span>
<span style="color: dimgrey;"> c[gid] = a2 * a2 + b2 * b2;</span>
<span style="color: dimgrey;"> }</span>
<span style="color: dimgrey;"> """</span><span style="color: #808030;">)</span><span style="color: #808030;">.</span>build<span style="color: #808030;">(</span><span style="color: #808030;">)</span>
prg<span style="color: #808030;">.</span>sum<span style="color: #808030;">(</span>queue<span style="color: #808030;">,</span> a<span style="color: #808030;">.</span>shape<span style="color: #808030;">,</span> <span style="color: #e34adc;">None</span><span style="color: #808030;">,</span> a_buf<span style="color: #808030;">,</span> b_buf<span style="color: #808030;">,</span> dest_buf<span style="color: #808030;">)</span>
gpu_ans <span style="color: #808030;">=</span> numpy<span style="color: #808030;">.</span>empty_like<span style="color: #808030;">(</span>a<span style="color: #808030;">)</span>
gpu_t0 <span style="color: #808030;">=</span> time<span style="color: #808030;">.</span>time<span style="color: #808030;">(</span><span style="color: #808030;">)</span>
cl<span style="color: #808030;">.</span>enqueue_copy<span style="color: #808030;">(</span>queue<span style="color: #808030;">,</span> gpu_ans<span style="color: #808030;">,</span> dest_buf<span style="color: #808030;">)</span>
gpu_t <span style="color: #808030;">=</span> time<span style="color: #808030;">.</span>time<span style="color: #808030;">(</span><span style="color: #808030;">)</span> <span style="color: #808030;">-</span> gpu_t0
<span style="color: maroon; font-weight: bold;">print</span> <span style="color: #0000e6;">'GPU execution time: %g'</span> <span style="color: #808030;">%</span> gpu_t
cpu_ans <span style="color: #808030;">=</span> numpy<span style="color: #808030;">.</span>empty_like<span style="color: #808030;">(</span>a<span style="color: #808030;">)</span>
cpu_t0 <span style="color: #808030;">=</span> time<span style="color: #808030;">.</span>time<span style="color: #808030;">(</span><span style="color: #808030;">)</span>
cpu_ans <span style="color: #808030;">=</span> a <span style="color: #808030;">*</span> a <span style="color: #808030;">+</span> b <span style="color: #808030;">*</span> b
cpu_t <span style="color: #808030;">=</span> time<span style="color: #808030;">.</span>time<span style="color: #808030;">(</span><span style="color: #808030;">)</span> <span style="color: #808030;">-</span> cpu_t0
<span style="color: maroon; font-weight: bold;">print</span> <span style="color: #0000e6;">'CPU execution time: %g'</span> <span style="color: #808030;">%</span> cpu_t
<span style="color: maroon; font-weight: bold;">print</span> <span style="color: #0000e6;">'CPU/GPU difference in speed for %d additions: %g%% '</span> <span style="color: #808030;">%</span> <span style="color: #808030;">(</span>N<span style="color: #808030;">,</span> <span style="color: green;">200.0</span> <span style="color: #808030;">*</span> cpu_t <span style="color: #808030;">/</span> <span style="color: #808030;">(</span>gpu_t <span style="color: #808030;">+</span> cpu_t<span style="color: #808030;">)</span><span style="color: #808030;">)</span>
<span style="color: maroon; font-weight: bold;">print</span> <span style="color: #0000e6;">'Difference between the 2 answers:'</span>
<span style="color: maroon; font-weight: bold;">print</span> la<span style="color: #808030;">.</span>norm<span style="color: #808030;">(</span>cpu_ans <span style="color: #808030;">-</span> gpu_ans<span style="color: #808030;">)</span>
</pre>
Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com1tag:blogger.com,1999:blog-313689671378392430.post-87449587281994068252013-04-01T01:33:00.001+07:002013-04-01T05:18:40.921+07:00Bitcoin's Easter SundayI think I've finally figured out Bitcoin (BTC). I've been looking for the attractor of the dynamic system that is the Bitcoin network as it has risen to ever irrationally exuberant levels. I assumed that it was like any other economic system, that it would be modelable in terms of scarcity and consumer psychology (perception of value) or social evolutionary dynamics. But maybe it isn't. Maybe it's driven by a new kind of mechanical growth, the growth of the brainpower in a thinking machine. Maybe Kurzweil's exponential thinking is right. Only the singularity isn't coming to us meat-space humans, it's coming to machines first.
I now think that the value of a Bitcoin seems will increase in direct proportion to the energy efficiency that the Bitcoin "machine" (network) thinks with about a very specific problem. A machine that thinks about nothing but finding the "secret" to each and every SHA256 hash "problem" that ripples across the network. It's no coincidence that the advent of ASICS in bitcoin mining has spawned another burst of speculation in Bitcoin. I think that growth in value would have happened with or without human speculation and greed. The speculation may go away, and the pendulum of human opinion may swing the other way soon, but the the long term metoeric rise of Bitcoin is here to stay. And we've crossed an inflection point in confidence and value that will never evaporate... because it no longer depends on the scammers and speculators that have yanked the price around for the 4 short years of the Bitcoin "machine"'s life.
Sure, we slow humans write the software (Bitcoin miners) and build the specialized machines (ASIC racks) that act as the neurons in this brain. But it really seems to grow organically, more like an epidemic or organism. Maybe it isn't a fad, a bubble. Maybe we're witnessing an inflection point in economics itself. The new currency is thought, and machines will be the arbiters of that currency, thinking faster and better than any Barron, banker, or entrepreneur could.
Bitcoin recently crossed the $1B capitalization level (total "money" supply). This is more than 1% of the total supply of all the money in the United States--all the government debt, all the bad home loan debts held by your local savings and loan, all the "paper" money (derivatives contracts) printed by the huge Wall Street banks. And this Bitcion capitalization is 1% of all the value and all the promises of value held in the US--and it's contained in a currency that you've never heard of, and that no government or corporation controls or processes in any way.
However, one company, <a href="http://launch.avalon-asics.com">Avalon</a>, seems to have figured out a clever way to make money off of the Bitcoin craze, seemingly without conning it's customers or contributing to the irrational exuberance. They're making money the same way that thousands of geeky innovators have been making money off of Bitcoin for the past 4 years... by mining with ever-increasingly powerful and innovative machines, or selling that equipment to others. Only Avalon is clever about trickling out the supply of their hardware (and probably using the backlog of equipment to mine with themselves). Just fast enough to keep leapfrogging their competitors (FPGAs and GPUs and other less legitimate ASIC manufacturers) without flooding the market with valueless processing power. They have skin in the game, so they want the rise in value of Bitcoin to continue, or they cease being profitable.
I'm going to spend the day exploring the "strange attractor" that governs the price and spread of Bitcoin. I'll let you know how it goes.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-35089602995216364872012-06-09T20:56:00.001+07:002012-06-09T20:56:35.942+07:00The 2nd Great Depression is Here -- and that's Good News for the Smart<p>I love this FT series on the economics and politics of deflation and recession.</p> <p><a href="http://ftalphaville.ft.com/blog/2012/06/08/1030801/the-end-of-artificial-scarcity/">http://ftalphaville.ft.com/blog/2012/06/08/1030801/the-end-of-artificial-scarcity/</a></p> <p>Near as I can tell FT is saying "don't worry, be happy." Fortunately smart people worry and we are a social animal. Pack social dynmics are ushering in an era when national governments are no longer relevant to our material happiness. Barring WWIII, smart people will continue to band together into clubs, clans, coops. Just wander around Portland for a day. They barter within a web of trust, set up insurance pools, loan each other money--even mint their own fiat currencies (bitcoin) or fund grand scientific and space adventures. These pockets of stability and hope will thrive while the rest of us decide which "Like" buttons to click.</p> Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-28548301740821207762012-04-26T15:22:00.001+07:002012-04-26T15:22:42.351+07:00Gardening<p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmHI-lUIuBn9abtAkS-30AQAmcLWMlSSxDmOjCv6XfSl_HRQgvRswf2RZwS0MYgCR66yMkTetyVITUkl642NBUjEOgKiHeWzDdMv0Mq6FKeaDTVf89cTGgqSg9UpCt9khEQFcZ1-d19bb-/s1600/100_2403+pauls+burned+field-762352.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmHI-lUIuBn9abtAkS-30AQAmcLWMlSSxDmOjCv6XfSl_HRQgvRswf2RZwS0MYgCR66yMkTetyVITUkl642NBUjEOgKiHeWzDdMv0Mq6FKeaDTVf89cTGgqSg9UpCt9khEQFcZ1-d19bb-/s320/100_2403+pauls+burned+field-762352.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5735622007208554578" /></a></p>As is Vanuatu tradition, when we rowed ashore at a small island north of Port Villa, the first man to greet us, 'Paul', became our host and guide for the duration of our stay. He regularly offered us valuable cocoa pods as a snack and other delicacies from both his own farm and his neighbors'. He looked quizzically at us whenever we'd ask him (in broken pidgin or English) whether it was all right to take food from a neighbor. They have a liberal sense of property rights in Vanuatu. Though Paul worked several hours a day to keep his 'garden' productive, he also helped himself to his neighbors' produce. Perhaps his 'hosting' duties were his justification. We helped him plant taro root in this plot of land that he'd slashed and burned. He lit several piles of limbs that we helped him gather and they smoldered all day while we worked. It's sad to see the amount of land destroyed to maintain a single family for a year. But the land is so fertile and plentiful that there is not much sense of conservation in Vanuatu.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com1tag:blogger.com,1999:blog-313689671378392430.post-74528646024194550652012-04-19T22:36:00.000+07:002012-04-19T22:36:06.909+07:00Irregularly Sampled Time-SeriesAs I was researching options for analysis of irregularly sampled time-series data for the <a href="http://github.com/hobsonlane/bitcrawl">bitcrawl project</a> I started to wonder whether it even made sense to think of the data in terms of a time series. All the articles I read come from the viewpoint of analyzing a physical system, looking for things like the power spectral density or wavelet functions, which can help pull out the underlying character of a linear dynamic system hidden beneath noise. But there is no such system in the financial markets. When traders talk about high frequency trading with bandwidths exceeding 1 MHz, that's when you realize that the dynamics are those of computer algorithms and complex systems, not physical systems. It's like watching the lottery ping pong balls rattle around in a glass sphere. It's totally meaningless. Thermodynamics, with bandwidths in millihertz is the only reasonable physical system for modeling that kind of complexity. I don't want to compete with the ping pong ball catchers that have to build ever faster data centers and fiber networks to keep up with the speeding bullets. Human social dynamics take over in the millihertz range. And when you start talking hours and days or even months between trades (as for me) you need a more all-encompassing metric that reaches into the really low frequencies for which you have almost no data. It's like my Low Frequency Impedance measurement algorithm invented 20 years ago--you can extrapolate a single point on a spectrogram from as little as 1/3 of a sinusoidal period. <br />
<br />
But markets aren't physical systems that can be probed with pure sinusoid inputs. Instead, it seems to me, your best bet is to think in terms of volumetric spans rather than time spans. Or even better, just in terms of transaction counts. What matters is how far the price moved between trades, not between days, hours or microseconds. How many different people or groups of people or computer algorithms decided to adjust their price and by how much? That's a fair gage of the "temperature" or "pressure" of the thermodynamics of the market. Of course with electronic exchanges facilitating HFT, these independent actors are getting parsed into the tiniest little chunks. So volumetric measures may be even better. That helps get over the fractal nature of the markets. In the end, even a fractal has a volume, as least it's projection in 3-space does. Hopefully the same concept makes sense for the markets, because that's the path we're crawling down with <a href="https://github.com/hobsonlane/bitcrawl/">bitcrawl</a>.<br />
<br />
But time is money, so eventually we'll have to do the conversion back to real time, based on some average trade frequency or volume rate for a given instrument. But my guess is we'll discover a lot of hidden dynamics lurking in volumetric and transaction-count space. I hope I can find a market to give me this level of detail.<a href="http://bitfloor.com">Bitfloor</a> is all I've got right now, without succumbing to the price-gouging of Bloomberg or other financial services, or public exchanges.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-87589673015809052362012-04-19T05:18:00.000+07:002012-04-19T05:20:36.617+07:00Towing?<p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB3bJWk1DQHr-klK0SAcQO0VJtdvjlFw7g5ZIiahjmHrjlvQB6UjUC5k1bYuDrusYqg6L-MkPQeCEOi_3hcCmhRADkY05P09x_y7TzW-D6FNVmjVtvAYr4qDMCW4gMywvJxoXffTb6iI_R/s1600/IMG_4575-736618.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB3bJWk1DQHr-klK0SAcQO0VJtdvjlFw7g5ZIiahjmHrjlvQB6UjUC5k1bYuDrusYqg6L-MkPQeCEOi_3hcCmhRADkY05P09x_y7TzW-D6FNVmjVtvAYr4qDMCW4gMywvJxoXffTb6iI_R/s320/IMG_4575-736618.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5732869251752779538" /></a></p>It took a bit of staring to figure out why this ship was doggedly chasing it's bow. There is almost no freeboard near the center of these ubiquitous Indonesian ferry and cargo ships. The low freeboard makes it easy to board without a gangway or boarding ramp when the ship pulls along side a floating dock or another ship--which is surprisingly common. These ships are often docked 3 or 4 abreast, making for a nice raft party, I'd imagine. But once they get underway, the deck would surely collect a lot of water. Maybe that's why the bilge pumps seem to be constantly running on these boats. It scares me when I see them overloaded with diesel drums or human cargo. But I imagine that if you pushed her at just the right speed, her bow wave trough would line up perfectly with this low gap in the middle, ensuring a dry deck and bilge--as long as no waves assaulted from the side.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-57304576415210092052012-04-18T08:23:00.001+07:002012-04-18T08:23:38.247+07:00Pirate Skipper and His Cursed Companion<p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI5eSI-XOAzRv8FxMo6fVg9NBGkFvEc6vmcojexGvK0LYjF5ff6ILB0v3Avr2lchE14-I4OCZk0uj-VmuuEESdhKO9cejuBhE4JwxLc7MiUBNacJyA9DAaXVQUjE35hONT4ErfEUOOH9s7/s1600/IMG_1836-718249.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI5eSI-XOAzRv8FxMo6fVg9NBGkFvEc6vmcojexGvK0LYjF5ff6ILB0v3Avr2lchE14-I4OCZk0uj-VmuuEESdhKO9cejuBhE4JwxLc7MiUBNacJyA9DAaXVQUjE35hONT4ErfEUOOH9s7/s320/IMG_1836-718249.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5732545328539471234" /></a></p>Tagim [<a href="http://totalgood.com/tagim">http://totalgood.com/tagim</a>] surprised me this morning with a photo from our first ocean passage nearly 7 years ago. It was Larissa's first time to sail a boat over the horizon, and it was my first multi-day ocean passage. A few days out we found we weren't the only ones to be crossing the Gulf of Mexico for the first time. This seemingly naive purple martin stowed away onboard and often enjoyed lighting on our heads for warmth or companionship. Unfortunately, his gregariousness was his undoing. When I trodHobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-71216606382980164222012-04-05T11:49:00.001+07:002012-04-05T11:49:24.110+07:00Mosque Dome<p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk7BEXbjd-gWQdrBoRWdYkPpPEZ5M2OpsL3rH1b1urZd-NgooZfOWnkzP9_gd1Vtu3ckV-hL5wQzsxLQJCPJyCYHReKCraHOZtRLUjo-XHcQZ2_vjGD_KqgMHOiVKiyYYEuNwjIvTQiy30/s1600/DSC_0262-764111.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk7BEXbjd-gWQdrBoRWdYkPpPEZ5M2OpsL3rH1b1urZd-NgooZfOWnkzP9_gd1Vtu3ckV-hL5wQzsxLQJCPJyCYHReKCraHOZtRLUjo-XHcQZ2_vjGD_KqgMHOiVKiyYYEuNwjIvTQiy30/s320/DSC_0262-764111.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5727774252176790802" /></a></p>The Sabah state mosque has a beautiful, opulent domed prayer room, with a scary suspension structure holding a massive chandellier. I'm not sure I'd want to stand (or kneel and bow) beneath it for very long.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-19252037882086372782012-04-01T05:09:00.001+07:002012-04-01T05:09:51.106+07:00Malaysia Power<p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc5Ni6XhdCKLJP0UbtVAQi8G6ZJBVezmPmIBWAyQq27FKvlBYTnwKJby-4QbemwRjFH0QNIwNLL_o-GAguGTSZfa4E3UptjPGHUKceM5V0mnm6WDaHlHaxgM-ykG6E2DZX67geGX0AtEUv/s1600/DSC_0283-791106.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc5Ni6XhdCKLJP0UbtVAQi8G6ZJBVezmPmIBWAyQq27FKvlBYTnwKJby-4QbemwRjFH0QNIwNLL_o-GAguGTSZfa4E3UptjPGHUKceM5V0mnm6WDaHlHaxgM-ykG6E2DZX67geGX0AtEUv/s320/DSC_0283-791106.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5726186947642148114" /></a></p>Walking along the sidewalk near a resort golf course that borders a water village (sort-of a shanty town on stilts) in Kota Kinabalu, we noticed wires hanging out of a lamp post and running down into the open concrete sewer. Either the city is being industrious about supplying power to all it's lamp posts with accessible wiring running through the ditches, or the water villagers are siphoning off power from the city street lamps. Either way, it says a lot about Malaysian culture and government.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-83103838448513606092012-02-29T12:11:00.001+07:002012-02-29T12:11:57.817+07:00Malaysian Cutlure<p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWz9m05oeGRGChPsMkG423gdvl8K5vqAMDjjtPtbtdV-OLXqZBVy9eAsoyGLPdnPlrakjK3NXaWALTnvwo4rrEe_WZyQVY1BD6ELHO1R-NkPVY90NSoiPhyphenhyphenMYByNNbbzkqL20B0AqlX-1x/s1600/IMG_7380_med-717818.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWz9m05oeGRGChPsMkG423gdvl8K5vqAMDjjtPtbtdV-OLXqZBVy9eAsoyGLPdnPlrakjK3NXaWALTnvwo4rrEe_WZyQVY1BD6ELHO1R-NkPVY90NSoiPhyphenhyphenMYByNNbbzkqL20B0AqlX-1x/s320/IMG_7380_med-717818.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5714421001311438882" /></a></p><p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO_1LVIPL31ViE82Rg0TZT4ndWy0G1qdK_Niz4H5QRtJM_PnkCi7ko42EmaQuU9e9o4EZZI-STGYjXT1KlVTAiYYyRzarl2eKlYNxDCa7HydcALBVRAIvbZuVqNwio3m7WSDC8nbeUavm9/s1600/IMG_7385_sm-721377.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO_1LVIPL31ViE82Rg0TZT4ndWy0G1qdK_Niz4H5QRtJM_PnkCi7ko42EmaQuU9e9o4EZZI-STGYjXT1KlVTAiYYyRzarl2eKlYNxDCa7HydcALBVRAIvbZuVqNwio3m7WSDC8nbeUavm9/s320/IMG_7385_sm-721377.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5714421007755445506" /></a></p><p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqesT5tnIz8pESYk8PdnJsWvT8EPy1G9ljexHmI8qI8ZxXgFWwwuLWq9j3OymRKkwDdj1-zY-bVaGzAvBhHyhbUcrb4j4WmPPZ18l3d2UpEXiXesY3ILomPCEyAEXngRONMOi-zypBR9FV/s1600/IMG_7387_sm-722886.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqesT5tnIz8pESYk8PdnJsWvT8EPy1G9ljexHmI8qI8ZxXgFWwwuLWq9j3OymRKkwDdj1-zY-bVaGzAvBhHyhbUcrb4j4WmPPZ18l3d2UpEXiXesY3ILomPCEyAEXngRONMOi-zypBR9FV/s320/IMG_7387_sm-722886.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5714421012953596018" /></a></p>Here is a photo of a boys choir from the local orphanage in Kota Kinabalu this past Christmas singing Christmas carols in reasonably intelligible English at the tree lighting in Sutera Habour Resort. They were adorable. I hope they are well-supported. The resort is owned by a Chinese-Singaporean and the Chinese are largely Christian in Malaysia, so resort management can get away with Christmas festivities, despite the Muslim government that dominates all other private life and culture in Malaysia. The Chinese tend to segregate themselves into gated subdivisions with modern homes. The gates are more than just for show and controlling vehicle traffic. The stone walls are often topped with sharp spikes or barbed wire to control pedestrians as well. Despite the fact that Malaysia is nominally a democracy, and the Chinese compose more than 50% of the population in Sabah, laws and enforcement are heavily skewed to muslims. Only muslims can hold government or oil-industry jobs. Chinese dominate nearly every other sector of the economy, including agriculture, commercial and residential real estate, banking, retail, and restaurants. I imagine the Chinese business and church community are the main benefactors for the local catholic orphanage where these boys came from.<br> <br>The other two photos show how Malaysians and Filipinos dry fish in the sun covered with salt, to preserve them for selling at the market or eating at home. Ice doesn't last long in the tropics and most of the locals, especially in the water villages where the fishermen live, don't have a refrigerator or ice. And they tap into electrical power from street lights nearby without paying taxes or utility bills, since technically they live on the water (swamps, reefs, and ditches near the city) where you can't own the "land".<br> <br> Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-42534351138166816182012-02-10T05:34:00.001+07:002012-02-10T05:34:59.817+07:00The End of IllnessI skimmed the The End of Illness (David B. Agus) while waiting at a Brisbane Queenstreet bookstore that has taken up the slack for the massive Borders Books that shuttered recently. I was looking for health wisdom. One statistic was quite new to me--that sitting at a desk all day after a strenuous morning workout can be as damaging to your health as smoking (statistically speaking). However, I had to put down the book and discount that tidbit of "insight" after I surveyed the chapter on "Rotten Eggs" which describes what Agus calls his egg theory. After explaining how subtle environmental factors for a chicken egg can profoundly affect it's state, Agus proceeds to exaggerate the link between embryonic environment and its affect on development of the human brain. Agus falls into the banal statistical trap of assuming correlation and causation are equivalent. According to Agus, a child born within 18 months of another child to the same mother develops autism with 3 fold greater likelihood. He assigns the cause to the change in the uterine environment for the embryo due to recent childbirth and the brother/sister recently living there. However, a much more plausible argument is that closely spaced births and the environmental effect of being a little brother/sister to a mother juggling two breast-feeding children have a much more profound influence on mental development. Subtle changes in a mother's behavior have been associated with autism since the 70's. And mothers of 2 children close in age may adjust their care for the second child, using what they learned with the first, and perhaps rationing breast milk in different ways than they would if they only had one child suckling every 2 hours. The manufactured nature of baby formula (perhaps with trace heavy metals and volatile organic chemicals) might also have an effect on neural development. Not to mention that the mother will likely be more confident with the second child, with so recent a memory of the birth and care of a child. And confidence can have unexpected affects on the actual development of a child, I'm sure. The parents may become more aloof, less responsive to familiar personality quirks of their baby. Tehy may even devalue those unique personality trates that make their second baby who he is, simply because they've seen something similar recently. The baby cuteness instincts may not work as well the second time around, if recent in parents' memory. Parental emotional connection to a child must certainly affect their brain development, much more strongly than the recent presence of another child in the womb. Just being the second child (younger brother/sister), close in age, surely has a profound impact on development due to the natural rivalry. Unfortunately, a younger brother is shackled with the jealousy and lack of power that an older brother might have -- like a prisoner and a gate keeper. The older sibling has physical and mental power but a lack of recognition (parents often go to great lengths to assure both children that they have equal "rank")--and power without status is the hallmark of a sociopath. That leads to another commonly accepted concept that should be debunked--autism and aspergers being a "spectrum" disorder separate from narcisism, sociopathology, etc. Spectrum really isn't the right term for a mental illness. Mental illness is multidimensional not a linear quantity or scale or spectrum--complex system metrics would be more applicable.<br> Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-3229147085865015042012-01-02T10:49:00.001+07:002012-01-02T10:49:20.887+07:00Building bitcoin-qt from source on Ubuntu 11.10 OneiricThese are the steps that worked for me on Ubuntu 11.10 Oneiric to build <br>bitcoin-qt (the "official" bitcoin GUI).<p>git clone <a href="https://github.com/bitcoin/bitcoin">https://github.com/bitcoin/bitcoin</a><br>cd bitcoin<br>sudo aptitude install bitcoind qt4-qmake libqt4-dev build-essential <br>libboost-dev libboost-system-dev libboost-filesystem-dev <br>libboost-program-options-dev libboost-thread-dev libssl-dev <br>libdb4.8++-dev libminiupnpc-dev<br>qmake USE_DBUS=1 USE_UPNP=0<br>make<br># then to run the executable gui<br>bitcoin-qtHobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com4tag:blogger.com,1999:blog-313689671378392430.post-44729018036566858372011-12-24T09:48:00.002+07:002011-12-26T09:09:57.675+07:00Solar Panel "Breakthrough"A friend forwarded a oil/energy investment/political article by <font face="Arial, Helvetica, sans-serif"><i> "Dr." Kent Moors</i> titled "A Trade War May Scuttle This Huge Solar Breakthrough". Typical blogger hype, but I was intrigued to checked it out, reading the referenced </font>NREL paper, <font face="Arial, Helvetica, sans-serif">"Peak External Photocurrent Quantum Efficiency Exceeding 100 percent via MEG in a Quantum Dot Solar Cell" and looking up quantum dots and excitons on wikipedia:</font> <br />
<a href="http://en.wikipedia.org/wiki/Quantum_dot#Photovoltaic_devices" target="_blank">http://en.wikipedia.org/wiki/Quantum_dot#Photovoltaic_devices</a><br />
Conventional solar panels already acheive 100% MEG, so 114% represents a minor improvement in quantum efficiency. Only when it reaches 700% MEG (the theoretical maximum, according to wikipedia) will it make any real difference for solar panels. And even then it will only bring up the total efficiency of a panel from about 30% (where we are now) to about 35%, which would have a negligible impact on the total cost per kWhr of electricity. So this "doctor" that wrote the article is just hyping it because he's got nothing else to talk about in his newsletter today. Same for me, I guess...<br />
<br />
<font face="Arial, Helvetica, sans-serif" size="5"><b>A Trade War May Scuttle This Huge <br />
Solar Breakthrough</b><br />
</font> <font face="Arial, Helvetica, sans-serif"> <i>by Dr. Kent Moors</i> </font>Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-58654021897901385222011-11-08T04:21:00.001+07:002011-11-08T04:21:58.922+07:00Great Jobs Site for Software Developers -- Stack Overflow Careers 2.0I only have 2 invites left. So if you use one, try to get your profile "completeness" up above 100 (out of 210), so Stack Overflow will give me more invites to hand out to eager software developers. If you don't know what Stack Overflow is, or aren't looking for a job, leave these invites for someone else.<br> <a class="" href="http://bit.ly/sUxwGK">http://bit.ly/sUxwGK</a><br> Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-74291234453857519722011-11-06T15:01:00.000+07:002011-11-06T15:01:41.168+07:00ML-Class Insight into Neural NetworksDr. Ng's lectures and exercises for the <a href="http://ml-class.com">Stanford Machine Learning Class</a> have opened my eyes to the essence of neural networks. They really are nothing new. A 3-layer network (with 1 hidden layer) is just a linear regression of a linear regression. But there's a subtly to switching outputs and regression coefficients during training, but other than that, the algorithms for neural netw are 100% identical those for logistic regression. What made it clear for me was the cut and paste we could do from the logistic regression code into the programming exercise for neural nets. I'll admit I was a bit disappointed when Dr. Ng started the class with lectures teaching basic linear regression and describing them using fancy terms like "logistic regression machine learning." However, I stand corrected. It was genius of Dr. Ng to set up the course this way. Using both logistic regression and a 3-layer neural net on the same, intuitive, problem--OCR (handwritten numerical digit recognition)--made this comparison of the two algorithms obvious. I'm looking forward to seeing how he deals with scale, translation, and ambiguous scribbles in upcoming image processing and OCR exercises. Now if only he could anticipate and share these insights at the beginning of a lecture series to get us excited about working through the math, that would turn this course into one hum-dinger of a class.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-41085651884616965092011-11-01T10:42:00.001+07:002011-11-01T10:42:19.801+07:00FedEx Contributing to the Greater BadFedEx and UPS have equally neanderthal business practices when it comes to international customs clearance paperwork and fees. By neanderthal, I mean evolutionarily ill-adapted and short-sighted. FedEx and UPS both invariably require payment of brokerage fees and customs duties when those fees are not required. Rather than informing their customers at the shipper site how to label and declare packages to reduce customs duties they initiate the process that causes these unnecessary fees. And by not charging the shipper for the total cost of getting the package through customs (including any duties and broker fees) they can charge it to the naive recipient at the time that the package arrives at their doorstep. Since the recipient may be a vacationer in a hotel or a cruiser in an anchorage, and he's gone to great lengths to make the shipment happen as quickly as possible, they usually just swallow their pride and the fees in order to get the critical part or banking card or whatever. In my case, the total shipping costs, customs duties, and brokerage fees exceeded the cost of the already overpriced refrigerator part that I ordered, a $300 shaft seal, much smaller than a deck of cards, that typically cost less than $30 when the fridge was new.<br> <br>FedEx and UPS pricing seems to be based on the extortion principle--never set your ransom so high as to incite revenge or law enforcement involvment. And always set it just within the means of your "customer." By making the total cost impact 50 to 150% of the shipped item cost, they can be pretty sure that a desperate customer will pay the exorbitant fees. The worst part is, that most of that money, caused by FedEx "total bad" goes to corrupt political bureaucracies and FedEx call center employee salaries rather than the pockets of the selfish executives that put those policies in place. And FedEx guessed wrong with me. My sense of fairness has inspired me to share my displeasure at their extortion as widely as possible. If I can just make the negative publicity cost them a few customers that will be enough to right the wrong and turn this into a "total good", nudging business and cultural evolution to produce a more well-adapted global shipping business. Fortunately the solution is easy for anyone wanting to avoid FedEx and UPS extortion for packages from the US... ship through the USPS. Though packages typically take more than two weeks when shipped by USPS, they arrive without hassle or phone calls at your doorstep (or marina mailbox), and without any hidden fees or duties to be paid. I wonder if DHL offers similar "total-good" service if you are willing to jump through the hoops required to set up a business account with them. In the end, this "Priority Express" package from FedEx is going to take more than a week to come to me around the world, and it's still hung up in their bureaucracy right now. So USPS would have been faster. Now if I can just convince the major marine parts distributors to accept a "non-preferred" shipper as my preferred delivery option, then we'd be in business. But that's a corporate collusion and market manipulation topic for another post.<br> <br>So whenever possible use <a href="http://usps.com">usps.com</a> and avoid <a href="http://fedex.com">fedex.com</a>.<br> Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-63265135992179673272011-10-30T13:42:00.000+07:002011-10-30T13:43:17.282+07:00Ubuntu 11.10 Oneiric Tweaks<pre class="linux-code"><code>Today's Ubuntu tweaks were to get my desktop background shuffling script to run at startup.<br><br>For example to get firefox to launch at startup use <br><br></code><pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 14px"> sudo cp /usr/share/applications/firefox.desktop /etc/xdg/autostart<br><br></pre>(thanks <a href="http://www.liberiangeek.net/2011/09/automatically-startup-applications-for-all-users-in-ubuntu-11-10/">http://www.liberiangeek.net/2011/09/automatically-startup-applications-for-all-users-in-ubuntu-11-10/</a>)<br> <br>So I created a desktop file in /etc/xdg/autostart:<br><br>[Desktop Entry]<br>Name=Background Image Shuffler<br>Comment=Periodically change the desktop background image<br>#Icon=<br>Exec=python /home/hobs/bin/looping_shuffle_background_photo.py<br> #Terminal=true<br>#NoDisplay=true<br>Type=Application<br>Categories=<br>OnlyShowIn=GNOME;<br>X-GNOME-Autostart-Delay=90<br>X-Ubuntu-Gettext-Domain=looping_shuffle_background_photo<br><br>Also I liked this gnome tweaking suggestion<br> <br><code>sudo apt-get install gnome-tweak-tool<br><br></code>(thanks <a href="http://www.webupd8.org/2011/10/things-to-tweak-after-installing-ubuntu.html">http://www.webupd8.org/2011/10/things-to-tweak-after-installing-ubuntu.html</a>) <br></pre> Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-56616214940563760182011-10-27T11:54:00.000+07:002011-10-27T11:54:01.480+07:00Craig's List in MalaysiaCraig's List is everywhere, even in Borneo. So we listed our boat as "real-estate" there. <br />
<br />
http://malaysia.craigslist.org/reo/2671113694.html<br />
<br />
Now that we're starting to get a diversity of listings at brokerages, want-ads, and cruising forums, it will be interesting to compare the response rate at each. Still not much traffic at our own site:<br />
<br />
http://totalgood.com/australis/Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-58135664818675015382011-10-27T07:14:00.001+07:002012-04-18T20:52:30.559+07:00Google Does EvilThis was the <a href="http://googledesktop.blogspot.com/2011/09/google-desktop-update.html">last straw</a> for me. Google can do better than to imitate Apple, Amazon, and all the other closed systems with built-in obsolesence and all the other total bad stuff worth ranting about.<br />
<br />
We techie lemmings were a disappointment when we killed Palm OS by "upgrading" to iPhones, Windows Smartphones, and Android. Palm was the most elegant, efficient OS I've ever used (and I've passionately explored nearly every imaginable OS from the beginning--Amiga, TRS-80 "CoCo", Apple IIe, Mac, Sun, Linux, DOS, Windows CE, Windows 3.1/XP/Vista/etc.<br />
<br />
I still look longingly at my wife's ancient Treo and admire the ease with which she retrieved the most obscure bit of information from her tiny little "brain" (the Palm, not her massively intelligent real brain). I used to be that guy too, the guy you could ask anything about anyone, and he'd tell you in an instant. I could tell you in 1 minute everything I knew about anyone I'd ever met. I'd sync up my palm daily (or more) with lots of offline text data gleaned from corporate servers and my own random thoughts. <br />
<br />
I was sure the king of search would eventually do a bang-up job with the Android magnifying glass search button. But it seems to have opted for the short-term buck--using the search button to route users through their online services. What happened to efficiently indexing and searching private, local data, **MY** data -- not **YOUR** user profiling data. I used to be able to find people based on partial birthdays, telephone numbers, badge numbers, you name it. Now I have to remember their name--not any nicknames, or memory crutches like "bald" or "wears glasses", but their full name. Not even their first name will do, because "John" turns up 100's of people I've met in my life and recorded some detail about.<br />
<br />
I will spend my last bit of spare coding brainpower supporting open-source alternatives to Google desktop and similar knowledge indexing. Cloud, schmloud. I just want my brain back, the part that is embedded in a Palm Pilot, buried in a landfill somewhere.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-40062768093277701342011-10-26T21:35:00.007+07:002011-10-26T22:07:01.749+07:00Building MySQL Workbench from Source for Ubuntu 11.10 OneiricIf you use MySQL Workbench for web app development as much as I do, you'll be disapointed to learn that it breaks in Ubuntu 11.10 Oneiric. MWB just hung on the splash screen for more than 10 minutes on startup despite several aptitude update/upgrade and reboots. Only way out was <code>pkill mysql-workbench</code>.<br />
<br />
According to the folks at <a href="http://wb.fabforce.eu/">MySQL</a>, this is a verified <a href="http://bugs.mysql.com/bug.php?id=62347">bug</a> for Ubuntu 11.10 and there's a MWB source code <a href="http://bugs.mysql.com/file.php?id=17639">patch</a> for the latest version (MySQL Workbench 5.2.35).<br />
<br />
Here's the full procedure to download, patch, build, and install a working MWB on the latest Ubuntu.<br />
<code><br />
# MWB version number to build and install<br />
FILEVER='5.2.35'<br />
FILEPRE='mysql-workbench-gpl-'<br />
FILESUF='-src'<br />
FILENAME="${FILEPRE}${FILEVER}${FILESUF}"<br />
PATCHNAME="mwb_$FILEVER_on_ubuntu_oneiric_11.10.patch"<br />
<br />
# install the Ubuntu prerequisites (dependencies)<br />
# I'm sure there's a cleaner way, but this is everything:<br />
sudo apt-get install autoconf automake build-essential g++ libboost-dev libctemplate-dev libglade2-dev libglu1-mesa-dev libgnome-keyring-dev libgnome2-dev libgtkmm-2.4-dev liblua5.1-0-dev liblua5.1-dev libmysqlclient15-dev libpcre3-dev libsigc++-2.0-dev libsqlite3-dev libtool libxml2-dev libzip-dev lua5.1 python-dev python-pexpect uuid-dev<br />
<br />
# change to whatever directory your do your source builds in<br />
cd ~/src<br />
<br />
# get the source code directly from mysql.com<br />
wget -nd --progress -c -v "http://dev.mysql.com/get/Downloads/MySQLGUITools/${FILENAME}.tar.gz/from/http://mysql.mirrors.pair.com/" -O "${FILENAME}.tar.gz"<br />
<br />
# extract the downloaded tgz compressed source code package<br />
tar -zxvf "${FILENAME}.tar.gz" <br />
<br />
# get into that newly created source directory<br />
cd "$FILENAME"<br />
<br />
# get the patch file to fix the build-time and run-time freezes<br />
wget http://bugs.mysql.com/file.php?id=17639 -O "$PATCHNAME"<br />
<br />
# apply the patch<br />
patch --verbose -p0 < "$PATCHNAME"
</code><br />
<br />
<br />
<code><br />
# automatically build a makefile based on your OS and settings<br />
./autogen.sh<br />
<br />
# you may get a warning like this ...<br />
# aclocal.m4:16: warning: this file was generated for autoconf 2.61.<br />
# You have another version of autoconf. It may work, but is not guaranteed to.<br />
# but it didn't cause me any trouble<br />
<br />
# the build will take about an hour on a slow laptop,<br />
# so make sure you're plugged in and have something to read<br />
# -j2 limits the number of separate jobs/tasks spawned to only 2<br />
make -j2<br />
<br />
# install it<br />
sudo make install<br />
<br />
</CODE><br />
<br />
Don't mistakenly apply this patch to older MWB versions (like 5.1.19). Here's the entire procedure for downloading, patching, building, and installing MySQL Workbench on Ubuntu 11.10.<br />
<br />
And if you get tired bug patching src making, and want to escape from it all, we're "declaring victory" on the dream life and selling <a href="http://totalgood.com">our boat</a> to return to the real world.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com1tag:blogger.com,1999:blog-313689671378392430.post-53320613093127124402011-10-25T08:48:00.002+07:002011-10-26T11:29:54.900+07:00That $15 hex-shaped cylinder waterproof MP3...<div style="border: solid 1px #dfdfdf; color: #686868; font: 13px Arial;"><div style="background-color: white; padding: 20px;"><table cellpadding="0" cellspacing="0"><tbody>
<tr><td style="padding-right: 15px; vertical-align: top;"><a href="https://plus.google.com/_/notifications/ngemlink?&emid=CPiZ2dbbgqwCFcYj5godv0EAAA&path=%2F101736060564628010323&dt=1319507282255"><img height="75" src="https://lh6.googleusercontent.com/-OYUsHSxTjkM/AAAAAAAAAAI/AAAAAAAAAAA/hfWh3XkfUAI/s75-c-k-a/photo.jpg" style="border: solid 1px #cccccc;" width="75" /></a></td><td style="color: #333333; font: 13px Arial; vertical-align: top; width: 578px;"><div style="padding-bottom: 10px;">That $15 hex-shaped cylinder waterproof MP3 player (and eBook reader!) is a bargain. It doesn't seem to have a name besides "Waterpoof MP3 Player", made in China." cVEU-L15 might be the model number or serial number. It worked great as an 8 GB usb stick, but it would never power on to play music. So I dug into the guts...<br />
<br />
1. Unscrew the cap with the headset jack. <br />
2. Remove the plastic inserts<br />
3. Pull the battery free from it's glued position atop a large microchip<br />
<br />
At this point I measured 0 V at the battery, with and without the 5V USB charger supplying power to the headphone jack.<br />
<br />
4. Unwrap the mylar tape from the battery terminals<br />
5. Unfold the battery terminal circuit board from the battery<br />
<br />
This unfolded a bit of aluminum foil causing the battery to short itself. Now I measured 2V at the battery and 5 V at the power supply from the USB. Unfortunately, I brushed the + and - probes into each other during this measurement and sparked the small chip (diode?) near the incoming 5V. So I'll never be able to charge again. But at least I can see if the rest of the thing works by plugging in a new 3.6 V battery pack (3 AAA NiMH ?).</div><div style="border-left: 2px solid #EAEAEA; margin-bottom: 10px; padding-left: 10px;"><a href="https://plus.google.com/_/notifications/ngemlink?&emid=CPiZ2dbbgqwCFcYj5godv0EAAA&path=%2F101736060564628010323%2Fposts%2F371uz7P6pqn%3Fgpinv%3DAMIXal_q_lyum-YpgF0ZvRhnWgAOzWE0XbhP71-xz4pU4VNncIBc-bX4Ma6M_5jBe31PtMUDYYparfZuhC6l73MkWLdhqFGtfQSYT0jkdNP_xrRC8MtLJik%26hl%3Den_GB&dt=1319507282255" style="margin-right: 10px;"><img border="0" src="https://lh4.googleusercontent.com/-8ShBHdH1gJQ/TqYT-NK5Y6I/AAAAAAAAAcE/NctMygFOqEw/h120/IMG_20111025_074219.jpg" style="max-height: 200px; max-width: 275px;" /></a><a href="https://plus.google.com/_/notifications/ngemlink?&emid=CPiZ2dbbgqwCFcYj5godv0EAAA&path=%2F101736060564628010323%2Fposts%2F371uz7P6pqn%3Fgpinv%3DAMIXal_q_lyum-YpgF0ZvRhnWgAOzWE0XbhP71-xz4pU4VNncIBc-bX4Ma6M_5jBe31PtMUDYYparfZuhC6l73MkWLdhqFGtfQSYT0jkdNP_xrRC8MtLJik%26hl%3Den_GB&dt=1319507282255" style="margin-right: 10px;"><img border="0" src="https://lh6.googleusercontent.com/-hZvQGGZZ1gM/TqYT-Bm7CQI/AAAAAAAAAcI/wYGNgFhT76U/h120/IMG_20111025_071630.jpg" style="max-height: 200px; max-width: 275px;" /></a><a href="https://plus.google.com/_/notifications/ngemlink?&emid=CPiZ2dbbgqwCFcYj5godv0EAAA&path=%2F101736060564628010323%2Fposts%2F371uz7P6pqn%3Fgpinv%3DAMIXal_q_lyum-YpgF0ZvRhnWgAOzWE0XbhP71-xz4pU4VNncIBc-bX4Ma6M_5jBe31PtMUDYYparfZuhC6l73MkWLdhqFGtfQSYT0jkdNP_xrRC8MtLJik%26hl%3Den_GB&dt=1319507282255" style="margin-right: 10px;"><img border="0" src="https://lh4.googleusercontent.com/-CoRBalWgVk8/TqYT_Cah3WI/AAAAAAAAAcQ/p75E-7h0lEs/h120/IMG_20111025_071827.jpg" style="max-height: 200px; max-width: 275px;" /></a></div><a href="https://plus.google.com/_/notifications/ngemlink?&emid=CPiZ2dbbgqwCFcYj5godv0EAAA&path=%2F101736060564628010323%2Fposts%2F371uz7P6pqn%3Fgpinv%3DAMIXal_q_lyum-YpgF0ZvRhnWgAOzWE0XbhP71-xz4pU4VNncIBc-bX4Ma6M_5jBe31PtMUDYYparfZuhC6l73MkWLdhqFGtfQSYT0jkdNP_xrRC8MtLJik%26hl%3Den_GB&dt=1319507282255" style="color: #3366cc; text-decoration: none;">View or comment on Hobson Lane's post »</a></td></tr>
</tbody></table></div><div style="background-color: whitesmoke; border-top: solid 1px #dfdfdf; padding: 0 20px;"><table cellpadding="0" cellspacing="0" style="height: 50px;"><tbody>
<tr><td style="color: #636363; font: 11px Arial; line-height: 120%; vertical-align: middle; width: 100%;"></td><td><br />
</td></tr>
</tbody></table></div></div>Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-52473893160037617752011-10-20T10:09:00.001+07:002011-10-20T10:09:49.980+07:00We Aren't the Only Ones<p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmXw1fjK0Ne3-6TEYyw0dr-ZC269Yj6XOllS-h-KPCmstAkbC0Y0-0e4oawvyH5M634KMrH1j6OQ1FZt55M9kxxDE2eoRW0_fN1H5QJroLTWXQEG_QXbAoqsm-9ByKb3Xr3pZzrIPcsVE0/s1600/100_2199-789981.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmXw1fjK0Ne3-6TEYyw0dr-ZC269Yj6XOllS-h-KPCmstAkbC0Y0-0e4oawvyH5M634KMrH1j6OQ1FZt55M9kxxDE2eoRW0_fN1H5QJroLTWXQEG_QXbAoqsm-9ByKb3Xr3pZzrIPcsVE0/s320/100_2199-789981.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5665406279372309810" /></a></p>The container ship in the distance ran aground on the reef just before we arrived at the harbor in Apia Samoa. Tugs were pulling furiously with cables stretched across the harbor entrance preventing us from entering until dusk. It turns out this was the supply ship on its way to make the rounds in Tonga to supply isolated villages that hadn't seen a ship for years due to a ferry acident in Tonga. So the islanders on Niutaputapu had to wait another year for. Unfortunately, three weeks after this photo was taken a Tsunami leveled the villages in Niutaputapu, Tonga. We were in Port Villa, Vanuatu, by that time and the tsunami warning reached us in time to motor out into deep water before the 4 cm Tsunami ripple reached the harbor. Vanuatu was protected from the brunt of the Tsunami that devastated Niutaputapu by the ocean geography.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0tag:blogger.com,1999:blog-313689671378392430.post-59543118507654316572011-10-19T14:57:00.000+07:002011-10-19T14:58:18.787+07:00Boat Project -- Grunert AR-50 Shaft Seal<p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv2oHWe-sEOaJ5lkUEj7s6LJWI1QgMboT5feK_vU6X7d8V5eKlNB3_OHK5pddoa6lNhhSry_vw2UEvOQuTorXnTznesNm83zblUqm8XM3gI85qy9WCdGKx4Bxskxdg7LEpJG0AgX8ory8I/s1600/IMG_20111014_115443-798788.jpg"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv2oHWe-sEOaJ5lkUEj7s6LJWI1QgMboT5feK_vU6X7d8V5eKlNB3_OHK5pddoa6lNhhSry_vw2UEvOQuTorXnTznesNm83zblUqm8XM3gI85qy9WCdGKx4Bxskxdg7LEpJG0AgX8ory8I/s320/IMG_20111014_115443-798788.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5665109536140115826" /></a></p><p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaZWQXCfH3b8httHKmQjc8OHAuJU2SCwWfrejiAaKEfDKAroA8WdANcAp0ZUcHbugPnwSSnCUe6Poi69SW3k1oE39v3JYDFEQwNbi-Xp3f9UQhq7ycdDrB-Mmnw8bo-B3v4raNDYasJa06/s1600/IMG_20111014_115449-799923.jpg"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaZWQXCfH3b8httHKmQjc8OHAuJU2SCwWfrejiAaKEfDKAroA8WdANcAp0ZUcHbugPnwSSnCUe6Poi69SW3k1oE39v3JYDFEQwNbi-Xp3f9UQhq7ycdDrB-Mmnw8bo-B3v4raNDYasJa06/s320/IMG_20111014_115449-799923.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5665109539744371618" /></a></p>bolts are 5.0" apart<br>pulley/flywheel is 8.5" OD<br>shaft is about 2.65" above the bottom surface of the compressor<br><br>The old <a href="http://www.blissfield.com/index.php?option=com_docman&task=doc_download&gid=66&Itemid=321" target="_blank">Blissfield application manual</a> lists compressor measurements that seem to match the Blissfield models CA, CB, CD, or CE compressor to our Grunert AR-50 1/2 HP system. Ours has 8 "head" bolts on top around the edge and 2 in the center above the presume pair of cylinders. Which appears to need the "BMK 510-6" blissfield shaft seal and bearing. It appears that the Edd Helms Marine website sells the seal kit for conversion from R12 to R134a, hopefully this includes the shaft seal because I ordered it today. It seems that even R134a is being phased out this year and people will have to switch to CO2. R134a is compatible with Polyol Ester Oil (ester oil). Need to make sure the new dryer is not a solid bauxite type or it will release acid into the compressor when it gets saturated with moisture and ester oil. Molecular sieves are the preferred type for R134a.<br> <br><br><br><br> Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com2tag:blogger.com,1999:blog-313689671378392430.post-13064689168251439832011-10-18T17:39:00.001+07:002011-10-18T17:39:50.529+07:00Coral Spawn<p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpo14wnp_VwqHdht7cH-I10EX4NnMWXJiI-BejX_UqNnfrO7g6byrK2Y6kqILRBl5DxkOGUmRi2MlAwAevm0iPrXj9W75w3VI5fvjnO2ZY8ezPTaSS9EmIbTwTOkApoNmpLcHeuN0zV41A/s1600/100_2552-790530.JPG"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpo14wnp_VwqHdht7cH-I10EX4NnMWXJiI-BejX_UqNnfrO7g6byrK2Y6kqILRBl5DxkOGUmRi2MlAwAevm0iPrXj9W75w3VI5fvjnO2ZY8ezPTaSS9EmIbTwTOkApoNmpLcHeuN0zV41A/s320/100_2552-790530.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5664780076997943746" /></a></p>This is what coral spawn looks like. We'd been at sea for more than a week, sailing from Vanuatu to Australia when we came across this slimy orange slick that stretched from horizon to horizon. We tried to maneuver around clumps, thinking it was a chemical or oil spill, but eventually gave up and plowed through. We even went as far as to gather samples for submital to whatever environmental police there might be, but fortunately never filed a complaint. Once we arrived in Bundaberg, we learned that it was coral spawning season, and we were sailing over the top of the Great Barrier Reef after all.Hobsonhttp://www.blogger.com/profile/12560159237232637730noreply@blogger.com0