Tuesday, July 14, 2009

The New Mac

Where have you been all of this time, Intel processor for the Mac? I love you!

I have a computer code that I use as a big part of my research. It solves how electrically charged particle move through a region of near-Earth space. It’s a code that others began almost 2 decades ago and I am now the keeper of this code (let me clarify: I am the keeper of the version of this code at my university, as there are other versions out there as well, with different keepers).

It’s solving a time-dependent set of equations, so a typical simulation requires initial conditions for the start-up and then boundary conditions for the time interval of interest. I like to look at storm conditions in near-Earth space, so a typical simulation is usually a day-long interval, and often times I would run a 4-day interval, to capture the quiet time ahead and behind the storm interval.

When I got the code 10 years ago, it ran about 10 times slower than real time. Yes: to do a single storm simulation, I had to wait over a week for the result, sometimes a month. This slowly improved over the years as I kept upgrading my computer. I recently replaced a G5 Mac with a new Intel-based Mac. On my old Mac desktop computer, it used to run about 3 times as fast as real time. This was a big improvement over the previous machine, as it was the first time it passed real time speed barrier. On the Intel machine, it’s now 12 times faster than real time. Not only that, but my new Mac is a dual-quadcore machine, with 8 CPUs inside of it. The timing numbers above are for serial processing jobs. My old Mac was a dual processor machine, and I didn’t like to run it in parallel mode because then I couldn’t much else with the machine until the run was done. This is no longer a limitation. Spreading the run over 4 processors (leaving plenty of processing power for other things) means that the code is now 50 times faster than real time. I can do a 4-day simulation in 2 hours. Oof-da!

For a long while I had been hesitating with code development because it was so painful to wait for results. Not anymore. I can now dive back into it. Now, I just have to remember FORTRAN again. Oh yeah, and find time to actually program.

No comments:

Post a Comment