Need help on MPI_Wtime

This is a discussion on Need help on MPI_Wtime within the C Programming forums, part of the General Programming Boards category; Hey guys, I am doing a project on speed up anaylysis of a parallel program and using MPI+C on LINUX. ...

  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    2

    Need help on MPI_Wtime

    Hey guys,


    I am doing a project on speed up anaylysis of a parallel program and using MPI+C on LINUX. I have coded parallel programs on Matrix multiplication and pi calculation and now I am to analyse that. My guide asked me to use MPI_Wtime but each processor gives different times(as expected) for execution. Now how do I get a single execution time from first to last, which i can print using master.


    Or lemme put it this way.....What do I take as the parallel execution time? The master time (as it does the final calculation), the max time (I mean max of all processors time) or anything else??


    Thanks in advance, and please don't poke at my question, just answer if you can.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,676
    Typically, your master process will perform the overall timing because:
    - it synchronizes startup data with other processes
    - it synchronizes shutdown/completion of all other processes

    If there is no user input during runtime, then your version of mpirun may be able to tell you the execution (wall) time itself.

    gg

  3. #3
    Registered User
    Join Date
    Jun 2010
    Posts
    2
    I don't have a user input during run time. I have called Wtime in the master routine. I got some results, but they don't go well with the expected. Inititally the time is decreasing with increasing no.of procs as expected, but then it is moving in a random fashion.....and the worst part, the time of execution turned out to be much greater than that for the serial program with same logic.


    Anyways,....thanks for the tip

Popular pages Recent additions subscribe to a feed

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21