Southern Man

Sunday, August 22, 2010

Southern Man Has A Cookout

Over the past month or so one of the side projects out at The Land was the construction of a cinderblock firepit down in a little hollow near the lake and yesterday evening Southern Man and the friend who helped build it finally broke it in. There is nothing quite like a fire by the water and open-flame-broiled burgers and cold beer. Even in August. We stayed down there until well after dusk and watched the fish hit the surface and solved many, but not all, of the world's problems. We'll save the rest for next time.

Tuesday, August 17, 2010

I Have No Secrets

Hat tip to Linkiest.

Monday, August 16, 2010

Southern Man Runs Out Of Gas

So Southern Man is tooling along in the big Nissan Titan singing at the top of his lungs to a Green Day CD and generally on top of the world when - cough, cough - the truck sputters and dies.

This is disconcerting. Southern Man cranked the engine a few times but no joy. He flipped on the hazards (this is rush-hour traffic near a major intersection) and considered. Temperature was normal, fuel was OK, oil pressure in the middle of the gauge...

A few more attempts made it clear that the truck wasn't going to start so Southern Man pulled out the only vehicle-repair tool he knows how to use these days and called his favorite tow service and after an hour or so of watching people stop behind him and wait for a couple of traffic-light cycles and honk before going around (apparently the glare of the setting sun made the hazard flashers difficult to see) and even getting flipped off by an old lady who apparently took his breakdown as a personal affront the friendly tow driver and his girlfriend arrived and hauled Southern Man and his truck to the Nissan dealership across town, then dropped him off at home.

The next morning Southern Man arrived at the dealership promptly at service-desk opening time and the following conversation ensued:

Southern Man: My truck just sputtered and died, then it cranked but wouldn't even try to start. It was almost like it ran out of gas.

Friendly Nissan Service Writer: What was the gauge showing?

SM: A quarter-tank or so. Why?

FNSW: (laughing) You ran out of gas. There's a recall on those sender units; they sometimes hang up at a quarter-tank. We're getting two or three cases a week. We'll have a look and let you know.

On the one hand, this incident was proof that the system works. Southern Man was double-covered on the tow (auto insurance tow rider, Nissan Roadside Assistance plan) and wasn't too worried about the cost of repair (prepaid extended warranty). And sure enough it didn't cost him anything out of pocket and they even reset the pesky TPMS that hasn't worked right in months. He was amused to see that they billed the extended-warranty company for the faulty unit which as a recall item would normally be covered by the dealership. Southern Man will not comment that fuel-level senders are seventy-year-old technology and one would think that they'd have it right by now.

But what was distressing is that had this occurred forty years ago (when cars were simple and spark and compression and gas were all you needed) a dry tank would have been the first thing to check. It never even occurred to Southern Man to disbelieve the false reading on the gauge; he assumed that it was a clogged fuel filter or faulty computer or (God forbid) failed fuel injection system or some such thing. When vehicles are complicated and computerized one forgets to check the obvious.

Salt in the wound - the incident occurred thirty feet from a gas station.

There are no lessons to be learned here - only a reminder that the older Southern Man gets the larger and more restrictive his blinders become. Think outside the box? Southern Man can see only a small portion of the inside of the box that is directly in front of him. Depressing, but true. When is retirement again?

Saturday, August 14, 2010

Parallel Computing Workshop, Day 6

The wind-down was little more than a recap of a few topics and presentations by various groups as how they would use what was learned this week to teach parallel computing back at their home school. Southern Man took a back seat to his colleague for that task, and we were out well before lunchtime.

All in all, a good week. Southern Man is looking forward to making use of his new knowledge in a couple of classes this fall.

Friday, August 13, 2010

Parallel Computing Workshop, Day 5

Today was devoted to hybrid MPI/CUDA programs. The focus was on where in your code you should use each technology, which boils down to using CUDA for processing and MPI for communications. The instructors warned us that CUDA was fairly unforgiving and Southern Man achieved a number of fairly spectacular segmentation faults with his code. In the afternoon we did more benchmarking and learned how to build our own cluster (a topic selected by popular demand a few days ago).

Thursday, August 12, 2010

Parallel Computing Workshop, Day 4

Today we dove into the world of high-performance parallel computing using GPGPUs. It turns out that graphics processing units are tremendously fast "accelerators" for certain types of problem - that is, fine-grained, massively-parallel tasks using hundreds or even thousands of threads. Computer scientists have been playing with this idea for a while using the then-existing graphics APIs like OpenGL (which meant that one had to do quite a bit of work to recast a scientific-computing problem into a graphics-processing problem) but now Nvidia has embraced this with CUDA, a hardware standard that allows their GPUs to be used more easily for scientific computing and with libraries for popular programming languages (like C!) to use those GPUs.

Your computer's CPU is relatively small, requires lots of power, and spends most of its real estate on hardware that figures out the best order in which to execute instructions; the actual processor is only ten percent or so of the chip. On the other hand, GPUs are larger, consume less power (Watts per GFLOP is a big deal in supercomputing), are mostly devoted to processing and can run thousands of threads with ease. The CPU has a relatively modest number of computational cores and can run only a few threads with GFLOP performance but can handle pretty much any task you throw at it; the GPU can process only certain types of problems but completes them at TFLOP speed. The combination is a computational powerhouse.

Here's the results of a sample code that we ran this morning: multiplication of two large matrices. Processing time was ten minutes on a single core, a third of a second with a "naive" CUDA program, and 50 milliseconds with optimized CUDA. That's a performance increase of eight orders of magnitude. Using a $200 video card!

Let it be known that Southern Man's next new PC (to be built sometime this fall, budget depending) will include the best Nvidia CUDA card he can afford.

Wednesday, August 11, 2010

Parallel Computing Workshop, Day 3

The workshop only ran a half-day today (so we were out after lunch) but it was a good one - math packages and benchmarking! Southern Man has fond (and not so fond) memories of the many, many hours in grad school working with LINPACK and was delighted to see that it was still around, abiet by a different name. We downloaded and installed and ran all manner of math packages and used them for performance benchmarks, running different numbers of processors and threads and it was all great fun. Southern Man briefly had the supercomputer working at about 70% of its theoretical maximum performance for a good two minutes and consumed more computing cycles than were used during the entire moon program, just for fun.

For you math geeks, most modern linear-algebra packages are built on BLAS, which is short for Basic Linear Algebra Subprograms and on ATLAS, the Automatically Tuned Linear Algebra System that is sits on top of BLAS and figures out how to make it run really, really fast. Rather than ATLAS, we used a package called "Goto BLAS" which is named not for the notorious unrestricted branch instruction of many high-level languages but for the Japanese scientist who developed it. The most interesting aspect of Mr. Goto's work is that he found that maximum performance was achieved not by optimizing for cache but for the oft-overlooked TLB (translation lookaside buffer) and his carefully hand-optimized version of BLAS generally outperforms ATLAS. And all of these packages are free for the downloading. Isn't that amazing?

Tuesday, August 10, 2010

Parallel Computing Workshop, Day 2

Today we put it together and wrote hybrid MPI / OpenMP programs in the morning - then had a tutorial on debugging parallel code in the afternoon. If you have never worked with a command-line debugger in UNIX, consider yourself lucky. Fortunately, Southern Man's code is naturally bug-free.

Here are three reasons why UNIX is not ready for general consumption:
nohup make FC=gff >& m_o.txt &
mpicc -g e-m-mpi.c -o e-m
tar zxvf GoBL2-1.13.tar.gz
If you understand any of this, welcome to the world of UNIX geekdom.

Monday, August 09, 2010

Parallel Computing Workshop, Day 1

The workshop format is lecture / lab, all in the lab, which suits Southern Man just fine. The workstations are single-monitor but are large enough for comfort. The supercomputer operating system is Red Hat Linux (yes, this world-class machine runs a freeware OS and a bunch of open-source or otherwise-free compilers; the academic-priced Windows 7 licenses on the lab workstations probably cost more than all of the software running on the big iron) so Southern Man has bowed to tradition and is doing all of his editing in vi. Today were tutorials on MPI and OpenMP, the first delivered at a frantic rate (by the workshop coordinator and general master of the supercomputer) and the second at a more leisurely pace by a graduate student. The languages used are Fortran and C, both of which Southern Man learned early in the game but are rarely seen today. Most of the participants are happily forging code in the latter language while the few Fortran holdouts huddle in the back of the room wondering just what sort of hell they have fallen in to. malloc() and pointers and NULL, oh my!

And then Southern Man came home - and sat in front of the computer. What?

Sunday, August 08, 2010

Parallel Computing Workshop, Day 0

For the next eight days Southern Man will be commuting to a nearby state university for a workshop on parallel computing. Tonight was the introductory session and a tour of the machine we'll be using (performance about 30 TFlops) that when new was ranked in the top hundred on the Top 500 list and as of this writing is still hanging near the bottom, and consumes about 2% of the total electrical power used in this college town of 50,000 people. That's right - Southern Man gets to play with a genuine supercomputer all week. This will be a lot of fun. For you geeks, the machine is a cluster of Dell PowerEdge 1950s with eight-core processors, in a double row of racks that sit under a bunch of industrial-strength air conditioners. A surprising fact - top-of-the-line general-purpose GPUs (graphic processing units) are the processors of choice for the newest supercomputers and the latest of such (we're talking cards that retail for about two thousand dollars) would have topped the supercomputer list less than twenty years ago.

That means that in a couple of decades you'll be surfing the 'net (or whatever the 'net evolves into) on machines that will have the performance of today's supercomputers. Or, if you like, the computer you're at now would probably leave the legendary Cray XM-P in the dust. The Cray costs a cool fifteen million dollars in 1985; your modern computer is cheaper by four orders of magnitude. Is that cool or what?