MPI/Beowulf vs. SM Programming/OpenMP
Mattson, Timothy G
timothy.g.mattson at intel.com
Fri Mar 23 14:02:57 PST 2001
This is a very complex issue. For any generalization I make, you can find
conflicting cases. So take all of the following with a grain of salt.
First, here are some advantages of OpenMP:
OpenMP is a much easier way to write parallel programs than MPI. It is much
smaller than MPI so its much easier to learn.
OpenMP encourages the writing of parallel programs that are semantically
consistent with their serial coutnerparts. In fact, "encourage" is too weak
of a term -- its actually a bit tricky to write OpenMP programs that are not
sequentially consistent. This is very imporatnt to software developers who
need to support both parallel and sequential hardawre.
Finally, in many cases, you can use OpenMP to add parallelism incrementally.
You start with a serial code, and bit by bit add parallelism until you
achieve the desired performance. I'm not saying this is impossible with
MPI, but its not a well supported mode of programming in the MPI space.
... But there is a downside...
OpenMP is less general than MPI. I've been writting parallel programs for
almost 2 decades and I can honestly say that I've only encountered a few
algorithms I can't express with MPI. It can get horrendously difficult, but
MPI is quite general. OpenMP, on the other hand, is geared toward "loop
splitting" or loosely synchronous SPMD algorithms. A general MPMD algorithm
with lots of assynchronous events would be hard to do with OpenMP.
(actually, it can be hard with MPIch as well, but then you can go with
MPI-LAM or PVM).
MPI also maps onto a wider range of hardware than OpenMP. Yes, there are
some attempts to map OpenMP onto distributed memory systems, but this will
only work for a subset of OpenMP applications. On the other hand, MPI does
quite well on shared memory systems.
This last point is very important. For most people on this list --
cluseters are the parallel architecture of choice. OpenMP works well on SMP
nodes within the cluster, but if you want to parallelize jobs across the
cluster, MPI is a much better option than OpenMP.
So you need to look at your application to figure out what sort of parallel
algorithms you'll be using, and you need to understand your target hardware
to make sure the code will run where you need it to. With that information
in hand, you can decide whether to go with OpenMP or MPI. If its clusters
you want to play with, chance are MPI will better suit you.
There is much more to say, but that will hopefully be enough to get you
From: Chris Richard Adams [mailto:chrisa at aspatech.com.br]
Sent: Friday, March 23, 2001 6:07 AM
To: Beowulf (E-mail)
Subject: MPI/Beowulf vs. SM Programming/OpenMP
I've been coding for almost 5 years in a mix of C, Java and now Python.
I am now focused on learning more about parallel programming for
applications/algorithms related to genetic sequencial analysis within
databases - bioinformatics. The last month or so I've been studying
about different methods that exist and I'm getting confused about where
I was convinced after reading material on Beowulf that it was the way to
go, but I've recently stumbled upon the OpenMP site and read more about
shared memory techniques. It seems to me for the type of applications
I'm focusing on...this is a much better approach because I don't have to
spend so much time learning MPI and all the communications. I can just
focus on learning the algorthms (this is their big sell point anyway).
1.) Is this really true?
2.) Can anyone point out how Beowulf/MPI is the better solution and
3.) Is their room for both Beowulf/MPI and Shared-Mem tech. in the
I would really appreciate hearing your feedback.
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit
More information about the Beowulf