Over at Linux Magazine, they have a multi-core cookbook. This is a site dedicated to pragmatic HPC topics … more than just HPC, as everyone has to deal with multi-core these days. The question is how to program them.
I wrote an article (well first of three, two written and submitted, third one I am still working on) on how to use OpenMP. This is pragmatic in that it show you how to go from a bare linux machine to openMP enabled in a short period of time. I don’t think the editor liked my hat tip to Rachel Ray’s 30 minute meals, but thats sort of the intention. [BTW: Rachel has a blog … good for the foodies out there !]
In her programs, she starts out with a simple goal, and shows you all the steps in the process. Granted it is cooking and not programming, but the approach are the same. Start out simple, and proceed in easy steps. Thats what I do in this article. Taking you from a machine with a gcc compiler through getting, building, installing an OpenMP capable compiler, and then testing it, and using it with 3 codes. 1 trivial (hello world), 1 simple (Riemann Zeta Function), 1 more complex (matrix multiplication).
This is not to be the be-all/end-all of OpenMP articles, but the idea is to make it simple for people to play with and use. OpenMP, and threaded programming using OpenMP is actually not hard at all. While there is a bit of a, well, vocal set of people advocating one or another solution to these problems, we avoid all of this and focus upon the pragmatic issues. It is a very good technology, and not hard to use at all.
Later keep an eye out for the MPI article.
And please, do pick up a subscription to Linux Magazine while you are at it, and visit their site and their advertisers. Linux Magazine is one of the few pragmatic sites and magazines out there … they focus on real issues relative to HPC, what end users need to worry about. Sadly there are few others that do this (ClusterMonkey, this blog, a few others … and please leave good ones in the comments below).
Disclosure: I was (and will be, I hope) paid for this and previous articles, and hopefully future articles. If they are good or they are terrible, please do let us know, at their site, here … somewhere where we can see.
Windows users: You can follow along with this using Cygwin. I have tried getting Microsoft to pull Cygwin in, and make it a first class/supported/blessed environment for windows. To date I don’t think they grasped how important this is.