DeinoMPI Forum

Forum dedicated to discussing DeinoMPI
Welcome to DeinoMPI Forum Sign in | Join | Help
in Search

Help for single machine parallel algorithm

Last post 01-06-2010, 1:19 AM by kemalure. 2 replies.
Sort Posts: Previous Next
  •  01-06-2010, 12:25 AM 316

    Help for single machine parallel algorithm

    I have been assigned an homework problem on parallel programming lesson at university. Unfortunately I don't have access to multiple computers, but my teacher said that I can also run multiple processes on a single computer; she advised me to use MPI library for that job.

    So I downloaded DeinoMPI and got it to work with localonly option. I have two questions about this "single machine" approach;

    1. Will there be an improvement in perfromance of the algorithm ? For example when I run cxxpi.exe from the examples directory, no matter how many processes I select, I always get the same answer. Like:

    ---------------------------------------------------------------------
    1 process:
    Process 0 of 1 is on kemal-1
    pi is approximately 3.14159 Error is 8.33341e-010
    wall clock time = 0.000167619

    4 processes:

    Process 1 of 4 is on kemal-1
    Process 2 of 4 is on kemal-1
    Process 0 of 4 is on kemal-1
    pi is approximately 3.14159 Error is 8.33331e-010
    wall clock time = 0.0491722
    Process 3 of 4 is on kemal-1
    ----------------------------------------------------------------------

    What does "wall clock" time mean in this output ?  Is is possible to get improvement on running time by executing the algorthim in this manner (On a single machine)?

    In addition, why do I get the output message (the value of pi) from only one process (process 0) and not from other processes ?

    2. Since we are free to choose the problem/algorithm for the the homework, what would you suggest me ? Can you advise me a problem which can be solved/executed in a parallel manner on  a single machine ?

    Sorry for this long and frustrated message but I am a complete newbie on this subject, I would really appreciate your help.


  •  01-06-2010, 1:10 AM 317 in reply to 316

    Re: Help for single machine parallel algorithm

    The cpi example is a standard parallel processing teaching example but because the amount of computing that is done is so small you won't see speedups with multiple processes.

    You can see speedup on a single machine if it has multiple cores. For example, if you have a quad core cpu you could get up to 4x speedup with the appropriate algorithm and problem set.

    If you only have a single cpu core you will not see any speedup and may actually see slowdown due to parallel processing overhead.

    But it is always useful to develop on a single machine because you can check your code for correctness and then run it later on a cluster for performance.
  •  01-06-2010, 1:19 AM 318 in reply to 317

    Re: Help for single machine parallel algorithm

    Thanks for such a quick reply !!

    I have a dual-core machine, so I can get 2x improvement (that sounds good), do I have to configure anything for this job, or do I simply execute it ?

    How can I "see" this performance improvement, what kind of command do I have to add to my code ?
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems