Need help on MPI_Wtime
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.
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.
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
Tags for this Thread