<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>timdoug's interesting tidbits</title>
    <link>http://www.timdoug.com/log/</link>
    <description>started in 2009? ...how unfashionable.</description>
    <language>en</language>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>blosxom/2.1.2</generator>

  <item>
    <title>What CPUs do the Amazon EC2 High-Memory On-Demand Instances use?</title>
    <pubDate>Tue, 02 Mar 2010 04:27:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2010/03/02#ec2_high_memory</link>
    <category>/hpc</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/hpc/ec2_high_memory</guid>
    <description>I can&apos;t vouch for the Extra Large or Double Extra Large ones, but the Quadruple Extra Large ones use Nehalem-based Gainestown &lt;b&gt;Intel Xeon X5550 @ 2.67GHz&lt;/b&gt;.
&lt;br&gt;
&lt;pre&gt;processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 26
model name      : Intel(R) Xeon(R) CPU           X5550  @ 2.67GHz
stepping        : 5
cpu MHz         : 2666.760
cache size      : 8192 KB
physical id     : 0
siblings        : 1core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mca cmov pat pse36
clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc
pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca popcnt lahf_lm
bogomips        : 5337.91
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:
&lt;/pre&gt;</description>
  </item>
  <item>
    <title>The Authoritative List of Packages Needed to Comile the WikiReader Firmware</title>
    <pubDate>Tue, 02 Mar 2010 03:36:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2010/03/02#wikireader_packages</link>
    <category>/wikireader</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/wikireader/wikireader_packages</guid>
    <description>
This is for a 32-bit Ubuntu Karmic schroot (as outlined in &lt;tt&gt;doc/Using-schroot.text&lt;/tt&gt;) on a 64-bit Debian stable installation.
&lt;pre&gt;flex
bison
ocaml
python
python-gd
gforth
guile-1.8
gawk
php5-cli
php5-sqlite
sqlite3
xfonts-utils
cjk-latex
dvipng
qt4-qmake
libqt4-dev
sudo
wget&lt;/pre&gt;</description>
  </item>
  <item>
    <title>Using SheepShaver on Mac OS X</title>
    <pubDate>Mon, 28 Dec 2009 03:26:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/12/28#sheepshaver_osx</link>
    <category>/osx</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/osx/sheepshaver_osx</guid>
    <description>Build as listed on the website. Video uses X and audio goes through CoreAudio,
so you don&apos;t need SDL. A few other bits of information, though:
&lt;ul&gt;
&lt;li&gt;For working keyboard shortcuts, disable &quot;Enable key equivalents under
X11&quot; in X11.app.&lt;/li&gt;
&lt;li&gt;For sound output, select &quot;Built-in&quot; in the Sound control panel.&lt;/li&gt;
&lt;li&gt;Launch with this command:&lt;br&gt;
&lt;tt&gt;
./SheepShaver --rom /wherever/macos.rom --disk /wherever/harddrive.img --frameskip 0 --ramsize 268435456 --ignoresegv true --ignoreillegal true --ether slirp --idlewait true --keycodes true --keycodefile keycodes&lt;/tt&gt;&lt;br&gt;
This gives you working ethernet, keyboard shortcuts, smooth video, 256MB of RAM,
and better stability through ignoring SEGV and illegal instructions.&lt;/li&gt;
&lt;/ul&gt;</description>
  </item>
  <item>
    <title>Help! I have no /dev/dsp!</title>
    <pubDate>Sat, 05 Dec 2009 14:01:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/12/05#devdsp</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/devdsp</guid>
    <description>Just modprobe &lt;tt&gt;snd_pcm_oss&lt;/tt&gt; and &lt;tt&gt;snd_mixer_oss&lt;/tt&gt;, and restart udev.
Then relive all your old Mac game meories through SheepShaver...</description>
  </item>
  <item>
    <title>How to type accents in X</title>
    <pubDate>Tue, 01 Dec 2009 20:11:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/12/01#hacek</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/hacek</guid>
    <description>You&apos;ll want to use something called the Compose Key.
Good instructions on &lt;a href=
&quot;http://web.archive.org/web/20070311053357/http://process-of-elimination.net/wiki/Means_of_Composing_Accented_Characters_in_X_Window_System&quot;
&gt;this site&lt;/a&gt;, but here&apos;s a quick installation summary:
&lt;ul&gt;
&lt;li&gt;Use &lt;tt&gt;xev&lt;/tt&gt; to get the name of the key you want to use, e.g.,
Super_L&lt;/li&gt;
&lt;li&gt;Try it out with &lt;tt&gt;xmodmap -e &quot;keysym Super_L = Multi_key&quot;&lt;/tt&gt;
(hint: capitalization is important!)&lt;/li&gt;
&lt;li&gt;Put the xmodmap command in ~/.xmodmaprc for permanence.&lt;/li&gt;
&lt;/ul&gt;
Mmm, &lt;i&gt;háčeky&lt;/i&gt;.</description>
  </item>
  <item>
    <title>My Terminal Emulator Setup in Debian</title>
    <pubDate>Mon, 02 Nov 2009 13:44:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/11/02#terminal_emulator</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/terminal_emulator</guid>
    <description>On my Debian boxes I use &lt;a href=&quot;http://www.6809.org.uk/evilwm/&quot;&gt;evilwm&lt;/a&gt;
as my window manager, because it gets out of my way in just the way I like.
Hence, I don&apos;t use gnome-terminal or kterm or ETerm or what have you;
xterm has worked perfectly fine.
&lt;p&gt;
Nevertheless, I frequently spawn a lot of terminals, and the 5MB that each
xterm process eats up (not including the 3MB bash does) add up after I fill
a few virtual desktops with terminals. Xterm is also quite slow:
cat&apos;ing a 15K line banner output takes ~4 seconds on my netbook.
&lt;p&gt;
Hence, I went looking for replacements. Rxvt takes ~2MB per instance and
cats the same file in ~1.2 seconds. Mrxvt takes ~3MB and ~0.5 seconds.
Rxvt-unicode takes the cake, though, at ~3 MB and ~0.3 seconds. The real
kicker, though, is its &quot;daemon&quot; mode, in which only once process is spawned
for all &quot;client&quot; terminals, saving a lot of RAM. (Just hope it doesn&apos;t crash!)
&lt;p&gt;
Here&apos;s my setup:
&lt;ol&gt;
&lt;li&gt;&lt;tt&gt;apt-get install rxvt-unicode-lite&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;~/.Xresources: (for a nice black-on-white xterm-like experience)
&lt;pre&gt;URxvt*scrollBar: false
URxvt*reverseVideo: true&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;sudo update-alternatives --config x-terminal-emulator&lt;/tt&gt; and select
urxvtcd&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;
Now I save 4-5MB of RAM for every terminal I have open, and when that gets
to ~10 terminals that&apos;s not an insignificant amount of memory on a machine
with 1GB of memory (and even more important on my lower-spec&apos;d machines).</description>
  </item>
  <item>
    <title>How to set up the QT4 WikiReader simulator in Debian unstable</title>
    <pubDate>Sun, 18 Oct 2009 11:27:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/10/18#wikireader_simulator_howto</link>
    <category>/wikireader</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/wikireader/wikireader_simulator_howto</guid>
    <description>&lt;ol&gt;
&lt;li&gt;Certain build scripts require Python 2.6, so find some way to install it
(Debian experimental, by source, etc.)&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;apt-get install
libqt4-dev qt4-qmake netpbm gforth
build-essential php5-cli sqlite3&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;git clone git://github.com/wikireader/wikireader.git&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;cd wikireader/samo-lib/include&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Copy &lt;tt&gt;config.h-default&lt;/tt&gt; to &lt;tt&gt;config.h&lt;/tt&gt; and uncomment
the SIMULATOR #define.&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;make qt4-simulator&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Breakage will occur. Be merciless with hackage!
I had to change a few lines of C and asm when functions weren&apos;t defined, etc.
&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;mkdir image work&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;make DESTDIR=image WORKDIR=work XML_FILES=xml-file-samples/japanese_architects.xml index parse render combine&lt;/tt&gt; (per doc/QuickStart)&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;make DESTDIR=image install&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;cp host-tools/qt4-simulator/bin/wikisim image/&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;cd image&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;./wikisim&lt;/tt&gt;&lt;/li&gt;
It will segfault soon enough, but you&apos;ll hopefully be able to get in
a bit of reading on Japanese architects. Good luck!
&lt;/ol&gt;</description>
  </item>
  <item>
    <title>Installing SheepShaver and BasiliskII on Debian</title>
    <pubDate>Tue, 15 Sep 2009 10:39:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/09/15#sheepshaver_howto</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/sheepshaver_howto</guid>
    <description>I&apos;ve tested SheepShaver with Mac OS 7.6.1 and Mac OS 8.1 with a 4MB OldWorld
ROM. Sound works (even though ESD isn&apos;t used), video works, haven&apos;t tried
ethernet. (all done on my current Debian unstable Intel Atom netbook.)
The same instructions work for BasiliskII.
&lt;ol&gt;
&lt;li&gt;Install the following packages:
&lt;tt&gt;
build-essential
autoconf2.59
automake1.4
libxt-dev
libxext-dev
libxxf86dga-dev
libxxf86vm-dev&lt;/tt&gt;
&lt;/li&gt;
&lt;li&gt;Follow the instructions &lt;a href=&quot;http://sheepshaver.cebix.net/&quot;&gt;here&lt;/a&gt;
to download and the source from CVS, and &lt;tt&gt;make links&lt;/tt&gt; as directed.&lt;/li&gt;
&lt;li&gt;Patch autogen.sh in src/Unix thusly:
&lt;pre&gt;--- old/SheepShaver/src/Unix/autogen.sh 2007-06-13 14:09:05.000000000 +0200
+++ ss2/SheepShaver/src/Unix/autogen.sh 2009-09-15 12:21:32.000000000 +0200
@@ -40,13 +40,13 @@
 
 aclocalinclude=&quot;$ACLOCAL_FLAGS&quot;; \
 (echo $_echo_n &quot; + Running aclocal: $_echo_c&quot;; \
-    aclocal $aclocalinclude; \
+    aclocal-1.4 $aclocalinclude; \
  echo &quot;done.&quot;) &amp;&amp; \
 (echo $_echo_n &quot; + Running autoheader: $_echo_c&quot;; \
-    autoheader; \
+    autoheader2.59; \
  echo &quot;done.&quot;) &amp;&amp; \
 (echo $_echo_n &quot; + Running autoconf: $_echo_c&quot;; \
-    autoconf; \
+    autoconf2.59; \
  echo &quot;done.&quot;) 
 
 rm -f config.cache&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;The output should look something like this:
&lt;pre&gt;SheepShaver configuration summary:

SDL support ...................... : none
FBDev DGA support ................ : yes
XFree86 DGA support .............. : yes
XFree86 VidMode support .......... : yes
Using PowerPC emulator ........... : yes
Enable JIT compiler .............. : yes
Enable video on SEGV signals ..... : yes
ESD sound support ................ : no
GTK user interface ............... : no
mon debugger support ............. : no
Addressing mode .................. : real
Bad memory access recovery type .. : siginfo

Configuration done. Now type &quot;make&quot;.&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Patch sys_unix.cpp in src/Unix thusly:
&lt;pre&gt;--- sys_unix.cpp.old    2009-09-15 12:28:54.000000000 +0200
+++ sys_unix.cpp        2009-09-15 12:29:06.000000000 +0200
@@ -883,11 +883,6 @@
                        }
                }
 #endif
-#ifdef CDROM_DRIVE_STATUS
-               if (fh-&gt;cdrom_cap &amp; CDC_DRIVE_STATUS) {
-                       return ioctl(fh-&gt;fd, CDROM_DRIVE_STATUS, CDSL_CURRENT) == CDS_DISC_OK;
-               }
-#endif
                cdrom_tochdr header;
                return ioctl(fh-&gt;fd, CDROMREADTOCHDR, &amp;header) == 0;
 #elif defined(__FreeBSD__) || defined(__NetBSD__)&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Make.&lt;/li&gt;
&lt;li&gt;If SheepShaver gets angry about
&lt;tt&gt;ERROR: Cannot map Low Memory Globals: Permission denied.&lt;/tt&gt;
try:
&lt;tt&gt;sudo sysctl -w vm.mmap_min_addr=0&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;i&gt;To be continued...&lt;/i&gt;</description>
  </item>
  <item>
    <title>Yet Another MSI Wind Hackintosh Tutorial</title>
    <pubDate>Tue, 25 Aug 2009 18:52:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/08/25#msi_wind_howto</link>
    <category>/osx</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/osx/msi_wind_howto</guid>
    <description>Just contributing my method. General outline: install OSX on an external drive
from a MacBook, then copy the installation to the internal Wind drive.
&lt;p&gt;
Requirements:
&lt;ul&gt;
&lt;li&gt;MacBook&lt;/li&gt;
&lt;li&gt;Leopard DVD&lt;/li&gt;
&lt;li&gt;External HD / USB drive (I&apos;m using a 320GB one -- anything that can hold
an OSX installation should work)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://support.apple.com/downloads/Mac_OS_X_10_5_7_Combo_Update&quot;
&gt;Mac OS X 10.5.7 Combo Update&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://chameleon.osx86.hu/&quot;&gt;Chameleon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html&quot;
&gt;SuperDuper!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CyberGreg&apos;s driver pack (google around)&lt;/li&gt;
&lt;/ul&gt;
Instructions:
&lt;ol&gt;
&lt;li&gt;Boot the MacBook from the Leopard DVD.&lt;/li&gt;
&lt;li&gt;Partition the external drive, with a GUID scheme.&lt;/li&gt;
&lt;li&gt;Reboot and install the 10.5.7 update (newest 10.5.8 doesn&apos;t have
good support at time of writing), reboot.&lt;/li&gt;
&lt;li&gt;Install CyberGreg&apos;s driver pack.&lt;/li&gt;
&lt;li&gt;Install Chameleon on the external drive.&lt;/li&gt;
&lt;li&gt;Boot the Wind from the external drive.&lt;/li&gt;
&lt;li&gt;Use SuperDuper to copy the OSX installation to the interal drive.&lt;/li&gt;
&lt;li&gt;Run Chameleon again on the interal drive.&lt;/li&gt;
&lt;/ol&gt;
Hurrah!</description>
  </item>
  <item>
    <title>When bit twiddling, make sure to use unsigned types.</title>
    <pubDate>Fri, 21 Aug 2009 04:37:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/08/21#bit_twiddling_psa_1</link>
    <category>/coding</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/coding/bit_twiddling_psa_1</guid>
    <description>This public service announcement was brought to you by the &quot;Why The Fuck
Don&apos;t My Bit Shifts Work&quot; Department.&lt;br&gt;
&lt;br&gt;
Goodness, that was amateur.</description>
  </item>
  <item>
    <title>GMABooster segfaults on my machine!</title>
    <pubDate>Sun, 09 Aug 2009 02:04:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/08/09#gmabooster_segfault</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/gmabooster_segfault</guid>
    <description>Run it is root. </description>
  </item>
  <item>
    <title>Benchmarking Intel&apos;s UXA, round 2</title>
    <pubDate>Wed, 22 Jul 2009 22:19:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/07/22#intel_uxa_again</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/intel_uxa_again</guid>
    <description>Debian unstable just upgraded to xserver-xorg-video-intel version 2.8.0. 
(released two days ago -- who says Debian is out of date?)
This release is notable in that it removes support for EXA and DRI1,
leaving only UXA and DRI2 for acceleration. Considering my previous
benchmarking attempts, I thought it was only right to check the new
drivers.
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;UXA, 2.8.0 (new-school) &lt;ul&gt;
	&lt;li&gt;100 runs: 18.17 seconds&lt;/li&gt;
	&lt;li&gt;200 runs: 38.32 seconds&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
UXA on 2.8 is still slower than EXA on 2.7, but not by much.
Notably, it&apos;s much faster than
UXA on 2.7. I&apos;m sure further releases will only lower these numbers further.</description>
  </item>
  <item>
    <title>Installing Grub 2 on Debian sid</title>
    <pubDate>Tue, 21 Jul 2009 05:41:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/07/21#grub2</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/grub2</guid>
    <description>Sid has recently moved grub to grub-legacy and made grub 2 the default.
My installation went fine -- all I had to do was remove grub-legacy
(because of some conflicting man pages) and install os-prober and
recreate grub.cfg to recognize my WinXP partition.
&lt;p&gt;
Hooray new packages in Debian!</description>
  </item>
  <item>
    <title>Benchmarking Intel&apos;s UXA vs EXA</title>
    <pubDate>Thu, 16 Jul 2009 22:26:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/07/16#intel_uxa</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/intel_uxa</guid>
    <description>There&apos;s been a lot of development with regard to Intel&apos;s new
UXA acceleration framework for its GMA integrated graphics chips.
Benchmarks over at Phoronix have shown mixed results, so I decided to
run some tests myself.
&lt;br&gt;&lt;br&gt;
Tests run on an Asus Eee PC 900HA, with a 1.6GHz Atom N270 processor
and integrated GMA 950 graphics, gtkperf 0.40, default Debian kernel 2.6.30, 
Xorg 1.6.2, and Intel driver 2.7.1. (i.e., an up to date unstable installation.)
&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;EXA (old-school) &lt;ul&gt;
	&lt;li&gt;100 runs: 15.75 seconds&lt;/li&gt;
	&lt;li&gt;200 runs: 34.79 seconds&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;UXA (new-school) &lt;ul&gt;
	&lt;li&gt;100 runs: 22.10 seconds&lt;/li&gt;
	&lt;li&gt;200 runs: 48.54 seconds&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
So it looks like I&apos;m sticking with EXA for now. If you have any tips
as to boost either of these numbers, do let me know.</description>
  </item>
  <item>
    <title>How to create a custom Debian package</title>
    <pubDate>Tue, 23 Jun 2009 19:25:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/23#modifying_a_debian_package</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/modifying_a_debian_package</guid>
    <description>I&apos;m nowhere close to having the knowledge of a true Debian Developer,
but I&apos;ve used the OS enough to want to create my own packages.
In this circumstance, I wanted a newer version of evilwm
(it&apos;s 1.0.0 in the repo, and 1.0.1 is the newest release) and
I wanted to change the mouse button behaviour. The steps
I followed (I&apos;m sure there&apos;s a cleaner way -- do inform me).
&lt;ol&gt;
&lt;li&gt;&lt;tt&gt;apt-get install devscripts build-essential&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;apt-get build-dep evilwm&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;apt-get source evilwm&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Patch/hack away...&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;debchange -n&lt;/tt&gt; and document your non-maintainer changes&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;debuild -us -uc&lt;/tt&gt; so we don&apos;t try to sign it&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;dpkg -i&lt;/tt&gt; the resultant package&lt;/li&gt;
&lt;/ol&gt;
Cheers!</description>
  </item>
  <item>
    <title>Getting an Elantech touchpad working in Debian squeeze (or: how to disable tap-to-click on an Eee 900HA)</title>
    <pubDate>Mon, 22 Jun 2009 20:31:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/22#elantech_debian</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/elantech_debian</guid>
    <description>Tap to click on a trackpad is a terrible idea.
When I want to click, I&apos;ll &lt;i&gt;hit the damn button myself&lt;/i&gt;, thank you very much.
My ratio of unwanted to wanted tap-to-clicks is understandably undefined.
&lt;p&gt;
Three systems need to be configured for this to work: the kernel, the Xorg driver, and the X server itself.
&lt;ol&gt;
&lt;li&gt;The kernel&lt;br&gt;
As documented &lt;a href=&quot;http://wiki.debian.org/DebianEeePC/HowTo/ElantechTouchpad&quot;&gt;here&lt;/a&gt;,
recent kernels don&apos;t need to be patched; they just need &lt;tt&gt;CONFIG_MOUSE_PS2_ELANTECH&lt;/tt&gt;
enabled. Sadly, because of other issues
&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522920&quot;&gt;the
maintainers know about&lt;/a&gt;, it won&apos;t be enabled in mainline Debian kernels anytime soon.
So either you&apos;ll have to build a kernel yourself, or just take
&lt;a href=&quot;http://www.timdoug.com/etc/psmouse.ko&quot;&gt;the psmouse.ko I&apos;ve created&lt;/a&gt;
from 2.6.30, and pop it in the apropriate location in /lib/modules.&lt;/li&gt;
&lt;li&gt;The Xorg driver&lt;br&gt;
Debian testing (&quot;squeeze&quot; at time of writing) has an old version of xserver-xorg-input-synaptics
that doesnt have the necessary Elantech patches. Unstable does, but pinning the binary has
other dependencies that would pretty much require upgrading all of X, which I&apos;d rather not do.
So you can either pin the source file and build it yourself, or download and install the package
I&apos;ve made. Grab it &lt;a href=&quot;http://www.timdoug.com/etc/xserver-xorg-input-synaptics_1.1.2-1_i386.deb&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The X server&lt;br&gt;
We just need to poke aorund xorg.conf a bit. What worked for me:
&lt;pre&gt;Section &quot;InputDevice&quot;
        Identifier      &quot;Configured Mouse&quot;
	Option		&quot;CorePointer&quot;
        Driver          &quot;synaptics&quot;
        Option          &quot;Device&quot;                &quot;/dev/input/event10&quot;
        Option          &quot;Protocol&quot;              &quot;auto-dev&quot;
        Option          &quot;SHMConfig&quot;             &quot;true&quot;
	Option		&quot;MaxTapTime&quot;		&quot;0&quot;
        Option          &quot;VertTwoFingerScroll&quot;   &quot;1&quot;
        Option          &quot;HorizTwoFingerScroll&quot;  &quot;1&quot;
EndSection&lt;/pre&gt;
&lt;/ol&gt;
Good luck!</description>
  </item>
  <item>
    <title>Running Debian testing on an Eee PC 900HA</title>
    <pubDate>Mon, 22 Jun 2009 16:30:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/22#eee_config</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/eee_config</guid>
    <description>Great news: almost everything works out of the box.
I was concerned about hardware support, and struggling with wireless,
so I just apt-pinned the latest kernel from unstable, and it works perfectly.
&lt;ol&gt;
&lt;li&gt;X11 at 1024x600, DRI&lt;/li&gt;
&lt;li&gt;Sound&lt;/li&gt;
&lt;li&gt;Ethernet&lt;/li&gt;
&lt;li&gt;Touchpad w/ two-finger scrolling
(although with annoying-as-hell tap to click -- more on that later)&lt;/li&gt;
&lt;li&gt;Wireless&lt;/li&gt;
&lt;li&gt;Camera (w/ Skype)&lt;/li&gt;
&lt;li&gt;Suspend to RAM&lt;/li&gt;
&lt;/ol&gt;
Protip: make sure to &lt;tt&gt;modprobe acpi-cpufreq&lt;/tt&gt; for frequency scaling.
&lt;p&gt;
I&apos;m using evilwm as my window manager, because I love how it gets out
of my way and lets me do my work. I&apos;d post a screenshot, but there&apos;s
no eye-candy to show off... =) I&apos;ve also had to hack Firefox into shape
so it doesn&apos;t take up silly amounts of vertical pixels.</description>
  </item>
  <item>
    <title>How to Install Debian on an Eee PC 900HA</title>
    <pubDate>Thu, 18 Jun 2009 15:33:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/18#debian_eee_install</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/debian_eee_install</guid>
    <description>I just picked up an &lt;a href=&quot;http://en.wikipedia.org/wiki/ASUS_Eee_PC&quot;&gt;Asus
Eee PC 900HA&lt;/a&gt;.
It, currently, has the best mix of size, cost, and capabilities for what I want in a netbook.
I&apos;m keeping Windows on it to use Ableton Live and for &quot;just in case&quot; purposes.
Here&apos;s documentation of what I&apos;ve done to re-partition, keeping the
provided Windows installation, and install Debian testing.
&lt;ol&gt;
&lt;li&gt;Download and repartition using a
&lt;a href=&quot;http://gparted.sourceforge.net/liveusb.php&quot;&gt;GParted&lt;/a&gt;
bootable USB drive. I used the Windows-based choice 3.&lt;/li&gt;
&lt;li&gt;Make sure to set the USB disk as higher priority than the internal
drive, or else it&apos;ll boot from the HD every time.&lt;/li&gt;
&lt;li&gt;My drive came partitioned into four partitions:
	&lt;ol&gt;
	&lt;li&gt;Windows boot (~80 GB)&lt;/li&gt;
	&lt;li&gt;Windows free (empty, ~60 GB)&lt;/li&gt;
	&lt;li&gt;Windows restore partition (~8 GB)&lt;/li&gt;
	&lt;li&gt;Extra restore info? (~40 MB)&lt;/li&gt;
	&lt;/ol&gt;
You should be safe deleting all but the first partition and going from there,
but it&apos;s not as if I&apos;m wanting for space on this netbook, so I let &apos;em stay.
&lt;/li&gt;
&lt;li&gt;Follow the instructions on
&lt;a href=&quot;http://www.debian.org/releases/lenny/i386/ch04s03.html&quot;&gt;this page&lt;/a&gt;
of the Debian installation manual.&lt;/li&gt; 
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;i&gt;To be continued...&lt;/i&gt;</description>
  </item>
  <item>
    <title>Does Ableton Live work on an Eee PC 900HA?</title>
    <pubDate>Wed, 17 Jun 2009 19:06:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/17#ableton_live_eee_pc</link>
    <category>/music</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/music/ableton_live_eee_pc</guid>
    <description>Very much so. With two decks, equalizers, and a few other affects, 
CPU usage doesn&apos;t appear to go higher than ~20% or so.
This may just become my new gig rig!
&lt;br&gt;&lt;br&gt;
Just make sure to install
&lt;a href=&quot;http://www.apple.com/quicktime/download/&quot;&gt;QuickTime&lt;/a&gt;
if MP3s are at all part of your setup. Cheers.</description>
  </item>
  <item>
    <title>How to configure and make gcc with GRAPHITE</title>
    <pubDate>Wed, 17 Jun 2009 19:06:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/17#gcc_graphite_howto</link>
    <category>/gcc</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/gcc/gcc_graphite_howto</guid>
    <description>Done on a standard Debian installation with a sane toolchain installed.
&lt;ol&gt;
&lt;li&gt;Download and untar &lt;a href=&quot;http://gmplib.org/&quot;&gt;libgmp&lt;/a&gt;, configure with &lt;tt&gt;./configure --enable-cxx&lt;/tt&gt;, and install.&lt;/li&gt;
&lt;li&gt;Download, untar, &lt;u&gt;patch&lt;/u&gt; (according to their website), configure, and install &lt;a href=&quot;http://www.mpfr.org/&quot;&gt;libmpfr&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;You know the drill by now: &lt;a href=&quot;http://www.cs.unipr.it/ppl/Download/&quot;&gt;ppl&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;apt-get install automake1.7&lt;/tt&gt; (for cloog-ppl)&lt;/li&gt;
&lt;li&gt;Who said we were anywhere close to done? &lt;a href=&quot;ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.3.tar.gz&quot;&gt;cloog-ppl&lt;/a&gt;.
Its configure script is really picky, though; I had to explicitly use &lt;tt&gt;--with-gmp=&lt;i&gt;dir&lt;/i&gt;&lt;/tt&gt; and &lt;tt&gt;--with-ppl=&lt;i&gt;dir&lt;/i&gt;&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Grab gcc-4.4.0, untar, and configure. These are the options I used (following Debian&apos;s &lt;tt&gt;gcc -v&lt;/tt&gt; lead):
&lt;tt&gt;$ ../gcc-4.4.0/configure --enable-languages=c,c++,fortran --prefix=/home/timdoug/local/ --enable-shared --with-system-zlib --without-included-gettext --enable-threads=posix --with-gmp=/home/timdoug/local/ --with-mpfr=/home/timdoug/local/ --enable-mpfr --with-ppl=/home/timdoug/local/ --with-cloog=/home/timdoug/local/&lt;/tt&gt; (&lt;b&gt;note the different object directory!&lt;/b&gt;)&lt;/li&gt; 
&lt;li&gt;The configure script should spit out something like this, amongst its output:
&lt;pre&gt;checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... yes
checking for version 0.10 of PPL... yes
checking for correct version of CLooG... yes&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;make&lt;/tt&gt;, and grab a sandwich.&lt;/li&gt;
&lt;li&gt;Curse profusely when it doesn&apos;t compile.&lt;/li&gt;
&lt;/ol&gt;

&lt;i&gt;To be continued...&lt;/i&gt;</description>
  </item>
  <item>
    <title>Installing Debian on a PlayStation 3 and running a Cell/SPU &quot;Hello World&quot;</title>
    <pubDate>Sat, 06 Jun 2009 21:36:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/06#install_spu</link>
    <category>/ps3</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/ps3/install_spu</guid>
    <description>What could be better than flexing a bit of matrix-multiply muscle? 
We&apos;re going to use Daniel Hackenberg&apos;s &lt;a href=&quot;http://www.tu-dresden.de/zih/cell/matmul/&quot;&gt;hand-coded asm routines&lt;/a&gt;,
because they achieve ridiculous performance.
&lt;ol&gt;
&lt;li&gt;Follow &lt;a href=&quot;http://www.kernel.org/pub/linux/kernel/people/geoff/cell/ps3-howto/ps3-debian-install-howto.txt&quot;&gt;these&lt;/a&gt; instructions.&lt;/li&gt;
&lt;li&gt;Install some packages:
&lt;tt&gt;apt-get install build-essential rpm libc6-dev-ppc64 gcc-4.3-spu spu-tools&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Grab the following RPMs off of &lt;tt&gt;CellSDK-Devel-Fedora_3.0.0.1.0.iso&lt;/tt&gt;.
	&lt;ol&gt;
	&lt;li&gt;&lt;tt&gt;ps3:/# rpm2cpio /home/timdoug/libs/cell-libs-3.0-16.ppc.rpm | cpio -id&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;ps3:/# rpm2cpio /home/timdoug/libs/cell-libs-3.0-16.ppc64.rpm | cpio -id&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;ps3:/# rpm2cpio /home/timdoug/libs/cell-libs-devel-3.0-16.ppc.rpm | cpio -id&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;ps3:/# rpm2cpio /home/timdoug/libs/cell-libs-devel-3.0-16.ppc64.rpm | cpio -id&lt;/tt&gt;&lt;/li&gt;
	&lt;/ol&gt;
&lt;li&gt;Debian ships with a 32 bit libspe2, but we need a 64 bit version:
	&lt;ol&gt;
	&lt;li&gt;&lt;tt&gt;wget http://ftp.debian.org/debian/pool/main/libs/libspe2/libspe2_2.2.80-95.orig.tar.gz&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;Add &lt;tt&gt;-m64&lt;/tt&gt; to &lt;tt&gt;CFLAGS&lt;/tt&gt; in &lt;tt&gt;make.defines&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;make&lt;/tt&gt;&lt;/li&gt;
	&lt;/ol&gt;
&lt;li&gt;Add &lt;tt&gt;spufs /spu spufs defaults 0 0&lt;/tt&gt; to &lt;tt&gt;/etc/fstab&lt;/tt&gt;.
&lt;li&gt;&lt;tt&gt;mkdir /spe &amp;&amp; mount /spe&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;wget &quot;http://www.tu-dresden.de/hpcadm/dcount/dcount.php?package=matmul&amp;get=matmul.tar.gz&quot;&lt;/tt&gt;
&lt;li&gt;Untar &lt;tt&gt;matmu.tar.gz&lt;/tt&gt; and patch along these lines:
&lt;pre&gt;diff -urN matmul-old/COMPILE.sh matmul/COMPILE.sh
--- matmul-old/COMPILE.sh	2008-02-29 06:30:08.000000000 -0500
+++ matmul/COMPILE.sh	2009-06-06 17:12:39.000000000 -0400
@@ -29,15 +29,15 @@
 ${CELL_BIN}/spu-gcc -o matmul_spu matmul_spu.o matmul_spu_simd.o
 
 # embedd SPE object file into PPE object
-echo &quot;${CELL_BIN}/ppu-embedspu -m64 matmul_spu matmul_spu matmul_spu-embed64.o&quot;
-${CELL_BIN}/ppu-embedspu -m64 matmul_spu matmul_spu matmul_spu-embed64.o
+echo &quot;${CELL_BIN}/embedspu -m64 matmul_spu matmul_spu matmul_spu-embed64.o&quot;
+${CELL_BIN}/embedspu -m64 matmul_spu matmul_spu matmul_spu-embed64.o
 
 # compile PPE code
-echo &quot;${CELL_BIN}/ppu-gcc -W -Wall -O3 ${INC_PPU} -c matmul_ppu.c&quot;
-${CELL_BIN}/ppu-gcc -W -Wall -O3 ${INC_PPU} -c matmul_ppu.c
+echo &quot;${CELL_BIN}/gcc -m64 -W -Wall -O3 ${INC_PPU} -c matmul_ppu.c&quot;
+${CELL_BIN}/gcc -m64 -W -Wall -O3 ${INC_PPU} -c matmul_ppu.c
 
 # link SPE and PPE object files together
-echo &quot;${CELL_BIN}/ppu-gcc -o matmul matmul_ppu.o matmul_spu-embed64.o -lspe2&quot;
-${CELL_BIN}/ppu-gcc -o matmul matmul_ppu.o matmul_spu-embed64.o -lspe2
+echo &quot;${CELL_BIN}/gcc -m64 -o matmul matmul_ppu.o matmul_spu-embed64.o -lspe2 -lpthread -L/home/timdoug/libspe2-2.2.80-95&quot;
+${CELL_BIN}/gcc -m64 -o matmul matmul_ppu.o matmul_spu-embed64.o -lspe2 -lpthread -L/home/timdoug/libspe2-2.2.80-95
 
 rm -f matmul_spu *.o&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Open up &lt;tt&gt;spu-top&lt;/tt&gt; in another terminal to check up on things.&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;./matmul -s 6 -m 3072&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;
Output:
&lt;pre&gt;timdoug@ps3:~/matmul$ ./matmul -s 6 -m 3072

Fast matrix multiplications on Cell (SMP) systems.
Copyright (C) 2007  Daniel Hackenberg, ZIH, TU-Dresden

Running matrix multiplication of 3072x3072 matrices using 6 SPEs...
Initializing arrays with random numbers... done!
Starting SPE calculations...
Done!

Performance results:
Performance of SPE  0: 25.35 GFLOPS
Performance of SPE  1: 25.35 GFLOPS
Performance of SPE  2: 25.36 GFLOPS
Performance of SPE  3: 25.36 GFLOPS
Performance of SPE  4: 25.36 GFLOPS
Performance of SPE  5: 25.36 GFLOPS
Aggregated performance for all 6 SPEs: 152.14 GFLOPS.

PPE-measured performance of matrix multiplication using 6 SPEs: 152.11 GFLOPS.
(of 153.60 GFLOPS theoretical peak at 3200 MHz clock frequency)
&lt;/pre&gt;
152 SP GFLOPS is crazy absurd for $400. The above taks ~7.5 seconds to run, but most of the time is in initializing the matrix with random values!</description>
  </item>
  <item>
    <title>Help! I&apos;m running out of stack space!</title>
    <pubDate>Wed, 03 Jun 2009 20:23:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/03#more_stack</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/more_stack</guid>
    <description>Edit &lt;tt&gt;/etc/security/limits.conf&lt;/tt&gt;, open up a new shell, and have fun with &lt;tt&gt;ulimit&lt;/tt&gt;.</description>
  </item>
  <item>
    <title>Fun summer projects</title>
    <pubDate>Wed, 03 Jun 2009 19:12:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/03#summer_projects</link>
    <category>/general</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/general/summer_projects</guid>
    <description>So. With a summer ahead of me, there are a few things I want to get into now that I have the time. A list:
&lt;ul&gt;
&lt;li&gt;Get and play with an &lt;a href=&quot;http://www.arduino.cc/&quot;&gt;Arduino&lt;/a&gt;/&lt;a href=&quot;http://en.wikipedia.org/wiki/Atmel_AVR&quot;&gt;Atmel AVR&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Create a much less crufty compiler with 
&lt;a href=&quot;http://www.dabeaz.com/ply/&quot;&gt;PLY&lt;/a&gt; (python lex-yacc) and maybe 
&lt;a href=&quot;http://llvm.org/&quot;&gt;LLVM&lt;/a&gt; too (&lt;a href=&quot;http://code.google.com/p/llvm-py/&quot;&gt;llvm-py&lt;/a&gt; maybe?)&lt;/li&gt;
&lt;li&gt;Follow the &lt;a href=&quot;http://www.annexia.org/forth&quot;&gt;Jonesforth&lt;/a&gt;
tutoral, and get better at x86 asm at the same time&lt;/li&gt;
&lt;li&gt;PS3/CUDA/SIMD fun &amp; benchmarks&lt;/li&gt;
&lt;li&gt;Finally release that mixtape I&apos;ve been working on&lt;/li&gt;
&lt;li&gt;Brush up on my Starcraft abilities&lt;/li&gt;
&lt;li&gt;Learn &lt;a href=&quot;http://erlang.org/&quot;&gt;Erlang&lt;/a&gt;, 
&lt;a href=&quot;http://www.haskell.org/&quot;&gt;Haskell&lt;/a&gt;, 
and read through &lt;a href=&quot;http://mitpress.mit.edu/sicp/&quot;&gt;SICP&lt;/a&gt; again
&lt;/ul&gt;</description>
  </item>
  <item>
    <title>Reason N why I love Python</title>
    <pubDate>Wed, 03 Jun 2009 16:05:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/03#python_love</link>
    <category>/python</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/python/python_love</guid>
    <description>Code like this:
&lt;tt&gt;&quot;,&quot;.join(nodes_list[:num_nodes])&lt;/tt&gt;&lt;br&gt;
Objects, strings (finally sane in 3.0), lists, list slices...</description>
  </item>
  <item>
    <title>Reseting the root passwd on a PS3 Debian installation</title>
    <pubDate>Tue, 02 Jun 2009 01:52:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/02#reset_passwd</link>
    <category>/ps3</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/ps3/reset_passwd</guid>
    <description>I conveniently forgot the password for my year-old PS3 installation, but conveniently recognized that kboot is a little Linux installation in and of itself.
Hence, mounting &lt;tt&gt;/dev/ps3da1&lt;/tt&gt;, &lt;tt&gt;chroot&lt;/tt&gt;ing into it, and running &lt;tt&gt;passwd&lt;/tt&gt; does the trick. </description>
  </item>
  <item>
    <title>How to install rsh on Debian</title>
    <pubDate>Mon, 01 Jun 2009 19:16:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/01#rsh_howto</link>
    <category>/debian</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/debian/rsh_howto</guid>
    <description>Debian is aptly (hah!) fickle with regard to rsh -- by default,
if you have OpenSSH installed, rsh is just a symlink to it.
For my research I need rsh in order to get around the overhead that ssh incurs;
security isn&apos;t an issue because the machines are on a private network anyway.
&lt;ol&gt;
&lt;li&gt;&lt;tt&gt;apt-get install rsh-redone-client rsh-redone-server&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Add appropriate hostnames to ~/.rhosts&lt;/li&gt;
&lt;li&gt;Edit &lt;tt&gt;/etc/hosts.deny&lt;/tt&gt; and add &lt;tt&gt;in.rshd in.rlogind: ALL&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Edit &lt;tt&gt;/etc/hosts.allow&lt;/tt&gt; and add &lt;tt&gt;in.rshd in.rlogind: [hostnames]&lt;/tt&gt; as necessary.&lt;/li&gt;
&lt;/ol&gt;
Have (insecure) fun!</description>
  </item>
  <item>
    <title>High-Performance Computing and the PlayStation 3</title>
    <pubDate>Mon, 01 Jun 2009 16:08:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/01#ps3_intro</link>
    <category>/hpc</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/hpc/ps3_intro</guid>
    <description>I purchased a PS3 last summer with the express intent of running some simulations and benchmarks (and playing Gran Turismo 5 Prologue), but never got around to it (the first part, that is).
&lt;p&gt;
A few interesting links and PDFs:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://icl.cs.utk.edu/projectsfiles/iter-ref/pubs/ut_cs_06_580.pdf&quot;&gt;
Implementation of the Mixed-Precision High Performance LINPACK Benchmark on the CELL Processor
&lt;/a&gt; (what doesn&apos;t Dongarra do?)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.netlib.org/utk/people/JackDongarra/PAPERS/scop3.pdf&quot;&gt;
A Rough Guide to Scientific Computing On the PlayStation 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://cag.csail.mit.edu/ps3/lectures.shtml&quot;&gt;MIT&apos;s 6.819 lectures&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
I&apos;m intrigued by CUDA as well. We&apos;ll see where that goes.</description>
  </item>
  <item>
    <title>How to Install and Run HPL with GotoBLAS on Linux</title>
    <pubDate>Mon, 01 Jun 2009 10:00:00 +0000</pubDate>
    <link>http://www.timdoug.com/log/2009/06/01#hpl_howto</link>
    <category>/hpc</category>
    <guid isPermaLink="false">http://www.timdoug.com/log/hpc/hpl_howto</guid>
    <description>GFLOPs are fun. Here&apos;s how to determine your cluster&apos;s performance.

&lt;ol&gt;
&lt;li&gt;(make sure you have a proper build system: gcc, make, etc. Debian: &lt;tt&gt;apt-get install build-essential&lt;/tt&gt;)&lt;/li&gt;
&lt;li&gt;Install OpenMPI and gfortran. On Debian, it&apos;s as simple as &lt;tt&gt;apt-get install gfortran libopenmpi-dev openmpi-bin&lt;/tt&gt;.
&lt;li&gt;Download and compile &lt;a href=&quot;http://www.tacc.utexas.edu/resources/software/#blas&quot;&gt;GotoBLAS&lt;/a&gt;.
It&apos;s generally lauded as the fastest BLAS for (at least) x86 machines.
Compilation is a simple &lt;tt&gt;./quickbuild.64bit&lt;/tt&gt; (or 32, as appropriate) in the root directory of the tarball.&lt;/li&gt;
&lt;li&gt;Download and untar &lt;a href=&quot;http://www.netlib.org/benchmark/hpl/&quot;&gt;HPL&lt;/a&gt;. I used 1.0a -- 2.0 wouldn&apos;t compile for me.&lt;/li&gt;
&lt;li&gt;Create a Make.[arch] in the root dir of the hpl folder, and configure accordingly.
Appripriate example diff against setup/Make.Linux_PII_CBLAS:
&lt;pre&gt;--- setup/Make.Linux_PII_CBLAS	2004-01-22 00:13:11.000000000 -0500
+++ Make.timdoug	2009-06-01 00:23:29.000000000 -0400
@@ -61,7 +61,7 @@
 # - Platform identifier ------------------------------------------------
 # ----------------------------------------------------------------------
 #
-ARCH         = Linux_PII_CBLAS
+ARCH         = timdoug
 #
 # ----------------------------------------------------------------------
 # - HPL Directory Structure / HPL library ------------------------------
@@ -81,9 +81,9 @@
 # header files,  MPlib  is defined  to be the name of  the library to be
 # used. The variable MPdir is only used for defining MPinc and MPlib.
 #
-MPdir        = /usr/local/mpi
-MPinc        = -I$(MPdir)/include
-MPlib        = $(MPdir)/lib/libmpich.a
+MPdir        = /usr
+MPinc        = -I$(MPdir)/include/mpi
+MPlib        = -lmpi
 #
 # ----------------------------------------------------------------------
 # - Linear Algebra library (BLAS or VSIPL) -----------------------------
@@ -92,9 +92,9 @@
 # header files,  LAlib  is defined  to be the name of  the library to be
 # used. The variable LAdir is only used for defining LAinc and LAlib.
 #
-LAdir        = $(HOME)/netlib/ARCHIVES/Linux_PII
+LAdir        =
 LAinc        =
-LAlib        = $(LAdir)/libcblas.a $(LAdir)/libatlas.a
+LAlib        = ~/GotoBLAS/libgoto.a
 #
 # ----------------------------------------------------------------------
 # - F77 / C interface --------------------------------------------------
@@ -156,7 +156,7 @@
 #    *) call the BLAS Fortran 77 interface,
 #    *) not display detailed timing information.
 #
-HPL_OPTS     = -DHPL_CALL_CBLAS
+HPL_OPTS     = 
 #
 # ----------------------------------------------------------------------
 #
@@ -173,7 +173,7 @@
 # On some platforms,  it is necessary  to use the Fortran linker to find
 # the Fortran internals used in the BLAS library.
 #
-LINKER       = /usr/bin/g77
+LINKER       = /usr/bin/gcc
 LINKFLAGS    = $(CCFLAGS)
 #
 ARCHIVER     = ar&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;In hpl/bin/[arch], tweak HPL.dat. Example file:
&lt;pre&gt;HPLinpack benchmark input file
Innovative Computing Laboratory, University of Tennessee
HPL.out      output file name (if any)
6            device out (6=stdout,7=stderr,file)
1            # of problems sizes (N)
16384        Ns
1            # of NBs
128          NBs
0            PMAP process mapping (0=Row-,1=Column-major)
1            # of process grids (P x Q)
1            Ps
2            Qs
16.0         threshold
1            # of panel fact
2            PFACTs (0=left, 1=Crout, 2=Right)
1            # of recursive stopping criterium
4            NBMINs (&gt;= 1)
1            # of panels in recursion
2            NDIVs
1            # of recursive panel fact.
2            RFACTs (0=left, 1=Crout, 2=Right)
1            # of broadcast
1            BCASTs (0=1rg,1=1rM,2=2rg,3=2rM,4=Lng,5=LnM)
1            # of lookahead depth
0            DEPTHs (&gt;=0)
0            SWAP (0=bin-exch,1=long,2=mix)
64           swapping threshold
0            L1 in (0=transposed,1=no-transposed) form
0            U  in (0=transposed,1=no-transposed) form
1            Equilibration (0=no,1=yes)
8            memory alignment in double (&gt; 0)&lt;/pre&gt;
This is appropriate for a dual-core, 4GB RAM system. Important values to change:
&lt;ul&gt;
&lt;li&gt;N -- problem size. Start at ~1000 and ramp up until you hit the limit of your RAM. Note: it&apos;s quadratic (dimension of the matrices).&lt;/li&gt;
&lt;li&gt;NB -- block size. 128 works well for me. Others suggest 80, 160, or 256. Experiment.&lt;/li&gt;
&lt;li&gt;P and Q -- these multiplied should be the number of cores in your cluster. Certain configurations work better than others; do test.&lt;/li&gt;
&lt;/ul&gt;
HPL.dat tweaking is a kind of black magic -- check the tubes for further information.
&lt;/li&gt;
&lt;li&gt;Run &lt;tt&gt;GOTO_NUM_THREADS=1 mpiexec -np [num processes] ./xhpl&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;

Using these instructions, I achieved 5.5 GFLOPs per core and 10 GFLOPs in total on a Pentium D 930 machine,
9.5 GFLOPs per core and 18 GFLOPs on a Core 2 Duo E6700 processor,
and 50.6 GFLOPs on an Amazon EC2 &quot;High-CPU Extra Large Instance&quot; (dual quad-core Xeon E5345s):
&lt;pre&gt;domU:~/hpl/bin/timdoug# GOTO_NUM_THREADS=1 mpiexec -np 8 ./xhpl
============================================================================
HPLinpack 1.0a  --  High-Performance Linpack benchmark  --   January 20, 2004
Written by A. Petitet and R. Clint Whaley,  Innovative Computing Labs.,  UTK
============================================================================
[[[snip]]]
============================================================================
T/V                N    NB     P     Q               Time             Gflops
----------------------------------------------------------------------------
WR01L2C4       20000   128     2     4             105.33          5.064e+01
----------------------------------------------------------------------------
||Ax-b||_oo / ( eps * ||A||_1  * N        ) =        0.0067492 ...... PASSED
||Ax-b||_oo / ( eps * ||A||_1  * ||x||_1  ) =        0.0065323 ...... PASSED
||Ax-b||_oo / ( eps * ||A||_oo * ||x||_oo ) =        0.0012449 ...... PASSED
&lt;/pre&gt;

 Hooray!
</description>
  </item>
  </channel>
</rss>
