Algorithms: Sequential, Parallel and Distributed 1-2
Overview
In Chapter 18 we introduce distributed computation algorithms suitable for implementation in a
message passing environment such as commonly used today on Beowulf clusters. Pseudocode
conventions for basic functions such as send, receive, broadcast, and scatter are discussed.
These functions are very similar to functions contained in the MPI programming library. The
differences between synchronous and asynchronous communication functions are highlighted,
and avoiding deadlock is discussed. The generic paradigm the alternating
computation/communication cycle is presented, including how it is implemented using buffered
sends and the probe command. Pseudocode for the compare-exchange operation is given, and
Chapter Objectives
After completing the chapter the student will know:
• The message passing paradigm for distributed computation on a cluster
• The difference between the blocking Ssend function, and the buffered Bsend function .
• How to avoid deadlock when using the blocking Ssend function
• The basic actions performed by Ssend, Bsend, receive, broadcast, scatter, probe and
related message passing functions
• How to alternate between computation and communication cycles using asynchronous
communication as implemented using the probe function
Instructor Notes