Reputation: 585
I wish to calculate the speedup of my MPI application against the number of parallel processes/nodes.
Application mostly performs huge matrices computation in parallel.
I can measure an elapsed time using MPI_Wtime()
, something like this..
double start = MPI_Wtime();
....
double end = MPI_Wtime();
double elapsed = end - start;
But how can I achieve this against the degree of parallelization ?
Upvotes: 0
Views: 3061
Reputation: 17329
The usual definition of speedup is time on 1 process divided by time on p
processes.
If you wish to present the performance of your code, it's good to pick a range of p
from 1 to the highest amount you have access to run and plot the results on a speedup vs. p
plot.
Note that strictly speaking, speedup should compare the time on p
processes vs the best possible sequential code, not just running your parallel code sequentially. This seems like a moot point, but in some areas the parallel codes are pretty awful in the sequential case. In the sparse matrix world, for example, you can find a parallel code 10-50x slower than the top sequential code.
Upvotes: 3