Cisco Blogs


Cisco Blog > High Performance Computing Networking

Probabiliy of correctness

July 12, 2010 at 12:00 pm PST

Pop quiz, hotshot: what happens if you run this program with 32 processes on your favorite parallel resource?  (copy-n-pasting this code to compile and run it yourself is CHEATING!)

  int buf, rank = MPI::COMM_WORLD.Get_rank();
  if (0 == rank) {
    for (int i = 1; i < MPI::COMM_WORLD.Get_size(); ++i) {
      MPI_Status status;
      MPI_Recv(&buf, 1, MPI_INT, MPI_ANY_SOURCE, 123,
               MPI_COMM_WORLD, &status);
      buf = i * 2;
      MPI_Send(&buf, 1, MPI_INT, status.MPI_SOURCE, 123,
               MPI_COMM_WORLD);
    }
  } else {
    MPI_Send(&rank, 1, MPI_INT, 0, 123, MPI_COMM_WORLD);
    MPI_Recv(&buf, 1, MPI::INT, MPI_ANY_SOURCE, 123,
             MPI_COMM_WORLD, MPI_STATUS_IGNORE);
  }

The mix of C and C++ is for brevity here on the blog.  But yea; it does compile and is a valid MPI application.

Got your answer?

Read More »

Seen in the blogosphere (part deux)

July 6, 2010 at 12:00 pm PST

In my prior blog entry, I mentioned two blog articles of interest that I had read recently, and then proceeded to comment on one of them.  I’ll finally finish up and comment on the other one: Blowing the Doors of HPC Speed-up Numbers, written by Head Monkey Douglas Eadline (disclaimer: I used to write the MPI Mechanic column and Doug would edit it before it hit the shelves in the now-defunct Cluster World magazine).

Read More »

Seen in the blogosphere…

June 30, 2010 at 12:00 pm PST

I actively read a bunch of HPC-related news feeds and blogs out there in the interwebs (how did I live before my RSS reader?).  Two articles recently caught my attention:

Don’t get me wrong; I read lots of fine articles and blog entries.  But these two seemed to resonate fairly well with some of the messages I’ve tried to convey here in my own blog.

Read More »

Frequent flyer

June 22, 2010 at 12:00 pm PST

A colleague recently told me that he took two round trip flights from California to Florida for the sole purpose of nudging him into the next frequent flyer status level (over 100,000 miles in a year, in his case).  “At the time, I questioned the wisdom waking up early enough to get on a plane at 6am on a Saturday morning,” he said.  “But I’ve been automatically upgraded to first class ever since.  So — good decision.”  Even more surprising is that, by random chance, he found another guy who took both of the same flights for exactly the same reason.

Parallel programming is kinda like that.  If you’re just venturing into a concurrent programming world, it seems weird, awkward, and possibly even counter-intuitive.  But once you learn how to do it right, the benefits are continual.  And you’ll find that others are doing the same thing.

Read More »

iBarrier

June 19, 2010 at 12:00 pm PST

Do you know what an iBarrier is?

  1. A joke in the MPI Forum
  2. A useful synchronization technique
  3. Waiting in line at the Apple store for an iPhone

For a long time, the answer was #1 — we jokingly referred to “non-blocking barriers” in the same breath as MPI_SEND_ANY and MPI_ESP(do_what_i_meant_not_what_i_coded).  But recently, the answer has become #2.

Read More »