The NAS benchmark suite was designed to test the suitability of massively parallel systems for the needs of NASA Ames Research. Of the nine codes in the suite, four have been translated to pC++ and we report on two of them here. (A more complete report on this suite will be published when all have been translated and tested.)
The easiest of these is the ``Embarrassingly Parallel'' program.
This code generates complex pairs of uniform (0, 1) random
numbers and gathers a small number of statistics.
In the benchmark, the random numbers are created by two special portable
functions called
and
, and a main function compute_pairs(int k) is used to compute the numbers based on a different
value of the seed parameter
.
Our approach is to divide the work into a set of computational
engines with one engine per processor.
This ``set'' of engines is a collection of elements of type
Set<GaussianEngine>.
Each GaussianEngine object computes
of the
total where
is the number of processors.