Monday, November 24, 2008

building VTK on (intel) Mac OS 10.5

Based on [directions found here](https://svn.enthought.com/enthought/wiki/IntelMacPython25), I created a working build of VTK with Python bindings.

First, download the source from CVS, [here](http://www.vtk.org/get-software.php). You will need to make sure you have a recent version of [CMake](http://www.cmake.org/) installed as well. Then, go into the VTK directory and type:

mkdir build; cd build
ccmake ..

Press c to do the initial configuration. Set:

BUILD_SHARED_LIBS=ON
VTK_WRAP_PYTHON=ON

Press c again. Press t to look at the advanced options. This is where my directions diverge slightly from the enthought directions. I used the system python, which ccmake seems to recognize right away, so I only changed:

PYTHON_LIBRARY=-framework Python

Press c, then press g to generate the files. Then

make
make install

The make can take *forever*, so be patient.

One final thing to get vtk working with python is to go into the Build/Wrapping/Python directory and do a python build and install:

cd Wrapping/Python
python setup.py build
sudo python setup.py install

Done. Now you should be able to import vtk in python.

Friday, October 17, 2008

Google earth animations of various tidal constituents.

For my intro to Oceanography class, I made animations of the barotropic tide sea surface height. You can find them [here](http://pong.tamu.edu/~rob/google_earth_tides). Trust me, they are _very_ slick.

Thursday, August 14, 2008

Removing non-english localizations on mac os x

I found this command on macupdate:

sudo find / -not -name English.lproj -name "*.lproj" -exec rm -r {} \;

and ran it. It seems to have saved about 3 Gb from the Application directory, and about 5 GB total.

Thursday, June 12, 2008

Spaces and Terminal on Mac OS X Leopard 10.5.3

In a [recent post](http://daringfireball.net/2008/05/spaces) on [Daring Fireball](http://daringfireball.net/), John Gruber describes how some new small changes in Spaces in Mac OS 10.5.3 have made it usable.

I use the terminal quite a bit, and I have noticed this small tip. If you use ⌘-` you will cycle through the windows within one space/screen (i.e., you won't switch virtual screens). ⌘-→ or ⌘-← will cycle through _all_ of the terminal windows, even on other spaces screens.

Tuesday, May 6, 2008

Delayed login for ssh

I was suffering delays logging in between the head node and cluster nodes. I tried all the usual tricks -- mainly editing /etc/hosts. I tracked the problem down with

ssh -vvv c0-0

which showed that the delay was in xauth. Fine. What I needed to do was turn on ForwardX11Trusted, it was the *Trusted* part that was missing. This can be done with ssh -Y, or by editing /etc/ssh/ssh_config and adding a line

ForwardX11Trusted yes

This is needed to get tools like cluster-fork to work with the Trusted forwarding.

Sunday, April 27, 2008

Interview with Donald Knuth

I've seen [this interview with Donald Knuth](http://www.informit.com/articles/article.aspx?p=1193856) linked a few times, and I also found it very interesting. In particular, I found it interesting that he:

- uses EMACS/TeX -- after writing everything by hand.
- does not particularly care for unit tests
- is a big fan of (i.e., invented) [Literate programming](http://www.literateprogramming.com/)
- is not a big fan of multicore processing (he does note, however, that physics and biology as exceptions where multicore programming makes sense..)

I have to admit, that I am on his side in terms of the unit testing and literate programming issues. I find that my biggest chalange in programming is not getting the code right (i.e., unit tests), but rather designing the way the function/class will behave for the user. Writing down what you expect the program to do in different cases (i.e., the API documentation) seems to be the best way to write a good, solid program.

Monday, April 14, 2008

NetCDF build notes for Mac OS 10.5 with ifort and gfortran

I have recently written down the steps I needed to build netcdf3, hdf5, and netcdf4 on my Mac using both ifort and [gfortran](http://r.research.att.com/tools/). Details follow