Tuesday, 12 February 2008

How to benchmark communication cost in the beowulf (parallel system)

Quite long time ago, I've proposed one simple way of estimating
communication cost of an MPI program (or multiple-instruction)
appeared in the beowulf mailing list. Here is the outline of
the procedure.
[original post]

Definition Communication cost (Comm) is the ratio between the real
time used by all processors (processes actually if you use MPI)
and global real cpu time (GRU).
 Comm=GRU/GR = (GR-GU-GS)/GR 

Undefined symbols are as follows:
Comm= Communication cost
GR=global real time
LR=local worked real time
LU=local user
LS=local system
GS=global system
GU=global user
n=# of procs
GU=n*LU
GS=n*LS
GR=n*LR

In the actual MPI program this measure's implementation could be outlined
as follows
 BEGIN PROGRAM Myprogram
begin distribution
initial_timings=timings;
...do whatever is your distributed computing....
end_timings=timings;
end distribution
if(myrank == 0) {compute communication cost}
END Myprogram

BEGIN PROC timings
for(n=0;n < numproc;numproc) {
if(n==myrank) { measure timing of myrank and send to rank 0 }
}
END PROC

No comments:

Post a Comment