Cilk vs MPI: comparing two very different parallel programming styles

We measured the relative performance of two support systems for parallel programming on networks of workstations: Cilk - an extension of C with dataflow semantics - and MPI - a commonly used library for message passing. Although the two systems present significantly different parallel processing models, we attempted to code the benchmark problems in similar ways. The problems selected were matrix multiplication, travelling salesman problem, quick sort, Gaussian elimination, fast Fourier transform and finite differencing. We compared run times, speed-ups and coding efficiency as measured by lines of code in our implementations of the problems. Cilk showed a speed advantage when smaller numbers of large messages are transferred in a computation, enabling it to gain more from the underlying active messages implementation. Cilk code for algorithms with natural dataflow solutions was more compact, whereas algorithms which have simple iterative 'update-in-place' styles (Gaussian elimination and finite differencing) were more efficiently expressed when MPI was used