Wednesday, January 12, 2011

Parallel Programming

My first introduction to parallel programming was the summer of 1994 at the Pennsylvania Governor's School for the Sciences. For my final project, we wrote Fortran77 code with an MPI library to parallelize neural network code for image recognition on a Cray T3D supercomputer with 256 processors. It was cute & fun, but neither terribly practical nor useful :-)

Four years ago, I had my second parallel programming experience, writing a recommendation engine for StyleFeeder. This work was in Java utilizing threads to take advantage of multiple cores on a single machine. I got to see performance per core degrade significantly as the number of cores increased and the joy of the Java garbage collector (which would lock-up the entire program for minutes at a time). I've heard that Java GC performance continues to improve...

My most recent experience with parallel programming could be considered the most primitive one (single-threaded python code). But, considering the difficulty of parallel programming, I'm not convinced that it's any worse than the other frameworks. We use twisted to simplify communication between processes and since twisted is an event loop (single thread), programming is greatly simplified---no need to worry about your code being interrupted anywhere.

A colleague of mine just discovered Is Parallel Programming Hard, And, If So, What Can You Do About It? by Paul E. McKenney. The table of contents piques my interest. I hope I'll find time to read it...

No comments:

Post a Comment