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


Master-worker pattern

The Master-worker pattern corresponds to the typical master-worker scheme: a master process divides a problem into several sub-problems (here called chunks) and dispatches them to several worker processes (master_dispatch). The workers initialize with master_receive_ready (perhaps a MPI_Irecv if necessary) and subsequently send results and receive new chunks of work with worker_send and worker_receive. When all work is done, the master sends a stop-signal to the workers (master_worker_stop). This scheme is important in practice, because it is the simplest method to do load balancing.


\begin{spacing}{1}
\begin{verbatim}/* master code */for each worker
master_...
...new work or stop signal */
until stop signal received\end{verbatim}\end{spacing}



Subsections

Per Ekman 2005-02-16