Re: forall and do loop



As if by magic, Walter Spector appeared !

Ian Bush wrote:

As if by magic, Walter Spector appeared !


Not really. MPI is used because of the Sirens call of cheap computing
by "hooking a bunch of PCs together".

I suspect it is at least as often due to the codes encountering the
message passing paradigm on such machines as the IPSC/2.

And the IPSC/2 is a "distributed memory MIMD" computer.


But at the time it certainly wasn't 'the Sirens call of cheap computing
by "hooking a bunch of PCs together"'

In other words, distributed memory
MIMD computing. And MPI happens to work ok on shared memory machines.
However most who have used MPI would admit that it is a huge pain
compared to other forms of shared memory parallelism.


Hmmm, therefore I'm in the minority, as are most people around here.
Personally I suspect it is much more to do with familiarity and what
kind of architectures you have to support. Personally I find OpenMP
more confusing than MPI,

With OpenMP one can often place a few directives in front of a few key
loops and get very nice speedups.

Again experiences matter here. In the codes I develop and maintain
this is not the case, or at least to me it is not obvious how it could
be the case. But then again I'm very much in the distributed memory
world, and I have relatively little experience with OpenMP that just
does not solve the problems I want to solve - I need to scale to hundreds
and nowadays thousands of processors.

With MPI one often has to restructure
entire programs to accomodate the division of data between threads...


processes ...

and also that the latter allows you to run
on a wider range of architectures,

Right. As I said, MPI programs can also run on shared memory systems.
However, on a shared memory system, why copy messages around when you can
simply and directly access the data you need?

Race conditions ?

Thus the message passing
piece introduces overhead that need not be there.

Yes, copying is the bane of message passing, at least for performance,
but excessive synchronisation seems to be the equivalent problem in OpenMP,
at least that is the impression I have.

OK, it may simply be that I misunderstood your emphasis, and anyway the kind
of stuff I develop is rarely running within one shared memory box. It's
just that whenever I hear the contention that shared memory programming,
and in particular OpenMP, is a simpler model than message passing I find
that I can not agree, after all one just has private variables while the
other has both private and public. But that, yet again, is quite likely a
function of my experience and the problems I am trying to solve,

Ian

.


Quantcast