Saturday, December 06, 2008

Productive Week

Despite the fact that I took a sick day on Monday, and felt crappy for much of the remainder of the week, I accomplished a lot at work last week. I successfully compiled and ran a code I'd been trying to get working for three weeks, which felt really good. Also, I did some performance runs on my main project that I'd been meaning to do for a really long time and finally got around to doing. And finally, I started working on implementing some I/O for one of my other projects.

I don't know if I have it working right, but I was pleased that I got a good start on it. This project is particularly challenging because I don't really understand what the code is doing, and it's written in Fortran (not my first choice of programming languages, let me tell you...). What I have to do for them is to convert their checkpointing I/O from MPI-IO to another type of I/O. This is hard because this new type of I/O is completely foreign to me; in fact, I am kind of a guinea pig because I am the first person outside of the developers to try to use it. Luckily the developers live down the hall from me, so I can just talk to them when I run into trouble. The documentation isn't very clear yet (because, as I said, I am a beta tester) and I will have lots of feedback for them once I finally figure out what I'm doing.

But I can see that this new I/O system is extremely powerful and will make people's lives a lot easier. Something else that's bogging me down in converting from MPI-IO is deciphering from the I/O subroutines just what it is that the code developers want to be output and input. An analogy I used yesterday is this: I know that they want to write a capital letter of some sort, but instead of them just saying "I want to write out the letter A," I instead have only clues about how the letter is constructed: "A diagonal line beginning from the bottom and going up and to the right; another diagonal line beginning where that one ends and going down and to the left; and a straight line left-to-right connecting the two at the midline." From that, I follow the instructions and realize that they're writing a capital A. But it is hard to decipher.

Luckily I have a friend and colleague who works in this field and is proficient in Fortran. She's also supposed to be working with me on this project, although she works on different aspects than I do. So I have talked to her and had her help me decipher what they are trying to do. In one case, she was able to crack the code and figure out what the heck was going on, and determined that they were doing the output really inefficiently, kind of like saying "create a diagonal line from the bottom left corner to the midline, then create a diagonal line from the top and center down to the right, to the midline, then create a diagonal line up and to the right from where you ended the first stroke on the midline, then create a straight line left-to-right connecting the two diagonal lines at the midline, and then create a diagonal line from the right end of the midline horizontal line down to the lower right corner." Yes, that makes a capital A, but it's a kind of inefficient way of going about it.

So anyhow, I should be ready to start compiling this new code sometime next week. I'm pretty excited about it, although I know that there will be many errors to fix. But it feels good because I know this work has the potential to really transform their science capabilities.

No comments: