Climate Model on a Mac: Snow Leopard

Snow Leopard, the latest OS offering from Apple, promised to be both 64-bit and faster. The question is whether Apple delivered those promises and whether those improvements impact modeling.

First, I got Snow Leopard booting to the 64-bit Snow Leopard kernal. There are instructions how to do this out there on the web (note that you don't have to bother if your machine is 64-Bit and you're running the server version).

More info below the fold..

For all of the compiling below, the target was 64-bit.

Next, I upgraded my compiler. I was using PGI 7, now I'm using PGI 9. Changing the compiler required updating all the supporting code.

Netcdf was next on the list. In this case, NetCDF was somehow incompatible with PGI 9 or Snow Leopard in one respect. fstat is a command to discover info about files. In this case, fstat was always returning a file size of 0 causing NetCDF to assume the file was not a valid netcdf file (note: this is netcdf 4 with no HDF support). I forced the compiler to use fstat64 and all was well…

Next came MPICH. I decided to drop MPICH 1 in favor of trying MPICH2. This worked fairly well with no major complications.

Finally, I recompiled the climate model, which also appeared to have little trouble.

So, was it faster??

Here is the preliminary result:

Before Snow Leopard:

32-bit compile, MPICH 1, PGI 7
12-13 model years per wall-clock day

64-bit compile, MPICH 2, PGI 9
18-19 model years per wall-clock day

This is a significant speed increase (somewhere around 50%), if it holds. If run constantly, this means an increase potential of over 2500 extra model years in a calendar year!

It's unclear, however, whether the performance is due to just 64-Bit, Snow Leopard, PGI, or MPICH. Regardless of what's causing the improvement, I'll certainly take it!

Leave a Reply