next up previous
Next: Timing MPI programs Up: third.cor second.c Previous: Compilation and running

About barrier synchronisation

 

The first thing you should observe here is that the communication time increases as the number of computations increases. Why should it be so, if, clearly, in this case no more data is being transferred for n = 10,000,000 than for n = 10,000?

The answer to this question is that a reduction and broadcast operations are barrier operations. This means that if some processors are slower than others, as is the case on our farm, you will have to wait for the slow ones to finish their computations before the reduction operation can take place. Thus even though there is no more data transfer for n = 100,000 than for n = 10,000,000 in our program, there is more computation to be carried out, which results in slow processors lagging behind the fast ones more, and this, in turn, increases the waiting time, whenever a barrier set by a broadcast or a reduction operation is encountered.



Zdzislaw Meglicki
Tue Feb 28 15:07:51 EST 1995