On Fri, 20 Sep 2002, vidya kotamraju wrote:
> I have written a DO loop in FORTRAN(making use of MPI) that calculates
> the sum of N given numbers(calculates the sum of 1 to N numbers.). i hv
> given N = 5 million and ran the program. I am making use of 8
> uniprocessor homogeneous Linux machines to test and find the optimal
> output.. So the test involves :the number of machines being used ranging
> from 1 to 8 and the number of processes ranging from 2 to 80.
Have a look at a post that I sent recently talking about the fundamentals
of parallel computing:
http://www.lam-mpi.org/MailArchives/lam/msg04857.php
> I have come to the conclusion that the least time taken is when the
> number of processes is equal to the number of machines ie processors
> being used.(and time taken isthe least when maximum number of machines
> are being used)
That will not always be true. For most parallel programs and parallel
hardware / software configurations, there will be a crossover point where
adding more processors will actually *increase* the overall runtime --
probably due to overhead. See the discussion in my previous post.
> But i was assuming that as the number of processes increase,the time
> taken for the calculation reduces.(cause LAM allows one to spawn several
> processes on one machine)..Why doesnt this happen ? Does it mean that
> whatever DO loop i might run,i will get the best output when the number
> of processes = number of uniprocessor machines ?
Consider that you still only have one CPU on each machine. Say you have a
compute-intensive program that, if you launch it on a machine by itself,
takes time X. If you simultaneously launch two copies of this program on
a single CPU machine, will they really still both complete in X? No. At
best, they'll finish in 2X -- because they both have to share the same
CPU. Try it with non-parallel programs, and you'll see.
> What happens in case of multiprocessors ? Can someone clarify this ? I
> need a reply asap as i hv a submission regarding the same.
I think you can extrapolate from my above statements -- I don't want to
answer *all* of your homework questions for you. ;-)
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
_______________________________________________
This list is archived at http://www.lam-mpi.org/MailArchives/lam/
|