Note that this is the list for supporting LAM/MPI, not MPICH. If you have
MPICH-specific questions (and at least part of your questions below are
MPICH-specific), you should probably ask the MPICH maintainers -- we can't
really comment on their software.
A general answer to your question is that parallel computing is not free.
It is not always beneficial to parallelize something because over the
overhead involved. In general, you need to have "enough work" such that the
overhead of parallelization (e.g., network communication time) needs to be
[much] smaller than your actual wall-clock computation time.
I wrote a web page about this kind of thing a long time ago -- see if this
helps explain (the project itself is long-since defunct, but the
explanations are still goo):
http://www.osl.iu.edu/~jsquyres/bladeenc/details.php
On 8/28/06 8:14 AM, "Aidaros Dev" <aidaros.dev_at_[hidden]> wrote:
> Im new in MPI and in my lab using Rock cluster 10 nodes each has 2
> processors, using mpich 1.2.7p1 in
> my Linux platform,
> I compute the execution time by running MPI_Wtime at begining and end of
> program then subtract them.
> I run the sequential code on the master machine by $./sequntial
> the execution time is almost constant from 0.000771 seconds to 0.000789
> I m using two processors for my parallel
> When I run parallel code by $ /opt/mpich/gnu/bin/mpirun -nolocal -np 2
> -machinefiles machines ./parallel
> the output:
> --------------------------------
> Processor 0 on compute-0-0
> Processpr 1 on compute-0-0
> Execution Time is 0.000503 seconds
> -------------------------------
> This result is acceptable,
> but when i run again $ /opt/mpich/gnu/bin/mpirun -nolocal -np 2
> -machinefiles machines ./parallel
> the execution time is 0.00129, next run 0.00288,next run 0.000666,next run
> 0.00199 seconds
> Why the parallel execution time goes up and down, even sometimes is slower
> than sequential process?.
> Is it shared memory issue?
>
> Thank for help in advance
> A friend in need Is a friend indeed
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
--
Jeff Squyres
Server Virtualization Business Unit
Cisco Systems
|