Wavefront Code
Expressing a wavefront communication pattern in coNCePTuaL

The following is the complete coNCePTuaL code for the performance test previously described. As is readily apparent, coNCePTuaL syntax is very English-like and intended to be relatively easy to understand even by someone who's never before seen a coNCePTuaL program.

xdim is "Mesh width (tasks)" and comes from "--width" or "-w" with default 1.
ydim is "Mesh height (tasks)" and comes from "--height" or "-h" with default 1.
reps is "Number of wavefronts to time" and comes from "--reps" or "-r" with default 1E5.
msgsize is "Message size (bytes)" and comes from "--msgsize" or "-m" with default 0.

For reps repetitions {
  task 0 resets its counters then
  all tasks src send a msgsize-byte message to tasks dst such that dst = src+xdim \/ (dst=src+1 /\ dst mod xdim <> 0) then
  task num_tasks-1 sends a msgsize-byte message to task 0 then
  task 0 logs the mean of elapsed_usecs/(xdim+ydim-1) as "Per-hop latency (usecs)"
         and the standard deviation of elapsed_usecs/(xdim+ydim-1) as "Per-hop latency (usecs)"
}

Of course, not all of the semantics—or even the syntax—are immediately obvious. Hence, a detailed explanation of the wavefront program appears on a separate page.

Scott Pakin, pakin@lanl.gov