You'll have to pardon me if I've been a bit
incomprehensible recently, I've been busy writing yet another paper. Hopefully this'll be the last one before I start my write-up in earnest. The basic gist of it is that I'm writing a paper on squashing brains, which always makes for some rather confusing after-dinner conversation.
Anyway, I've been wanting to keep up with
Hiren's stream of consciousness dissertation on programming, so here's my attempt at turning your own brain to a liquefied pulp.
I've had the recent displeasure of needing to build
ATLAS,
LAPACK and
CVMLIB, which all together provide an optimised library for linear algebra, needed for our real-time simulation work. Building on x86 presents few problems, with ATLAS only needing three hours to build (!!), giving me a bunch of static (.a) libraries which I can happily link against. For me, a good set of optimisation flags for
gcc, on pentium4 processors are:
-O3 -pipe -march=pentium4 -ffast-math -mfpmath=sse -msse2On pentium-m (e.g. laptop/centrino)
-O3 -pipe -march=pentium-m -ffast-math -mfpmath=sse -msse2On x86_64 (notably, on AMD64, such as Athlon and Opteron), it's a whole different kettle of fish. Here, I've discovered, if you build your libraries as shared (.so), then you need to build the libraries you link against
also as shared libraries, and build the objects with
position independent code. This is complicated by the fact that LAPACK, ATLAS and CVMLIB's build scripts are written to mostly generate static objects :|
The solution lay in manually adding
-fPIC to pretty much every compile line in building the libraries (usually by editing the top-level make include file), and then repackaging the ordinary static libraries as shared .so files. This can be achieved using a small shell script:
#!/bin/sh
mkdir tmp
cd tmp
ar x ../$1.a
gcc -shared *.o -o../$1.so
rm -rf *.o
cd ..
To create foo.so from foo.a, simply run:
./conv fooIt's a little ugly, but it does work. Additionally then, I've found the set of optimisation flags on x86_64 that work for me are:
-fPIC -funroll-loops -march=k8 -ffast-math -fpeel-loops -m64The
-m64 does make a significant difference; I've found that, in practice, the linear-algebra routines I run (matrix inversion etc.) run about 10-20% faster with
-m64 on AMD platforms. If I had time, I'd like to properly check that out. Oh well.
I've also been keeping up on building a variety KDE packages for Mandriva 2006; the latest selection of (mostly eye-candy) RPM's are
here, including a 1.3.7 build of the comix window decoration.
And now, since the medium of blogging seems to demand it:
indulge yourself with some
alternative entertainment.
Well, I'm over whatever funk I got into about my PhD. Tis all back to normal again, and now I'm merely tearing my hair out over the paper I'm currently trying to write.
Anyway, clearing the backlog of what I've been up to.. back to
LA. I had Saturday afternoon to kill, so I went and re-walked along
Long Beach; I didn't go as far as last time, but I did get to that
pier again (
map). It wasn't all that satisfying really - I've seen both sides of the Pacific now, and it looks pretty much the same from both sides. I still had a little time, so I asked myself -
what would Cthulhu do? So I headed back inland.
Not far into my sojourn back downtown, I was wolf-whistled at. This was not a bad start, so I looked around to find the source of this welcome attention, and it was..
..a god-damned parrot. Sitting on this dude's shoulder. Bloody
pirate. Ego crushed, my inner geek took over and I caught the bus to the nearest bit of big engineering - the
Queen Mary.
Its a big ole boat, and apparently the last big Atlantic liner in its class that's all in one piece. It serves as a floating hotel now, but the sheer size of it is still quite impressive. There was plenty going on around the place (including a
cheerleading tournament), so the area around the ship had a friendly buzz which was distinctly lacking on my last visit. If you wanted to, you could go for a tour around the area on a
segway scooter. These bizarre vehicles are truly weird to watch, and now that I've seen people scooting around on them, quite unappealing.
However, something that stopped me dead in my tracks, something that sucked me in by its sheer
monstrous kitsch tackiness, was an outlet of the
Outback Steakhouse:
Folks, this was kind of surreal. I have to confess, I've never been to an Australian theme pub (and there are quite a few of them around), so visiting an 'Aussie' theme restaurant was a little startling. The food and the service was nice enough (and yes, export Fosters is actually barely drinkable) - however, the interior of the place was a sight to behold. The place was literally infested with kangaroo and koala motifs, with surfboards and boomerangs liberally nailed to walls. It was a little unsettling, like stepping into a version of what I imagined Australia was like before I moved there.
However, the decor had nothing on the
menu. "Bonzer times start with awesome Outback Tucker" - I can't make this stuff up. The signature dish was this abominable giant fried onion thing (an Australian
ab-original!), coupled with such rarities as the "Too Right French Onion Soup" and "
Prime Minister's Prime Rib". On the drinks menu, they even managed to insert a 'h' into 'Bondi'. It was, for the little time I was at the restaurant, like being in
another world.
In an even stranger turn of events, this theme restaurant franchise is now
opening restaurants in Sydney (yes, that's an American-based Australian theme restaurant operating in Australia). The local
menu isn't quite so hideously kitsch ("no rules, just right - g'day mates!"), but it'll be interesting to see how it is received in the long run.
Anyway, now I should get back to writing that paper ;)