next up previous

8.4 Global Communication Calls

Several global communication calls are available on the iPSC/860. These global operations are high-level constructs for communication among node processes and for some applications they are more efficient than the primitive message passing calls.

For instance, gsync() is the global synchronization operation (also known as a barrier). When a node process calls gsync(), it waits until all other nodes in the hypercube have also executed gsync() before continuing on with the process.

Global calls are available for several arithmetic and logic functions as well.

Example
gdsum() is used to sum a double precision number across all nodes.
Suppose x is an array that is evenly divided into blocks of m elements each and each node of a hypercube is assigned one block. The dot product x.x can be computed efficiently using gdsum. Here, dummy is a temporary variable used by each node in order to accumulate the contributions from the other nodes. When gdsum completes, dot contains the correct dot product. The following program is executed by each node of the hypercube.

double x[m], dot, dummy;
int i;

dot = 0;
for (i=0; i<m; i++)
dot = dot + x[i]*x[i];
gdsum(&dot, 1, &dummy);