The tasks in some parallel applications (e.g., Sweep3D) communicate in a pipelined pattern called a wavefront. The adjacent figure illustrates a wavefront pattern for 20 tasks arranged in a 4×5 array. In this example we write a coNCePTuaL program to implement that communication pattern for a 2-D array of any size and measure the average per-message latency. More precisely, task 0 begins by starting a timer then sending a message to its neighbors to the right and below. After the message flows through the entire 2-D array, the last task sends a message back to task 0 who stops the timer and reports the total time divided by the longest distance a message traveled (width + height - 1). For this program we use exclusively blocking communication; that is, each task sends or receives only one message at a time.
It's recommended that you read the following pages in order: