More cluster notes

I got seven of my eight machines connected to the  cluster and running the POV program.  With all seven running, I’m able to render the skyvase image in 43 seconds; a 61% savings over the 1:53 that it takes the Pentium 333 (onefish) to do it alone.

All of the machines currently in the cluster are old Dells that we had gathering dust in a closet.  The eighth machine, which isn’t running because I haven’t put a hard drive in it, is a generic clone box.  The fastest machine is the Pentium 333, and the slowest is a Pentium 75.  Two of the machines have 166 MHz Pentiums with MMX.  They outperform the 200 MHz Pentium on the ray trace.

The cluster is a tinkerer’s dream.  It’s hard not to get distracted running benchmarks with every possible combination, and trying different compilation options to optimize performance.  That’s not the point of my exercise, though.  Now that I have the cluster running, it’s time to learn a little about writing programs to take advantage of the multiple processors.  The PVM distribution has some sample programs, which I’m currently studying.  I’m also working on my Beowulf page, on which I’ll post more detailed results.  There are only so many hours in a day, though, so it may be a while before the page is ready.

Refinancing woes

I never thought it’d be so difficult to refinance my mortgage loan.  Debra and I have spent the last 5 years putting large chunks of discretionary income against the mortgage in order to pay it off.  We now owe less than 1/4 of the property’s value and we want to refinance the loan for two reasons:  1) to lower the payment; and 2) get some cash out so that we can finish remodeling.  In any other state I’ve ever lived this wouldn’t be a problem, but Texas?  I’m fit to spit.

The Texas homestead law which until recently (1998 or so) prevented Texans from obtaining home equity loans, still prevents us from doing a cash out refinance using a normal mortgage loan.  Although it’s not required that you file a homestead, everybody recommends it when you buy a house because it protects your house from most liens and judgments.  What they didn’t tell me in 1995 was that filing a homestead also locks up my equity.

There’s a way around the problem, but it’s less than ideal.  A bank here will write me a home equity loan that covers the mortgage plus whatever cash I want to take out, but the interest rate is less than ideal; ranging from 7.25% to slightly above 7.5%.  Mortgage loan rates are 6.5% for fixed rate loans, and as low as 5.25% for adjustable rate loans.  I could refinance the balance as a regular mortgage and then take out a home equity loan for the improvements.  But that would entail two sets of closing costs (!), and the idea of paying $3,000 in closing costs for a loan of less than $50,000 just rubs me the wrong way.

What a mess.

More Linux frustration

I like Linux.  Really.  But, damn, it’s frustrating.  Today I actually had to have one of the other guys at the office show me how to use the rcp command.  I read the man page and even looked up the command in O’Reilly’s Linux in a Nutshell.  What a joke.  I fiddled with command syntax for a half hour before I gave up and just used FTP to copy the freaking file.

The Linux man pages would be a lot more helpful if the people writing them would include some examples.  Sheesh.

Remodeling

Been very busy with the remodel project.  Debra and I finally set a schedule and I’m doing whatever I can to maintain it.  All last week I’d come home from work and build cabinets.  This weekend a friend and I installed the wall cabinets and did a few other things.  This evening I started on the base cabinets.  I haven’t had a lot of time to write in the diary recently.  I’ll be back at it soon.

You’re fat. Who can you sue?

I knew it would happen, but I was kind of hoping I wouldn’t live to see it.  You’re Fat, Who Can You Sue? recaps the Surgeon General’s statements from early December (see my December 19 entry), and then goes on to imply that the food industry should be held at least partially accountable for our nation of fat people.  Although positioned as news, this article falls solidly in “advocacy” territory as far as I’m concerned.  It’s classic propaganda masquerading as balanced reporting.

Suing the food industry to recoup the costs associated with obesity?  Extort money from McDonald’s because you eat too many Big Macs even though you know you shouldn’t?  Steal Kellogg’s blind because parents don’t have the backbone to stand up to their kids and say “No” to the Frosted Flakes?  Why the heck not?  We did it to the tobacco companies.

This article and the whole idea of holding the food industry responsible for our obesity epidemic bother me in so many ways that I don’t know where to start.  Can’t people take responsibility for their own actions instead of trying to find somebody else to blame?  It’s not like anybody at McDonald’s is shoving that Big Mac and fries down anybody’s throat.

I feel a major rant coming on.

Unix ‘find’ command is difficult to use

The Unix find command is the most over-engineered and hard to use utility I’ve ever had the displeasure to need.  Who thought this thing up?  Sure, it’s powerful but that power comes at a cost:  ease of use.  One would think that whoever built the tool would make the interface easy for the most common uses and users.  It’s all well and good to require complicated or non-intuitive syntax for infrequent uses, but the most common use should be simple.  For example, if you want to find a file that you know is somewhere in the directory structure below the current working directory, you have to type:

find . -name filename -print

 Egads.  Sorry, folks, but that’s just wrong.  Heck, even DOS is easier:

dir filename /s

Yes, I know that find can do much more than dir.  It can execute programs, format the output, brush your teeth, and comb your hair if you have any left after trying to decipher the man page:

NAME
find – search for files in a directory hierarchy

SYNOPSIS
find [path…] [expression]

DESCRIPTION
This manual page documents the GNU version of find.  find searches the directory tree rooted at each given file name by evaluating the given expression from left to right, according to the rules of precedence (see section OPERATORS) until the outcome is known (the left hand side is false for and operations, true for or), at which point find moves on to the next file name.

(Remainder of 700 lines removed)

What?  I don’t care about expressions, operator precedence and all that rot, I just want to find a freakin’ file!  I read that first paragraph and decided I’d go look for a simpler program.  I really didn’t want to spend 30 minutes learning the tool just to find a file that I knew was in one of a half dozen places.  Kind of like flying a 747 down to the convenience store.

I’m all for powerful tools for advanced users, but not at the expense of simple tools for the most common uses.  Keep your find.  I’m going to write something usable.

More super computing

Everybody comes up with creative names for their Beowulf clusters.  At Catapult Systems, our computers are named for “things in the sea.”  My computer, for example, is Blowfish.  We have Humpback, Stingray, Mantaray, Grouper, etc.  I was going to call my cluster “School” (i.e. a group of fish), but that name was met with some resistance.  For the moment, I’m calling it “The Fishery.”  The individual computer names were easy enough.  I was going to call them fish1, fish2, etc., but then the president suggested onefish, twofish, redfish, bluefish.  I’ll have to make a trip to the kids section at the local bookstore for the Dr. Seuss classic so I can get more names.

Right now, I only have two machines on the cluster.  onefish is a 333 MHz Pentium 2 with 128 MB of RAM.  twofish is a 200 MHz Pentium with 64 MB of RAM.  Both are running SuSE Linux 7.0 with pretty much identical configurations (SuSE minimum system to which I’ve added a few networking services and some development tools).  Below are the results from some benchmark tests I ran last night.  All times are to render the skyvase.pov using this command line:

./pvmpov +iskyvase.pov +h480 +w640 +FT +v1 -x -d +a0.300 -q9 -mv2.0 -b1000 -nw32 -nh32 -nt4 -L/home/research/pvmpov3_1g_2/povray31/include

ComputerTime
onefish1:53
twofish4:52
cluster (onefish host)1:24
cluster (twofish host)1:24

So the addition of twofish to the cluster drops the time from 1:53 to 1:24, a difference of 29 seconds, or about 25 percent.  Not bad.  It’ll be interesting to see what happens as I add the four 166 machines.

Indexing web diaries

My good friend Jeff Duntemann, former editor of PC Techniques and Visual Developer Magazine, has created a web page on which he is re-publishing his editorials and articles from the magazines, and also his VDM Diary entries from 1998 and 1999.  So far he has posted all of the Diary entries, and a handful of editorials.

Jeff has also begun an index of his personal web diary, something I’ve considered doing as well, but haven’t wanted badly enough to actually go through the work of creating the darned thing.  But perhaps it’s time.  As Jeff points out, it becomes increasingly difficult to remember what you’ve written about and when.  He uses Google to search his online diary.  I drop into a command prompt and run grep on the source HTML pages.  Both methods are silly.  Time to create an index.

Jeff also points out that making the index entries actually link to the diary pages is problematic because a diary entry’s link changes a few months after it’s written.  Having to update an index entry after it’s created is unacceptable—too much opportunity for error.  I find it difficult enough moving a month’s worth of entries onto a new page every month.  There’s no way I’d try to update an index.  Time for some experimenting…

My own super computer

The super computer is running.  This evening, with the help of the company’s CTO, I got the first two machines configured and cooperating and rendered the skyvase benchmark image using the parallel version of the Persistence of Vision Raytracer (Pov-ray).  As I said on Wednesday, I’m not setting any speed records.  It took these two machines a minute and 24 seconds to render the image.  I was in a hurry so I didn’t run the test with the 333 alone to get a baseline for comparison.  Maybe I’ll do that over the weekend.  I’ve configured the cluster so that I can VPN into the company network and then telnet to the host machine.  I don’t have to be at the office in order to play with my cluster.

I couldn’t have done things this quickly without the information found on the Pondermatic page.  The step-by-step instructions, although somewhat dated and not perfect, saved me a lot of time getting and installing PVM and Pov-ray.  I’m in the process of putting together a single archive that contains everything required to build the raytracer.  Not only will this make it easier for me to install on my six remaining machines, but perhaps it’ll help somebody else get things up and running quickly.  When I have it all together I’ll post it on my downloads page.  Or perhaps I’ll create a Beowulf page of my own. 

An embarrassing mistake

I’ve been programming computers long enough that I shouldn’t have written the bug that one of my clients found today.  It’s embarrassing not only because my client saw it, but also because the mistakes that caused the bug are things that I’ve done before and learned from.  But then I got in a hurry.

I made three mistakes:

  1. I used cut-and-paste to duplicate some code.
  2. I used negative logic in an if-then-else statement.
  3. It was “just a little change,” so I didn’t test the program thoroughly after making the change.

Of the three, the last is the dumbest and most embarrassing.  When my client first told me of the error I couldn’t believe it.  How could I have made such an amateurish mistake?  Cut-and-paste in itself isn’t a sin, but all too often you end up duplicating code and creating a maintenance nightmare because some time down the road you’ll end up having to make almost identical changes to multiple pieces of almost identical code.  And the last…negative logic?  Almost always a bad idea.  For example, you can write:

if some condition is true then
  do this
else
  do that

Simple, yes?  It’s also perfectly valid to write this:

if not (some condition is true) then
  do that
else
  do this

Don’t do it!  When you come back to that code in maintenance mode six months later, you’ll likely overlook the “not” and end up coding some of “this” where “that” is supposed to go.  Simple rule:  if there’s an else, use positive logic in the conditional.

As I said, I learned all of these lessons a long time ago.  I guess it just shows that no matter how long you’ve been doing something, you have to pay attention or you get sloppy.  Sheesh.