next up previous contents
Next: MPI_Bsend-length Up: Measurements of SKaMPI, Version Previous: p2p_dummy   Contents


Master-worker-pattern

The Master-worker-pattern correspondents to the typical master-worker-scheme: a master dispatches pieces of work to several workers. Each worker does his piece of work. When finished he sends his result to the master and requests for a new piece of work (and so on). When all work is done, the master sends an stop-signal to the workers.
This scheme is important in practise, since it automatically balances load. In pseudo-code the Master-worker-scheme looks like:
\begin{spacing}{1}
\begin{verbatim}/* master-code */for each worker
set rea...
...g to the received signal */
send result;endforever\end{verbatim}\end{spacing}
Every abstract communication ``code'' in the scheme above can be filled with concrete MPI_Code. We measure the time consumed by dispatch work. This code sequence does for example this:
\begin{spacing}{1}
\begin{verbatim}/* dispatch work: */
wait for a worker;
rec...
...m worker;
actual piece of work := next piece of work;\end{verbatim}\end{spacing}



Subsections

Per Ekman 2002-01-29