Category Archives: Programming

Compilers Suck!

[8:46] brbarret@traal:ttyp0 XL% cat xlsucks.cc 
#include <memory>

int
main(int argc, char *argv[])
{
  return 0;
}
[8:46] brbarret@traal:ttyp0 XL% mkdir memory
[8:46] brbarret@traal:ttyp0 XL% xlc++ xlsucks.cc -o xlsucks
[8:46] brbarret@traal:ttyp0 XL% xlc++ -I. xlsucks.cc -o xlsucks
1540-0820 (S) Unable to read the file ./memory. Operation not permitted.
"./memory", line 1.0: 1540-0809 (W) The source file is empty.
[8:46] brbarret@traal:ttyp0 XL%

Yes, it’s opening a directory for reading, thinking it’s a file. Someone forgot the S_IFDIR check when they were stat()ing around looking for the header. This came up because Open MPI has a directory $(top_srcdir)/opal/memory/ and includes a global CFLAGS that includes -I$(top_srcdir)/opal and memory is a header file in the GNU C++ standard library that is included just about everywhere else, and instead of finding that memory, it was finding our directory. This took me a while to track down…

You keep using that word. I do not think it means what you think it means.

Objective C is weird

I’ve been spending some time working on making Open MPI utilize Apple’s XGrid technology for process startup and the like. In the end, the difficult parts turned out to be the fact that the XGrid framework is not particularily well documented and that I don’t know Objective C. That’s right – The XGrid interface is in Objective C, so I had to write the xgrid process starter component for Open MPI in Objective C. Which has the nice side-effect of us now being able to say that we have a component written in a language other than C (if only just barely – ObjC is just barely not C). Anyway, very interesting stuff, and I got to learn all about the NSRunLoop. Yippie.

Caps Lock Goodness

In Tiger, Apple added the ability to swap caps lock and cntl keys from the Keyboard and Mouse preferences pane. There’s a button under keyboard labeled Modifier Keys – you can set what modifier is set by which key. Worked like a champ on on my TiBook. As with uControl, however, the light for the caps lock key would still alter for every press of the caps lock key. Not a big deal, but kind of annoying. On Laura’s brand new, shiny AlBook, the light only switches when the key mapped as the caps lock key changes (which doesn’t have to be the caps key, obviously). Finally, Apple fixed the annoying caps lock key on their Power Books.

Somehow “I told you so” just doesn’t quite say it

Welcome back, e-mail fans

I’m 99.98% sure that the e-mail my blog thing is working again. I suppose we’re about to find out.

The pain of software

Am spending today working on merging some fairly significant chunks of code from one branch of OMPI to the trunk. Unfortunately, it’s not going super well, as we kind of made some silly mistakes in how long we let the divergence go (we knew all along that the code would have to be merged). Ah well, such is life on a project without any real project management. Interesting, but sometimes a bit on the painful side. At least it usually goes fast :). I was actually surprised – the merge (while not complete) was not as painful as I originally thought. I managed to get the tree compiling in under three hours. I think there are still some artifacts causing problems, but not as painful as I thought they might have been. I’m hoping a couple of hours with the debugger will be enough to figure out what is going on. And if that fails, I’ll have to ask Tim and Jeff for some debugging help. Ah well, what can you do?

Welcome to Durham

I’ve been in Durham since last Sunday (leaving this evening), hanging out with Laura. Working from Durham seems to go pretty well – some minor slowdowns, but nothing major. All in all, I still managed to have a fairly productive week. Even managed to get some scale tests running out on odin and thought some about the EuroPVM/MPI paper. Need to get the trunk (see above) settled down so that I can start writing up the framework for the data for that paper. Durham’s warmer than B’ton – there were three or four days I really wished I had my bike out here. Of course, that would probably end up with me getting run over by a redneck in his truck…. But I suppose NC is no worse than the area around B’ton in that regard, so I shouldn’t complain too much.

INIlib lives again

After 3 years of complete neglect, I finally got around to fixing a bunch of outstanding bugs in INIlib. Surprising part was that I actually have users. And they downloaded and tried the new beta. Very frightening to have users of your software. I might start developing it again, if only to add a couple of the features in the feature request tracker. Or maybe not – we’ll have to see. The documentation could really stand to be updated, as it has some rough spots with respect to the code (nothing critical, just doesn’t track the lastest code changes as well as it could).

Much MPI Goodness

LAM, LAM, LAM

LAM 7.1 escaped from the developers this morning. New in LAM 7.1 is the ability to have dynamic shared objects for SSI components, an InfiniBand RPI, support for the SLURM batch scheduler, and much more. Basically, much goodness all in all. If you use LAM, you should download it right now. Onward with world domination!

Open MPI

A freak meeting of minds over dinner occured about a year ago between a bunch of independent MPI developers. The result was the decision to combine forces and produce the one MPI to bind them all. After numerous discussions, the name Open MPI was forged, and a web page was created. The web page is, of course, http://www.open-mpi.org/.

That’s a strange place for a horn…

Why do I always end up playing with linkers?

This week is apparently the attack of the satanic linkers week. In both LAM 7.1 and the ISI logger project, I’m fighting with linkers to make them bend to my will. Which is probably my first mistake – I should just give up and let them bend me to their will. But I’m stubborn and believe that I’m smarter than your average piece of code, so on we fight.

On the LAM front, I’m trying to figure out why I can’t seem to intercept calls to deallocate_pages in the OS X libc memory management code. deallocate_pages is a call that should happen right before the call to vm_deallocatepages, which is the OS X equiv to sbrk() with a negative number for the second argument. Why do we need to do this, you might ask? Well, using networks like IB or Myrinet requires pinning pages in memory so that they are not moved around while a DMA transfer is going on. Pinning pages is really expensive, so you don’t unpin unless you really need to. So the bottom line is that you need to know when memory has been free()ed by the system, so that you don’t return memory to the system while it is still pinned. On most Unix systems, you just use ptmalloc and intercept all the calls to malloc(), free(), and friends. On OSX , it is a bit more complicated, since there is this crazy two-level namespace thing going on. So instead, we try to hook into the lowest level of things. Still not sure if this is going to work – need to spend some more time on the issue….

On the Logger front, it’s much simpler. We seem to be encoding the wrong path in an rpath somewhere, so we aren’t finding shared libraries at runtime in certain circumstances. Obviously, this isn’t a good thing, but is probably just a shell scripting error or something similar, rather than a major misunderstanding as to how the platform’s linker actually works. So all is probably going to be ok on this front in the next couple of days. At least, I hope so.

San Fran is a weird place

Went up to the bay area this weekend for the Bay to Breakers 12K race. Very entertaining race. For starters, there was a definite lack of port-a-potties in the starting area, yet there were many along the way. Follow that up with a group of guys who carried a fully operational bar (including the bartender and multiple kegs) the entire 12K and you kind of get the picture. Wandered around San Fran on Saturday with Rachel, which was entertaining – we only got lost 3 or 4 times… Which isn’t too bad, all things considered. Drove back Monday, which was more eventful than usual. A rock decided to cause significant damage to my windshield, so that kinda sucks.

Stupid Computers

Something evil has happened today such that I don’t seem to have an account on many of the OSL machines any more. This is probably going to take an afternoon to get worked out… Blah.

Of course we’re going to try to blow it up…

Version Control is Fun

Worked with Jeff a bit today on moving the LAM CVS trees over to SubVersion. To be honest, Jeff did all the hard stuff. I just suggested a couple minor changes. We pretty much ignored all the problems with third party packages for the old LAM releases. The EOL is so close that it wasn’t worth the effort. I spent some time looking at how to import ROMIO for LAM 10, and it looks like it will all be very much doable, it will just take a bit more effort than before. At least they provide some nice scripts for working with external packages. More to come on the subject, I’m sure.

Live from San Diego

I surviced another tour of duty down in San Diego. I don’t think I’ve ever played as many games of solitaire in a 5 day period before in my life. It was pretty much pointless for me to be there at 5:45 in the morning every day, and I’m not entirely sure why I had to do so. Of course, this week, when I could actually be useful, well, I’ll be at ISI trying to get other things done. Makes sense, right?

I ended up rewriting huge portions of both the build scripts and the logger code base during the week, as an attempt to avoid death by boredom. I think that I’m fairly happy with the changes, other than the fact that I still haven’t unified quite enough code in the logger base to make me happy – we still have too many different ways of doing options parsing and control and all that. Next week, I’m going to try to finish the last of the options parsing fixes – everything should use the GNU libc argp library (there is a standalone package under the LGPL, thankfully). Maybe I’ll be able to unify the logger_options and loggerEnv libraries before the week is out.


Be a beacon

Photos

Started playing with Gallery as a replacement for MiG as the picture viewing thing of choice on my web page. Still not exactly sure how much I like it, but it looks like it has promise. Still have to hack on it a little bit to make it work with the rest of my web page layout, but that should be solveable soon. The nice thing is that it has very clean paths using mod_rewrite, something that I could never really get working with MiG. Even better, though, is that it has a plugin with iPhoto so that I can update my web page from iPhoto. Or I can just have a tarball to upload or about a million other ways that don’t require the hand stepping that the MiG process did. Anyway, it looks very promising. Should finish making the switch shortly.

Failling Apart

Mesh router meeting did not go so well today. We seem to be having some data movement issues that need to be resolved. Couldn’t even connect two sims and a primary. More coming tomorrow.

That’s not a theory of physics pretty much disproved by Wyle E. Coyote?

I’ve been writing code this week. It’s great! I should do it more often. Did some work on LAM so that it can run on very, very large clusters. There should be some great fun at SC this year (assuming I’m going, of course). Design work for the logger code is going well. I hope to have something working well by the end of this week.

And I leave you with these inspirational words:

“The process by which an American stamp enters into circulation begins with the American Public”
“Well, that’s always a mistake”

Fish are our friends, not food

Football

11 days. Woo hoo.

MPI

Repeat after me: “I will always match datatypes when sending messages. I will not send 4 MPI_CHARs and receive 1 MPI_INT. I am fully aware that this will completely hose my application if the friendly MPI implementation happens to be helping me out in running in heterogeneous environments”. Ah well, it only wasted 2 hours of my life.

I finally got the mesh routers working. Took much longer than it should have, but oh well. Tonight will try to get code compiled on USC’s cluster. Tomorrow, collect some data. And life should be good. Or something like that.