Monday, September 26, 2011

My Future Engineer

Vinny has always loved things that go round and round -- wheels, windmills, you name it.  He was terrified of the clothes washer for a while, because it went "boom boom boom" when the load was unbalanced and the noise scared him, but he has since overcome his fear and added washers to the list of fascinating things that go round and round.

He is so interested in washers that he has lately spent the majority of his computer time watching washer repair videos, which he can now quote word-for-word.  (If there's something wrong with your washer, ask him what to do before you call a repairperson!)  He always wants to help load and run the clothes washer, which is great except that while he is also excited to operate the dryer, he's much less interested in folding and putting away the clothes.

He also wants to play clothes washer.  How do you play clothes washer, you may be asking?  Well, he turns around and around, saying "ratta ratta ratta" as if he is the agitator in the center of the basket of a top-loading washer.

Yesterday he declared that he wanted to buy a washing machine and install it in the bathroom so that he can play with it.  If it weren't for the space problems, I would be happy to buy him a cheap used one to tinker with!  Instead, Jeff promised him that if we ever needed to get a new washer, he could help pick it out.

Another obsession of his is fans.  He has enjoyed watching videos of fans on YouTube for years and years.  There are people who have fan collections and post videos of them.  There are videos by kids and adults alike.  Vinny was especially inspired by the children with fan collections and began a collection of his own.  He spends the money he gets for good behavior on new fans.  And once, when he did something we were especially proud of, Jeff took him to Kmart and let him pick any toy he wanted.  What did he select?  A box fan, one with two knobs!

They have show and tell at his school every Monday and Friday, and every time, he has brought a different fan to share.  Some of the kids are not interested in his fans, but other ones have developed an interest in fans thanks to him.  In fact, we went to one of his classmates' birthday party a few weeks ago and the birthday girl had told her mother that Vinny had too many fans and should giver her one of his fans for her birthday.  We gave her a brand-new fan of her own and it was like the best gift ever.

For Vinny's birthday, Jeff found an antique desk fan on eBay.  We know he will love it.  If only there were a small washer that we could get him (beyond the small pink toy we bought to try to help him overcome his fear of washers).

Sunday, September 25, 2011

Computational Conversations

(based on actual conversations I have had with domain scientists...)

Solving a scientific problem?  I can help!

Is it a partial differential equation?  I know something about that.  I've solved Schrödinger's equation in many forms.  Advection and diffusion I know well.  Choose your finiteness: finite elements, finite differences, or finite volumes?  Each one has its own advantages and pitfalls.

Linear algebra?  Use an optimized BLAS library, not the reference library!  Our vendor has a group of applied mathematicians who developed these math libraries just for you.  Don't let all their effort go to waste!  Eigenvalues -- you don't need to orthogonalize at every step, just every so often.  Maybe it will require a few more iterations, but the iterations will be so much cheaper...

Optimization?  Yes!  Finally something I am an expert in!  Okay, so what type of problem are you solving?  Is it convex?  Is the objective function cheap to evaluate?  How many parameters?  Is it a mixed-integer program?  Actually, I think your problem could be reformulated as a combinatorial optimization problem and we could try an evolutionary algorithm...

Oh, you meant code optimization.  Yes, I can do that too.  See these loops?  Since it's Fortran, we need to reorder the loops so that the array is accessed by its first index in the innermost loop, not its second.  See, we just got a 4x performance boost just by swapping these indices.  Okay, let's change this array to a function, because it is easily calculated and the function can be inlined whereas that memory lookup can't.  And let's eliminate these "if" statements by dividing this loop into two parts.

Your job fails at 120,000 MPI processes, but not below that?  What happens when it fails?  How long does it take to get to the point of failure?  What is the code doing when it fails?  Does it always happen in the same place?  Let me ask my sysadmin colleague to look in the top-secret log files that only they can view...

Does this computation depend on that one, or can it be done in any order?  Is there any reason to keep this data after initialization?  What if we used this framework?  Asynchronously spawning new tasks would implicitly load balance this algorithm.  Your algorithm is not scalable.  The synchronizing you do will be a huge bottleneck as you scale up.  It may work okay now, but at the petascale or beyond there will be scalability issues coming out of the woodwork, things even beyond this synchronization issue.  Trust me, I have seen this happen even in my own codes.  Let my pain be your gain!

I may not be a scientist in your field, but I know a lot of things that can help you.  I've boosted the performance of codes by a factor of two with a single keystroke.  I may not have seen your problem before, but I've seen something like it.

Saturday, September 24, 2011

Radio Silence

Hello world!

I have found that when I am under a lot of stress, I tend to just retreat inside myself.  I don't want to talk about the stress and I can't think of anything else to talk about, so I just get quiet.

The past two months have been that way for me.  There has been a lot of stress.  I have retreated and remained silent.

The stress is still there but I am trying to think about other things to talk about.  Please bear with me; my creative juices do not flow well under these circumstances.